Open yaohaizhou opened 1 year ago
Nostream uses redis as a caching layer. New events do not immediately show up in nostr_ts_relay.Schemas.public.Tables.events, but will eventually. I don't know how long the delay is.
There's no delay. Events should show automatically. Check the logs on your docker containers to see if there's an issue.
Did you forget the ;
after select * from events
?
select * from events;
@zyhhhy the PostgreSQL database port is not exposed by default. You have to edit the docker-compose.yml file and edit the nostream-db section to add the ports. It's not recommended that you expose the database this way, if you do make sure the external port is not 5432 or that you have a firewall in place blocking access to this port from the outside world.
Nostream responds with an OK message with true if the event is accepted or false and a reason if the event is rejected. Use a Nostr client that lets you see this information.
Describe the bug I have deployed a Nostream relay on my server. I use Damus to post a node and it works fine. However, I cannot find any event in PostgreSQL database. How can I read the database?
To Reproduce Steps to reproduce the behavior:
docker container ls
to find the container id for PostgreSQLdocker exec -it id bash
psql -U nostr_ts_relay -W
nostr_ts_relay
--------+--------------------------------+----------+---------------- public | events | table | nostr_ts_relay public | invoices | table | nostr_ts_relay public | knex_migrations | table | nostr_ts_relay public | knex_migrations_id_seq | sequence | nostr_ts_relay public | knex_migrations_lock | table | nostr_ts_relay public | knex_migrations_lock_index_seq | sequence | nostr_ts_relay public | users | table | nostr_ts_relay (7 rows)
select * from events
and nothing returnsPS: Also, I try to connect the database outside the docker (in Ubuntu physical machine shell), but I cannot log in.
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "nostr_ts_relay"
System (please complete the following information):