遇到“HPE_HEADER_OVERFLOW 代理请求时出错。”在浏览器中,
当我通过浏览器中的链接调用我的应用程序时,它会显示“HPE_HEADER_OVERFLOW:请求无法代理”,
我正在将 Rails5.2 应用程序升级到 Rails7。我正处于从 6.0 到 6.1 的阶段(使用 Ruby 3.1.1),
我正在 AWS:Cloud9 上进行开发,
rails 跟踪看起来很干净:
'Started GET "/d/users/sign_in" for 73.127.89.253 at 2022-03-23 21:52:51 +0000 <
Cannot render console from 73.127.89.253! Allowed networks: 127.0.0.0/127.255.255.255, ::1
Processing by Devise::SessionsController#new as HTML
Rendering layout layouts/application.html.erb
Rendering devise/sessions/new.html.erb within layouts/application
Rendered devise/shared/_links.html.erb (Duration: 1.3ms | Allocations: 526)
Rendered devise/sessions/new.html.erb within layouts/application (Duration: 470.4ms | Allocations: 412889)
Rendered layouts/_flash_messages_dro.html.erb (Duration: 0.3ms | Allocations: 154)
Rendered layouts/_header.html.erb (Duration: 3.3ms | Allocations: 2347)
Rendered layout layouts/application.html.erb (Duration: 700.8ms | Allocations: 652111)
Completed 200 OK in 736ms (Views: 705.6ms | ActiveRecord: 4.8ms | Allocations: 672243)'
对于背景:我正在 AWS-Cloud9 上进行开发。该应用程序在 5.1 中运行良好,在 Rails6.0 上也运行良好。然后我将 ruby 更新到 3.1.1,然后将 Rails 更新到 6.1,并找出日志中显示的错误。现在,当我按如下方式启动服务器时:使用运行脚本:'
export PATH=/home/ubuntu/.rvm/gems/ruby-3.1.1/bin:/home/ubuntu/.rvm/gems/ruby-3.1.1@global/bin:/home/ubuntu/.rvm/rubies/ruby-3.1.1/bin:/home/ubuntu/.rvm/bin:/home/ubuntu/.nvm/versions/node/v6.17.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubuntu/.local/bin:/home/ubuntu/bin:/snap/bin
export GEM_HOME=/home/ubuntu/.rvm/gems/ruby-3.1.1
export GEM_PATH=/home/ubuntu/.rvm/gems/ruby-3.1.1:/home/ubuntu/.rvm/gems/ruby-3.1.1@global
cd /home/ubuntu/environment/twf
rails server -u puma -b localhost'
服务器启动得很好,当我调用链接时,它似乎确实按照 Rails 日志启动,并完成 200 OK,但现在我确实收到一条浏览器消息:' HPE_HEADER_OVERFLOW:无法代理请求! 代理请求时出错。”
有人提示我从哪里开始寻找吗?我用 google 搜索,找到了 2017 年的日语页面,但那是针对 cloud9 上的 Phyton,而不是 Rails。
非常感谢任何帮助……甚至我必须回答以获得更多背景知识的问题都很好。
when I call my app via the link in the browser it comes with 'HPE_HEADER_OVERFLOW: Request could not be proxied'
I am in the process of upgrading my Rails5.2 app to Rails7. I am at step from 6.0 to 6.1 (with Ruby 3.1.1)
I am doing the development on AWS:Cloud9
the rails trace looks clean:
'Started GET "/d/users/sign_in" for 73.127.89.253 at 2022-03-23 21:52:51 +0000 <
Cannot render console from 73.127.89.253! Allowed networks: 127.0.0.0/127.255.255.255, ::1
Processing by Devise::SessionsController#new as HTML
Rendering layout layouts/application.html.erb
Rendering devise/sessions/new.html.erb within layouts/application
Rendered devise/shared/_links.html.erb (Duration: 1.3ms | Allocations: 526)
Rendered devise/sessions/new.html.erb within layouts/application (Duration: 470.4ms | Allocations: 412889)
Rendered layouts/_flash_messages_dro.html.erb (Duration: 0.3ms | Allocations: 154)
Rendered layouts/_header.html.erb (Duration: 3.3ms | Allocations: 2347)
Rendered layout layouts/application.html.erb (Duration: 700.8ms | Allocations: 652111)
Completed 200 OK in 736ms (Views: 705.6ms | ActiveRecord: 4.8ms | Allocations: 672243)'
For background: I am developing on AWS-Cloud9. The app ran great in 5.1, and also great on Rails6.0. Then I updated ruby to 3.1.1 and then rails to 6.1 and worked out the errors that would show in the logs. Now when I start the server as follows: with a run script: '
export PATH=/home/ubuntu/.rvm/gems/ruby-3.1.1/bin:/home/ubuntu/.rvm/gems/ruby-3.1.1@global/bin:/home/ubuntu/.rvm/rubies/ruby-3.1.1/bin:/home/ubuntu/.rvm/bin:/home/ubuntu/.nvm/versions/node/v6.17.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubuntu/.local/bin:/home/ubuntu/bin:/snap/bin
export GEM_HOME=/home/ubuntu/.rvm/gems/ruby-3.1.1
export GEM_PATH=/home/ubuntu/.rvm/gems/ruby-3.1.1:/home/ubuntu/.rvm/gems/ruby-3.1.1@global
cd /home/ubuntu/environment/twf
rails server -u puma -b localhost'
the server starts just fine, and when I call the link it does seem to start per rails log, and completes 200 OK but now I do get a browser message: 'HPE_HEADER_OVERFLOW: Request could not be proxied!
There was an error proxying the request.'
Does anybody have a hint for me on where to start looking. I googled it and found a page in Japanese from 2017 but that was for Phyton on cloud9 and not rails.
Any help is greatly appreciated.... even questions I would have to answer to get more background are all good.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论