-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Timeout when deploying on Bluemix #340
Comments
Even I change the Procfile to run as % cat Procfile
worker: node app.js A log says... It looks down after 1 min. Probably setting timeout as 1 min.
|
I'm also developing a bot with Bluemix, you need to have a server running (Express, or make one with Botkit) and set it up with the |
Hi @SHBelsky , Thanks for the info. It runs with Blumix after adding the code below which sets express web server. It's a bit bothersome to need a extra job, since other public cloud like heroku and azure web app don't need it. It might be a cloud foundry policy, though... const port = process.env.VCAP_APP_PORT || 3000;
controller.setupWebserver(port, function(err,webserver) {
controller.createWebhookEndpoints(controller.webserver);
}); |
@mttrs is it required to set up this webserver even when just communicating with RTM via websockets? running into something similar using a container service with docker |
@aeweidne you don't need to create a webserver if you're using Slack. Just doing edited this because I confused this GitHub topic with a different one :p |
@aeweidne , |
@mttrs Is there a specific port that I need to expose on my container in order to take advantage of websockets? It's working fine locally and on a virtual machine but inside my container it is hanging without connecting. |
@aeweidne , |
@mttrs I am using a regular Docker container now, after moving on from Bluemix, and the websocket connection appears to close randomly after responding in chat. The node process on the container is still running, so it's not crashing. Going to try to use debug mode to get to the bottom of it. Thanks for the help after turning on debug mode: this is the error I'm getting intermittently:
|
@aeweidne did you open the port 443 for SSL connection to slack.com? |
I tried the same and seems like cloudfoundry/bluemix tries to ping the app after deploying and doesn't start the app if it is unable to find a port to connect with. @mttrs solution worked.
|
@aeweidne , |
I'm getting an error regarding timeout. The log says a correct listening port should be set. Should I set up a web server instead of just using
controller.spawn() and startRTM() function
?Code: same as Basic Usage code
The text was updated successfully, but these errors were encountered: