tickets #127385
closed
paste.o.o - nginx tries to talk to localhost:3000, but nobody is listening
Added by pjessen over 1 year ago.
Updated 5 months ago.
Description
Whilst taking a quick look at #127376, I noticed nginx complaining about connections to [::1]:3000 being refused. "puma" is indeed listening on 0.0.0.0:3000, but localhost is (also) ::1.
paste.error.log is full of these:
2023/04/07 06:48:02 [error] 19158#19158: *2176220 connect() failed (111: Connection refused) while connecting to upstream, client: 2a01:4f9:6b:215b::2, server: paste.opensuse.org, request: "GET /lists HTTP/1.1", upstream: "http://[::1]:3000/lists", host: "paste.opensuse.org"
I don't know which one needs amending - nginx or puma?
- Assignee set to hellcp
- Private changed from Yes to No
For now, I've amended the nginx config to use 127.0.0.1 instead of localhost. It won't survive the next highstate though. I guess it would be better to fix the app to listen on both ipv4 and ipv6 addresses though. I'm no good with ruby, I'll leave that to hellcp.
- Status changed from New to In Progress
- Assignee changed from hellcp to crameleon
- % Done changed from 0 to 80
Changed the Ruby listener to dual-stack:
sh-4.4# grep -A2 '^#port' /srv/www/paste-o-o/config/puma.rb
#port ENV.fetch('PORT', 3000) https://progress.opensuse.org/issues/127385
bind 'tcp://[::]:3000'
I did not find puma.rb
for Paste in Salt, only one for TSP, hence I assume it's only configured locally.
Since this is only proxied to a local nginx instance, I personally think no listening ports, but rather a Unix socket should be used. Maybe I'll follow up on this.
- % Done changed from 80 to 90
puma.rb is tracked on github
- Status changed from In Progress to Blocked
- Status changed from Blocked to Resolved
- % Done changed from 90 to 100
Also available in: Atom
PDF