Giter VIP home page Giter VIP logo

Comments (3)

garlou avatar garlou commented on June 15, 2024 1

@palkan Thank you so much for your help. The cause of the problem was the nginx location /cable ... being on the wrong place of the config file. It is working great now 👍

from anycable-rails.

palkan avatar palkan commented on June 15, 2024

Hey @garlou!

config.action_cable.url = "wss://my_staging_url.com/cable"

Are you sure the url is correct? You should point it to anycable-go server, which us running on port :3333:

INFO 2019-04-10T10:31:54.843Z context=http Starting HTTP server at localhost:3335

The exception indicates that your client is trying to connect to a built-in Action Cable server; this line:

in new'#12/opt/mdrevccm3_staging/shared/bundle/ruby/2.6.0/gems/actioncable-5.1.7/lib/action_cable/server/base.rb:28:in

Also, do you have an explicit mount ActionCabe.server => "/cable" in your routes.rb?

from anycable-rails.

garlou avatar garlou commented on June 15, 2024

Hi @palkan. Thanks for the quick reply.

Yes, the url is correct and I changed the port of anycable-go by specifying --host=localhost --port=3335 when starting the anycable-go server.

I also have this configs on my nginx proxy which works well for other environments:

...
upstream puma_staging_ws {
  server localhost:3335;
}
...
location /cable {
    proxy_pass http://puma_staging_ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto https;
    proxy_redirect off;
  }
...

The exception indicates that your client is trying to connect to a built-in Action Cable server; this line:

Is there a way to confirm this? I don't have mount ActionCabe.server => "/cable" anywhere on the code.

Thanks once again

from anycable-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.