Always I am indebted.
I'm trying to create a chat function using Action Cable on EC2 on AWS.
I am connecting via HTTPS using a load balancer.
Amazon Linux release 2 (Karoo)
Ruby version: 2.6.1
First of all, when I looked at the console of the browser, I got the following error.
failed: Error during WebSocket handshake: Unexpected response code: 404
This error occurred both when connecting with https and when connecting with http, but when nginx is stopped and connected on port 3000 without going through the load balancer, it disappears and it becomes possible to perform the intended movement using Action Cable. I will.
Refer to the following site, replace http part with https, but another error continues to appear.
failed: WebSocket is closed before the connection is established.
The color of the error has changed from red to yellow, but the Action Cable isn't working.
In this case as well, HTTPS/HTTP does not connect, and it works only on port 3000.
How should I run ActionCable under https environment?
It doesn't matter if it is a reference site, so I would appreciate it if you could teach me the appropriate method.
Answer # 1
Since there was a problem with the content of the question, I would like to close it once, organize it, and then ask another question.
- ruby on rails - not saved by create action
- ruby on rails - when calling the create action, the name attribute changes depending on whether it is indexhtmlerb or newhtmlerb
- ruby on rails - about rails create action
- ruby - [rails] i want to create an image link using the url of the image output using active storage
- ruby - i can't "rails db: create rails_env = production" on aws
- ruby on rails - unable to create controller
- ruby on rails 5 - rails: create an administrator screen using activeadmin colors of other pages change
- ruby on rails - i want to create an image posting function with react (typescript), formik, rails api, activestorage
- ruby - [rails aws ec2] action cable works on port 3000 on aws, but an error occurs on port 80 (http)
- ruby on rails - rails likes feature doesn't show up until you reload the page after clicking like
- ruby - data is not updated by update action rails
- ruby on rails - cannot pass id to destroy action of intermediate table
- ruby - about rails controller new action
- ruby - i can't create a custom account with rails stripe
- ruby - unable to create rails model (environment: cloud9)
- ruby on rails - unknown action error when trying to post a comment
- ruby - nomethoderror occurs in create action
- ruby on rails - i'm trying to create a container in docker but it doesn't work i want to create a container
- ruby on rails - i get an error with rails db: create
- i can't start mysql on ec2
- ruby on rails - error with automatic deployment by capistrano
- ruby on rails - the image cannot be saved in s3 and cannot be displayed in the view aws :: sigv4 :: errors :: missingcredentials
- ruby on rails - i implemented it so that images can be saved in s3 of aws, but the view can no longer be displayed
- ruby - how to upload images directly from rails to s3 on aws
- nginx - bundler: failed to load command: unicorn cannot start with an error saying unicorn_rails
- ruby - an error occurred when implementing the micropost search function using ransack
- ruby - resolve rspec mysql foreignkey error
- ruby on rails - s3 images are not saved on the ec2 server