生产模式下椋鸟/工作鸟的问题

发布于 2024-07-25 04:31:40 字数 1555 浏览 7 评论 0原文

我有一个具有异步处理功能的 Rails 应用程序,但我无法使其在生产模式下工作。 我从应用程序的根部开始,如下所示:

starling -d -P tmp/pids/starling.pid -q log/

然后我第一次运行此程序时开始像这样工作

./script/workling_client start -t

,它抱怨因为没有开发数据库,​​所以我创建了一个开发数据库,​​当我重新启动工作时,该错误消失了。 但是当我尝试实际运行异步进程时,我在 log/development.log 中收到此消息,

Workling::QueueserverNotFoundError (config/workling.yml configured to connect to queue server on localhost:15151 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it.

因此,我运行

sudo killall starling

然后从应用程序的根目录重新启动 starling,如下所示:

starling -d -P tmp/pids/starling.pid -q log/ -p 15151

这似乎工作正常,但是当我尝试启动时再次使用此 script/workling_client start -t 工作,我在控制台中收到此消息

/var/rails-apps/daisi/vendor/plugins/workling/lib/workling/clients/memcache_queue_client.rb:68:in `raise_unless_connected!': config/workling.yml configured to connect to queue server on localhost:22122 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it. If you don't want to use Starling, then explicitly set Workling::Remote.dispatcher (see README for an example) (Workling::QueueserverNotFoundError)

因此,我尝试更改工作插件内的 config/workling.yml 文件以使生产和开发都监听 15151,但这不起作用,然后我在 22122 上尝试了这两个,仍然没有骰子,所以我尝试了一个随机端口,但无论我在 workling.yml 文件中放入什么,它仍然给出完全相同的行为

I have a rails app that has asynchronous processing, and I'm having trouble getting it to work in production mode. I start starling from the root of the application like so:

starling -d -P tmp/pids/starling.pid -q log/

then I start workling like this

./script/workling_client start -t

the first time I ran this, it complained because there was no development database, so I created a development database, and that error went away when I restarted workling.
but when I try to actually run an asynchronous process, I get this message in log/production.log

Workling::QueueserverNotFoundError (config/workling.yml configured to connect to queue server on localhost:15151 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it.

so, I run

sudo killall starling

then restart starling from the root of the application like this:

starling -d -P tmp/pids/starling.pid -q log/ -p 15151

which seems to work fine, but then when I try to start workling again with this script/workling_client start -t, I get this message in the console

/var/rails-apps/daisi/vendor/plugins/workling/lib/workling/clients/memcache_queue_client.rb:68:in `raise_unless_connected!': config/workling.yml configured to connect to queue server on localhost:22122 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it. If you don't want to use Starling, then explicitly set Workling::Remote.dispatcher (see README for an example) (Workling::QueueserverNotFoundError)

So, I tried changing the config/workling.yml file inside the workling plugin to make both production and development listen on 15151, that didn't work, then I tried both of them on 22122, still no dice, so I tried a random port, but it still gives the exact same behaviour no matter what I put in the workling.yml file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

⒈起吃苦の倖褔 2024-08-01 04:31:40

答案是八哥必须这样开始:

RAILS_ENV=production ./script/workling_client start -t

the answer is that starling has to be started as such:

RAILS_ENV=production ./script/workling_client start -t
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文