简体   繁体   English

Puma在启动时产生错误,表示正在运行,但无法通过API进行访问

[英]Puma produces error on start says its running but cannot be accessed via API

I have a Rails 4.2.6 API running Puma on production and it failed after latest push. 我有一个在生产环境中运行Puma的Rails 4.2.6 API,但在最新推送后失败了。 Reverted to a previously working commit but now have an error on start up even though the process is running on the server. 恢复为以前的工作提交,但即使进程正在服务器上运行,现在也无法启动。

[1854] Puma starting in cluster mode...
[1854] * Version 3.4.0 (ruby 2.3.3-p222), codename: Owl Bowl Brawl
[1854] * Min threads: 0, max threads: 4
[1854] * Environment: production
[1854] * Process workers: 1
[1854] * Preloading application

THE ERROR---> /home/appname/.rbenv/versions/2.3.3/bin/puma: No such file or directory -

[1854] * Listening on ssl://0.0.0.0:8080?
 key=/home/appname/appname_react/sslforfree/private.key&cert=/home/appname/appname_react/sslforfree/certificate.crt
[1854] * Daemonizing...

The file definitely exists and appears to be fine. 该文件肯定存在,并且看起来还不错。

/home/appname/.rbenv/versions/2.3.3/bin/puma: /home/appname/.rbenv/versions/2.3.3/bin/puma:

~/.rbenv/versions/2.3.3/bin$ cat puma
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'puma' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0.a"

if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
  version = $1
  ARGV.shift
 end
end

load Gem.bin_path('puma', 'puma', version)

Any help is much appreciated! 任何帮助深表感谢!

This was not the actual issue. 这不是实际的问题。 In fact this "Error" is still printing during Puma start up but not affecting the API at all. 实际上,在Puma启动期间仍会打印此“错误”,但完全不会影响API。 The real issue was that when I reverted to previous commit that commit had an old password to the database and THAT was the actual issue I was having. 真正的问题是,当我恢复为先前的提交时,该提交具有数据库的旧密码,而这正是我遇到的实际问题。

I found it by looking through the puma_stdout.log file on the production box. 我通过查看生产框中的puma_stdout.log文件找到了它。

 nano puma_stdout.log

Standing on my own shoelaces again.... :-) 再次站在我自己的鞋带上.... :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM