<06salaxceitor> from LB bash: root@8fb30162d719:/code/listenbrainz# psql psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
yvanzo
You have to pass the same parameters as in the previous URL
discordbrainz
<06salaxceitor> something like this? root@8fb30162d719:/code/listenbrainz# psql -h localhost -U musicbrainz psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address Is the server running on that host and accepting TCP/IP
connections?
<06salaxceitor> from outside the LB container: ✘ xeitor@xeitor ~/github_projects/listenbrainz-server master ± psql -h localhost -U musicbrainz Password for user musicbrainz: psql (14.11 (Ubuntu 14.11-0ubuntu0.22.04.1), server 12.17 (Debian 12.17-1.pgdg120+1)) Type "help" for help. musicbrainz=#
<06salaxceitor> oopss
<06salaxceitor> there was a hidder char in the MB_DATABASE_URI: postgresql://musicbrainz:musicbrainz@\u200bmusicbrainz-docker-db_1:5432/musicbrainz_db
yvanzo
🎉
discordbrainz
<06salaxceitor> this is the new error i am getting now: psycopg2.OperationalError: could not translate host name "musicbrainz-docker-db_1" to address: Temporary failure in name resolution
mara42 has quit
yvanzo
salaxceitor: the correct host name is `musicbrainz-docker-db-1` according to your `docker ps` output above
this has to be changed in `MB_DATABASE_URI`
discordbrainz
<06salaxceitor> yep i did and now, from the LB shell i tryed psycopg2.connect(app.config["MB_DATABASE_URI"]) and got could not translate host name "musicbrainz-docker-db-1" to address: Temporary failure in name resolution
Tarun_0x0 joined the channel
<06salaxceitor> i think the reason is that the containers are in different docker networks
yvanzo
yes, but then the port should be accessible on `localhost` system-wide
discordbrainz
<06salaxceitor> yep, i got access from my system (outiside containers)
<06salaxceitor> through psql in my terminal and pgadmin
<06salaxceitor> here is an example
<06salaxceitor> i think i got it
<06salaxceitor> found this in LBs docker-compose.yml file
<06salaxceitor> # Uncomment the following lines if you want to connect the LB network to a musicbrainz-docker network to access a MB replica # TODO: re-comment these before merging this code networks: default: name: musicbrainz-docker_default external: true
<06salaxceitor> and now, from LB bash: root@32745e6866f4:/code/listenbrainz# psql -h musicbrainz-docker-db-1 -U musicbrainz Password for user musicbrainz: psql (12.18 (Ubuntu 12.18-1.pgdg22.04+1), server 12.17 (Debian 12.17-1.pgdg120+1)) Type "help" for help.
yvanzo
👏
discordbrainz
<06salaxceitor> thanks for your help! ☺️
<06salaxceitor> connection to rabbit started to fail after the network change, i had to change rabbitmq ports from "127.0.0.1:25672:15672" to this "25672:15672"
<06salaxceitor> dismiss previous msg, it's working now 😆
<06salaxceitor> btw amazing develpment environmet setup experience, it shows that a lot of efforts has been put into it
Tarun_0x0
Yvanzo, as I am not very familiar with Perl, I wanted to ask: in MusicBrainz, do we have anything like loading the translations on the server side and passing them to clients for internationalization using i18next? If this is the case, can you point me towards some code?
yvanzo
Hi Tarun_0x0, you will find the relevant parts of the code by searching for "gettext". I’m not familiar with i18next either for comparing.
discordbrainz
<06salaxceitor> sorry to bother again, i am still getting this error on artists page: UndefinedTable psycopg2.errors.UndefinedTable: relation "mapping.mb_artist_metadata_cache" does not exist LINE 2: FROM mapping.mb_artist_metadata_cache
Tarun_0x0
yvanzo: oh i see . Thanks for the reply, even on the weekend