POW,OS X - 代理超时 - 502 错误
POW, OS X - Proxy timeout - 502 error
我 运行 POW OSX 为 RoR 应用程序开发提供服务。几天前,我的一个应用程序崩溃并返回 502 错误。页面似乎正在加载,直到遇到超时显示此消息:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.html.
Reason: Error reading from remote server
我检查了日志,没有任何内容 - 没有执行 Ruby 代码,所以 Rails 甚至都没有被触及。我在终端输入 rails s,应用程序运行正常。
我还通过 GIT 将我的应用恢复到发布前的阶段,甚至恢复到最开始,结果是一样的。
*.dev 域中的其他开发应用程序运行正常。
不确定问题出在哪里,我应该在哪里寻找它。如果有任何帮助,我将不胜感激。
已解决
我必须在 ~/Library/Logs/Pow/app/ 中查看日志并发现 Ruby 错误。
http://pow.cx/manual.html#section_2.6
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING /Users/***/.rvm/gems/ruby-2.2.2/gems/json-1.8.3/lib/json/ext.rb:13:in `require'
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- Machine register context ------------------------------------------------
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rax: 0x0000000000000000 rbx: 0x00007fdfad2f4450 rcx: 0x0000000000000000
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000025
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rbp: 0x00007fff57954310 rsp: 0x00007fff579542b0 r8: 0x0000000000000000
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r9: 0x00007fff71bb2110 r10: 0x00007fff98b8e401 r11: 0x00007fff8f847140
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r12: 0x0000000108d0ece0 r13: 0x0000000000000000 r14: 0x0000000000000025
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r15: 0x0000000000000000 rip: 0x0000000108d58886 rfl: 0x0000000000010202
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- C level backtrace information -------------------------------------------
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 0 libruby.2.2.0.dylib 0x0000000108440655 rb_vm_bugreport + 149
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 1 libruby.2.2.0.dylib 0x00000001082e82f2 rb_bug_context + 466
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 2 libruby.2.2.0.dylib 0x00000001083bccf3 sigsegv + 83
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 3 libsystem_platform.dylib 0x00007fff841a352a _sigtramp + 26
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 4 libruby.2.2.0.dylib 0x0000000108d58886 newobj_of + 45
我已经降级 Ruby 2.2.2 -> 2.2.1 并且它可以工作。所以我敢打赌就是这样,我的问题是为什么它在 运行 rails s.
时工作正常
我 运行 POW OSX 为 RoR 应用程序开发提供服务。几天前,我的一个应用程序崩溃并返回 502 错误。页面似乎正在加载,直到遇到超时显示此消息:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.html.
Reason: Error reading from remote server
我检查了日志,没有任何内容 - 没有执行 Ruby 代码,所以 Rails 甚至都没有被触及。我在终端输入 rails s,应用程序运行正常。
我还通过 GIT 将我的应用恢复到发布前的阶段,甚至恢复到最开始,结果是一样的。
*.dev 域中的其他开发应用程序运行正常。
不确定问题出在哪里,我应该在哪里寻找它。如果有任何帮助,我将不胜感激。
已解决
我必须在 ~/Library/Logs/Pow/app/ 中查看日志并发现 Ruby 错误。 http://pow.cx/manual.html#section_2.6
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING /Users/***/.rvm/gems/ruby-2.2.2/gems/json-1.8.3/lib/json/ext.rb:13:in `require'
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- Machine register context ------------------------------------------------
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rax: 0x0000000000000000 rbx: 0x00007fdfad2f4450 rcx: 0x0000000000000000
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000025
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING rbp: 0x00007fff57954310 rsp: 0x00007fff579542b0 r8: 0x0000000000000000
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r9: 0x00007fff71bb2110 r10: 0x00007fff98b8e401 r11: 0x00007fff8f847140
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r12: 0x0000000108d0ece0 r13: 0x0000000000000000 r14: 0x0000000000000025
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING r15: 0x0000000000000000 rip: 0x0000000108d58886 rfl: 0x0000000000010202
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- C level backtrace information -------------------------------------------
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 0 libruby.2.2.0.dylib 0x0000000108440655 rb_vm_bugreport + 149
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 1 libruby.2.2.0.dylib 0x00000001082e82f2 rb_bug_context + 466
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 2 libruby.2.2.0.dylib 0x00000001083bccf3 sigsegv + 83
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 3 libsystem_platform.dylib 0x00007fff841a352a _sigtramp + 26
[Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 4 libruby.2.2.0.dylib 0x0000000108d58886 newobj_of + 45
我已经降级 Ruby 2.2.2 -> 2.2.1 并且它可以工作。所以我敢打赌就是这样,我的问题是为什么它在 运行 rails s.
时工作正常