0

我在heroku上使用带有actioncable的rails 5,我只在生产中遇到这个错误

WebSocket connection to 'wss://adham-chatty.heroku.com/cable' failed: WebSocket opening handshake was canceled

我想是因为彪马

2016-01-21T23:33:56.372977+00:00 heroku[web.1]: Starting process with command `bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}`
2016-01-21T23:33:57.651242+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-21T23:33:58.721808+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2016-01-21T23:33:58.873303+00:00 app[web.1]: [3] === puma shutdown: 2016-01-21 23:33:58 +0000 ===
2016-01-21T23:33:58.873305+00:00 app[web.1]: [3] - Goodbye!
2016-01-21T23:33:58.910391+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-01-21T23:33:58.910405+00:00 app[web.1]: [3] * Version 2.15.3 (ruby 2.2.3-p173), codename: Autumn Arbor Airbrush
2016-01-21T23:33:58.910407+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2016-01-21T23:33:58.910409+00:00 app[web.1]: [3] * Environment: production
2016-01-21T23:33:58.910429+00:00 app[web.1]: [3] * Process workers: 2
2016-01-21T23:33:58.910453+00:00 app[web.1]: [3] * Preloading application
2016-01-21T23:33:59.632680+00:00 heroku[web.1]: Process exited with status 0
4

1 回答 1

0

我刚刚花了一个晚上,让我的 rails 5 ActionCable 应用程序在 Heroku 上运行得非常好。我在这里经历了很多麻烦后写下了我学到的东西:http: //www.whodya.com/posts/19632。我从上面的错误消息中猜想是,嗯,与我有一段时间完全相同的问题。您正在尝试使用 wss: 进行连接,但这仅在您在服务器上使用 SSL/HTTPS 时才有效。尝试 ws: 代替,直到您启动并运行 HTTPS。同样,我的文章在这里(http://www.whodya.com/posts/19632),带有我的配置/设置/等。

-约翰

于 2016-04-05T18:50:46.880 回答