-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissions Error when Deploying AnyCable to Heroku #175
Comments
Upgrading the Heroku Stack from 20 to 22, and ruby version from 3.0.3 to 3.1.2 didn't help in any way. |
I was able to get this error fixed and the process itself to actually run. But the issue is now that Heroku does not support HTTP/2. AnyCable cannot run on Heroku no matter what you do. Don't waste your time folks! |
Please, read the documentation carefully. AnyCable runs on Heroku without any problems. Proved by many production installations. Our demo application also runs on Heroku (latest stack): https://demo.anycable.io/ |
@palkan I can send you a video of following the documentation carefully. As you're aware, it doesn't take long to get set up. So far, every engineer I talk to has told me that it's not possible. And after following the docs, I don't know what else to say about it. Happy to update my comment though, if I find otherwise. I think even the Procfile didn't have the intended effect on Heroku? Or was that just me? |
It's not possible to have HTTP2 on Heroku accessible from the outside. But no one can stop us from using it within a dyno. From the docs:
"every engineer" != "every good engineer"
My app uses the same Procfile as in the docs; you can find the source code here: anycable/anycable_rails_demo#4 From the exception, it seems that gRPC server tried to listen on the 0.0.0.0. Since you don't specify this address in the Procfile, it could be either defined via env ( The default value is "127.0.0.1". You can debug configuration by running the following command: |
I was able to get the process to spin up and listen with this as the If I'm not mistaken, that should satisfy the "ANYCABLE_RPC_HOST" variable requirement. Once I added this, I can confirm that the process spun up properly in debug mode and was listening correctly. The issue that made me (and others) determine that we weren't able to do it on Heroku was that when a message was sent, it wouldn't actually deliver messages to the client. This is the error that would occur:
But it did actually receive the message itself:
I'm not sure why there's this remaining problem? I'll definitely try again. By the way you make it sound, I was close to having it done before I took everything down? |
The error says that is says: the RPC address value for anycable-go is invalid, it must include a port as well. Do you the ANYCABLE_RPC_HOST config var set? You should remove it (as well as |
Which anycable-go version do you run? |
I do have ANYCABLE_RPC_HOST config var set (as well as ANYCABLE_HOST), both of which were "0.0.0.0". I'll remove I was running the default version. IIRC 1.1.0? |
Hm. It must have been either the addition of It does in fact work now. Using anycable-go 1.1.0. "every engineer" != "every good engineer" indeed 🤷♂️ |
@palkan can you remove the invalid tag. This has been solved. Thank you very much! |
Tell us about your environment
Ruby 3.0.3
Rails 7.0.3.1
Gem versions:
anycable 1.2.3
anycable-rails ~> 1.3, >= 1.3.4
grpc ~> 1.37
What did you do?
Tried to deploy to Heroku after following the documentation exactly. Using the procfile provided at the top. https://docs.anycable.io/deployment/heroku?id=heroku-deployment
What did you expect to happen?
The AnyCable server should start and begin listening on the heroku app, as it does in development environments. This is what happens when I run the command locally:
What actually happened?
The app crashes upon starting. It appears as though there's some issue binding the address
0.0.0.0
in production. Is this due to Heroku not supporting HTTP/2? Or should I pass the--rpc-host
flag something very specific? I have been trying to deploy by passing the --rpc-host flag various things and none of them seem to work.It could be that as Heroku has updated their system, this configuration is no longer allowed? Perhaps downgrading my Heroku stack from 20 to a lower number?
The text was updated successfully, but these errors were encountered: