【问题标题】:Phusion Passenger status crashing with too long socket namePhusion 乘客状态因套接字名称太长而崩溃
【发布时间】:2021-12-28 22:18:07
【问题描述】:

我正在 Ubuntu 18.04 上尝试乘客,安装非常通用,乘客状态调用崩溃。不太清楚如何设置它用于本地套接字通信的路径。

Version : 6.0.12
Date    : 2021-11-17 23:20:19 +0000
Instance: PdoRpeL5 (Apache/2.4.29 (Ubuntu) Phusion_Passenger/6.0.12)

Traceback (most recent call last):
    6: from /usr/sbin/passenger-status:349:in `<main>'
    5: from /usr/sbin/passenger-status:346:in `start'
    4: from /usr/sbin/passenger-status:62:in `command_show_status'
    3: from /usr/sbin/passenger-status:124:in `show_status'
    2: from /usr/lib/ruby/vendor_ruby/phusion_passenger/admin_tools/instance.rb:94:in `http_request'
    1: from /usr/lib/ruby/vendor_ruby/phusion_passenger/admin_tools/instance.rb:94:in `new'
/usr/lib/ruby/vendor_ruby/phusion_passenger/admin_tools/instance.rb:94:in `initialize': too long unix socket path (116bytes given but 108bytes max) (ArgumentError)

查看该代码,@path/tmp/systemd-private-af50a27a57d04fec9366f72dd251a3be-apache2.service-Dy9bBV/tmp/passenger.PPuC2RN,这使得套接字名称为 /tmp/systemd-private-af50a27a57d04fec9366f72dd251a3be-apache2.service-Dy9bBV/tmp/passenger.PPuC2RN/agents.s/core_api

似乎是乘客内部问题,但我正在寻找解决方法...

【问题讨论】:

    标签: passenger


    【解决方案1】:

    您是否尝试过编辑您的 Web 服务器服务文件 nginx.service 或 apache2.service?我遇到了这个问题并通过删除该行来解决它:

    PrivateTmp=true
    

    来自/etc/systemd/system/multi-user.target.wants/apache2.service

    然后:

    sudo systemctl daemon-reload
    sudo systemctl restart apache2
    

    https://github.com/phusion/passenger/issues/2397

    “这是因为 systemd 私有 tmp 功能生成的路径长度为 80 个字符,仅留下 27 个字符供应用程序使用,而乘客在其套接字的路径中使用 35 个字符。”

    【讨论】:

    • 太棒了,非常感谢!
    猜你喜欢
    • 2019-01-12
    • 2018-08-10
    • 1970-01-01
    • 2015-10-24
    • 1970-01-01
    • 2011-08-15
    • 2014-08-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多