我正在尝试使用start-stop-daemon在CentOS 7上运行Catalyst。这是我运行的命令:start-stop-daemon
start-stop-daemon --start --pidfile /var/run/myapp.pid -d "/home/user/myapp" --exec /opt/perlbrew/perls/perl-5.22.0/bin/perl --startas "/home/user/myapp/script/myapp_fastcgi.pl" --chuid root --make-pid -- "-l :8100 -n 6"
然后我得到这个错误:
Cannot resolve host name -- exiting!
在加载链接的操作并将它们打印到屏幕上并显示最终消息后,它会显示此错误:
[info] myapp powered by Catalyst 5.90112
在/etc/hosts
我尝试注释掉我认为可能导致问题的任何主机名:
127.0.0.1 myapp.com myapp.com
#127.0.0.1 localhost.localdomain localhost
#127.0.0.1 localhost4.localdomain4 localhost4
# The following lines are desirable for IPv6 capable hosts
#::1 myapp.com myapp.com
#::1 localhost.localdomain localhost
#::1 localhost6.localdomain6 localhost6
奇怪的是,如果我不使用start-stop-daemon
,我只是从命令行启动服务器,服务器启动正常。