Project

General

Profile

Actions

tickets #127385

open

paste.o.o - nginx tries to talk to localhost:3000, but nobody is listening

Added by pjessen about 1 year ago. Updated 5 months ago.

Status:
Blocked
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
2023-04-07
Due date:
% Done:

90%

Estimated time:

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?

Actions #1

Updated by pjessen about 1 year ago

  • 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.

Actions #2

Updated by crameleon 11 months ago

  • 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.

Actions #3

Updated by crameleon 11 months ago

  • % Done changed from 80 to 90

Nginx location + systemd service change: https://gitlab.infra.opensuse.org/infra/salt/-/merge_requests/655

Local change:

sh-4.4# grep -A2 '^[ #]bind' /srv/www/paste-o-o/config/puma.rb
#bind 'tcp://[::]:3000'
bind 'unix:///run/paste/puma'

Waiting for someone to review my MR.

Actions #4

Updated by hellcp 11 months ago

puma.rb is tracked on github

Actions #6

Updated by crameleon 5 months ago

  • Status changed from In Progress to Blocked
Actions

Also available in: Atom PDF