-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
passenger-config fails with "too long unix socket path" on Ubuntu 18.04 LTS #2397
Comments
Yes, this is because the path generated by the systemd private tmp feature is 80 chars long, which only leaves 27 chars for an application to use, and passenger uses 35 chars in its path to its socket. Passenger's part of the path is: The first part of the path identifies that passenger made the directory, and has a random segment to prevent symlink attacks, then the rest is just the path to the socket. There are several ways to deal with this, such as:
|
Thanks for the pointers @CamJN ! For posterity, I resolved this by turning off the systemd private tmp feature by commenting out the line
in $ sudo systemctl daemon-reload
$ sudo systemctl restart apache2 Now |
How to fix this same error /usr/lib/ruby/vendor_ruby/phusion_passenger/admin_tools/instance.rb: |
@coopeu, I suspect following the instructions in #2397 (comment) would work for Debian also. |
Maybe the passenger error origin is different: I hope this help to identify the error and to find the solution. Thanks in advance! |
I'm confused why this got closed, honestly? This, to me, is a bug that needs to be fixed, not band-aided by adjusting apache2's systemd file. This package, including the one compatible with Ubuntu 20.04 is effectively broken straight out of the box. @CamJN is there any chance that Phusion would take this back to the drawing board or raise an issue upstream with systemd? |
For Ubuntu 18+ I'd recommend doing this instead of altering the systemd file
This should work ok as the passenger tooling looks there as one of it's default paths for the instance registry |
That sounds like a great approach, i'll see if i can add it to the .deb packages. |
The correct settings for |
6.0.16 packages are out now and have the mitigation for this. |
6.0.16 causing 4 hours down in my backend because I don't know that there was issue on passenger |
Due to the way that the tmpfiles works, the system needs to be rebooted in order for the folder to be created automatically. The package installation should probably try to create that folder if it doesn't already exist. This should help prevent the need to reboot. |
I use Kubernetes |
You can run |
In a docker/kubernetes type setup systemd may be missing, so it probably won't create the dir for you. |
I had to deal with that over in phusion/passenger-docker#352 by creating the dir manually in the passenger-docker images. |
I think 6.0.16 should be a new major version |
Just wanted to document that this exact same issue is present with nginx running on Amazon Linux 2023 and Passenger v 6.0.18. The same remedy works in this environment. Add the directory and add this directive to /usr/conf/nginx.conf:
|
Issue report
When running Passenger on hosts upgraded from Ubuntu 16.04 LTS to 18.04 LTS,
passenger-config
fails withQuestion 1: What is the problem?
Running
passenger-config
is possible.passenger-config
fails with the above stack trace. Debugging shows that the UNIX socket path Passenger tries to use is something likewhich is over the system limit.
I have not tried on a vanilla 18.04, but there seems to be additional evidence here, with no solution:
https://stackoverflow.com/questions/70012839/phusion-passenger-status-crashing-with-too-long-socket-name
Your answer:
Question 2: Passenger version and integration mode:
Your answer:
Ubuntu libapache2-mod-passenger 1:6.0.12-1~bionic1
Question 3: OS or Linux distro, platform (including version):
Your answer:
Ubuntu 18.04.6 LTS
Question 4: Passenger installation method:
Your answer:
4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[] RubyGems + Gemfile
[ ] RubyGems, no Gemfile
[x] Phusion APT repo
[ ] Phusion YUM repo
[ ] OS X Homebrew
[ ] source tarball
[ ] Other, please specify:
Question 5: Your app's programming language (including any version managers) and framework (including versions):
Your answer:
System Ruby is ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
Question 6: Are you using a PaaS and/or containerization? If so which one?
Your answer:
No, plain VM
Question 7: Anything else about your setup that we should know?
Your answer:
As mentioned before, the system was upgraded from Ubuntu 16.04 LTS.
The text was updated successfully, but these errors were encountered: