我正在尝试为我的应用程序启动thin,但随后无法生成pid:
$ thin -C /var/www/project_path/current/config/myproject.testing.yml start现在我不能停止它,因为没有pid:
$ thin -C /var/www/project_path/current/config/myproject.testing.yml stop
/home/usr/.rvm/gems/ruby-1.9.2-p180@api/gems/thin-1.5.1/lib/thin/daemonizing.rb:131:in `send_signal': Can't stop process, no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound)这是yml文件:
pid: /home/usr/htdocs/testing/myproject/shared/pids/thin.pid
rackup: config.ru
log: /home/usr/htdocs/testing/myproject/shared/log/thin.log
timeout: 30
port: 1234
max_conns: 1024
chdir: /home/usr/htdocs/testing/myproject/current
max_persistent_conns: 128
environment: testing
address: 127.0.0.1
require: []
daemonize: true更新:
现在我可以启动服务器了,但是在某个seconds进程自动消失之后;这意味着我看不到几秒钟后启动服务器所生成的pid。
发布于 2013-06-10 20:27:50
lsof -wni tcp:1234将为您提供进程ID
kill -9 PID将终止该进程
发布于 2013-09-07 00:10:54
我也有同样令人恼火的问题
我发现,如果服务器在启动时崩溃,则会创建pid文件,但该文件中没有pid。尝试对服务器./logs/thin.3001.log的日志文件进行cat,并查找错误。您也可以尝试通过以下方式手动启动服务器
rails s -p 3000并查看是否抛出了任何错误。
祝好运
克里斯
https://stackoverflow.com/questions/17023758
复制相似问题