首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法调用应用程序。对"curl 'http://localhost:3564/‘-s --fail 2>&1“derailed_benchmarks gem的错误请求

无法调用应用程序。对"curl 'http://localhost:3564/‘-s --fail 2>&1“derailed_benchmarks gem的错误请求
EN

Stack Overflow用户
提问于 2020-10-21 20:12:27
回答 1查看 66关注 0票数 0

我收到如下粘贴的错误消息:

代码语言:javascript
复制
% USE_SERVER=puma bundle exec derailed exec perf:mem_over_time
Booting: production
docking_dev already exists
Endpoint: "/"
Port: 3857
Server: "puma"
[4990] Puma starting in cluster mode...
[4990] * Version 3.7.0 (ruby 2.3.3-p222), codename: Snowy Sagebrush
[4990] * Min threads: 5, max threads: 5
[4990] * Environment: production
[4990] * Process workers: 2
[4990] * Preloading application
[4990] * Listening on tcp://0.0.0.0:3000
[4990] Use Ctrl-C to stop
[4990] - Worker 0 (pid: 5013) booted, phase: 0
[4990] - Worker 1 (pid: 5014) booted, phase: 0
PID: 4990
149.67578125
Couldn't call app.
Bad request to "curl  'http://localhost:3857/' -s --fail 2>&1" 

***RESPONSE***:

""
[5014] ! Detected parent died, dying
[5013] ! Detected parent died, dying

我检查了RAILS_ENV=production rails serverRAILS_ENV=production rails console,它们都像预期的那样工作。我还需要检查什么才能使其正常工作。这是因为我的http://localhost:3000/ url启用了身份验证吗?我检查了一下,我把force_ssl转成了false。我查看了this的帖子,它显示没有帮助。

我也不知道为什么每次我运行它的时候,它都会随机选择一些端口,就像这个粘贴的端口是3857。但我的应用在本地使用3000端口运行。是否需要做些什么才能使它使用相同的端口3000?

附注:为什么是随机端口?我是从gem code那里知道的。

EN

回答 1

Stack Overflow用户

发布于 2020-10-21 20:49:44

好吧,我把它修好了。在我的例子中,当用户未登录时,根url将重定向到登录页面。所以这导致了gem的错误请求,此时它似乎无法正确地处理302。所以我把它修好了。

代码语言:javascript
复制
PATH_TO_HIT="/login"  bundle exec derailed exec perf:mem_over_time

是的,我还必须删除USE_SERVER=puma,因为它也会导致错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64463254

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档