I'm not sure what I'm doing wrong, but I'm trying to follow this article. I have the following Procfile:
web: node index.js
worker: node bot.js
clock: node clock.js
and inside my clock.js, I have:
var CronJob = require('cron').CronJob;
var bot = require('./bot.js');
new CronJob({
cronTime: "* * * * *",
onTick: bot.start(),
start: true,
timeZone: "America/Los_Angeles"
});
and my bot.js is structured like so:
var config = require('./config');
// ... other includes
module.exports = {
start: function() {
// code
}
}
My structure matches the article pretty much exactly, but what's going on? Here are my logs:
2016-12-16T06:00:48.935847+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-12-16T06:00:49.332925+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2016-12-16T06:00:49.736519+00:00 heroku[clock.1]: Starting process with command `node clock.js`
2016-12-16T06:00:50.058125+00:00 heroku[worker.1]: State changed from starting to up
2016-12-16T06:00:50.395082+00:00 heroku[clock.1]: State changed from starting to up
2016-12-16T06:00:51.899971+00:00 app[web.1]: app running on port 21470
2016-12-16T06:00:52.505353+00:00 heroku[worker.1]: State changed from up to crashed
2016-12-16T06:00:52.491705+00:00 heroku[worker.1]: Process exited with status 0
2016-12-16T06:00:52.698864+00:00 heroku[web.1]: State changed from starting to up
So I can see that I'm starting up the worker (which does nothing) and it then crashes. Then my clock starts up , but never calls the worker again? It's definitely not starting up every minute.
Is the article I followed old and no longer applies? How should I correctly call the worker?
Do you have a process.exit(0) command somewhere in bot.start()?
Heroku crashes a dyno when it comes across the command (see this link for more info). If you remove that, it should potentially solve the problem. It would be helpful to post the full bot.start function to verify.
Related
I want to set up Gatsby on Heroku. I have followed the steps from https://www.gatsbyjs.org/docs/deploying-to-heroku/ and created a Procfile as described here https://devcenter.heroku.com/articles/procfile, but I'm still getting a timeout error on deploy. It seems like the port is starting to work, but for some reason it stops.
I've tried different lines to put in Procfile, but none of them worked. Currently I have web: gatsby serve --port $PORT - this is the last thing that I've tried putting in this file. Also I tried with web: npm start -- --port $PORT and other options that can be googled easily.
2019-10-24T23:06:52.707649+00:00 app[web.1]:
2019-10-24T23:07:49.930330+00:00 heroku[web.1]: State changed from starting to crashed
2019-10-24T23:07:49.832843+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-10-24T23:07:49.832843+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-10-24T23:07:49.910127+00:00 heroku[web.1]: Process exited with status 137
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2019-10-24T23:06:52.444262+00:00 app[web.1]: ║ To learn more, checkout https://gatsby.dev/telemetry ║
2019-10-24T23:06:52.444263+00:00 app[web.1]: ║ ║
2019-10-24T23:06:52.444264+00:00 app[web.1]: ╚════════════════════════════════════════════════════════════════════════╝
2019-10-24T23:06:52.445563+00:00 app[web.1]:
2019-10-24T23:06:52.707515+00:00 app[web.1]: [2K[1A[2K[Ginfo gatsby serve running at: http://localhost:4563/
2019-10-24T23:06:52.707649+00:00 app[web.1]:
2019-10-24T23:07:49.930330+00:00 heroku[web.1]: State changed from starting to crashed
2019-10-24T23:07:49.832843+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-10-24T23:07:49.832843+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-10-24T23:07:49.910127+00:00 heroku[web.1]: Process exited with status 137
Any ideas how can I get it working?
You would want to use gatsby build and not gatsby serve as the latter is meant for testing locally. gatsby build will give you static assets and speed optimizations. Try to remove the Procfile and then Heroku should catch the build command in package.json.
As a way to try to teach myself a bit of Node and how to use Heroku, I decided to create a simple Twitter bot that should tweet once a day.
When running my bot manually, everything goes fine and it tweets as it should. Once on Heroku, even before I added a scheduler (to run my bot once a day), it started tweeting at random times. I have to keep deleting them. I noticed in the logs, the bot keeps crashing and restarting, which triggers the tweet.
I have Googled for hours and cannot figure out why this is happening. I'm brand new to Node and anything to do with servers in general, so I'm really not sure how to troubleshoot from this point.
I'd appreciate any help in figuring out what is causing my bot to crash.
(I should note, I do have it set up as a worker on Heroku, and that is in my Procfile. Not sure if this makes a difference.)
Heroku Logs:
2018-07-08T16:21:10.427313+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T16:21:11.167238+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T16:21:15.159855+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T16:21:15.056356+00:00 heroku[worker.1]: Process exited with status 0
2018-07-08T16:56:32.097321+00:00 heroku[worker.1]: State changed from crashed to starting
2018-07-08T16:56:36.064795+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T16:56:36.789264+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T16:56:40.212853+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T16:56:40.170153+00:00 heroku[worker.1]: Process exited with status 0
2018-07-08T17:08:08.000000+00:00 app[api]: Build started by user myemailaddress
2018-07-08T17:08:23.727988+00:00 app[api]: Deploy 852c8541 by user myemailaddress
2018-07-08T17:08:23.727988+00:00 app[api]: Release v17 created by user myemailaddress
2018-07-08T17:08:24.186005+00:00 heroku[worker.1]: State changed from crashed to starting
2018-07-08T17:08:24.000000+00:00 app[api]: Build succeeded
2018-07-08T17:08:26.514939+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T17:08:27.156637+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T17:08:28.631772+00:00 heroku[worker.1]: Process exited with status 0
2018-07-08T17:08:28.723695+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T17:08:28.725787+00:00 heroku[worker.1]: State changed from crashed to starting
2018-07-08T17:08:31.479079+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T17:08:32.358515+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T17:08:33.922886+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T17:08:33.878013+00:00 heroku[worker.1]: Process exited with status 0
2018-07-08T17:12:36.000000+00:00 app[api]: Build started by user myemailaddress
2018-07-08T17:12:48.895075+00:00 app[api]: Release v18 created by user myemailaddress
2018-07-08T17:12:48.895075+00:00 app[api]: Deploy 1fbb896c by user myemailaddress
2018-07-08T17:12:49.246800+00:00 heroku[worker.1]: State changed from crashed to starting
2018-07-08T17:12:49.000000+00:00 app[api]: Build succeeded
2018-07-08T17:12:53.635812+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T17:12:54.327615+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T17:12:57.874384+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T17:12:57.852555+00:00 heroku[worker.1]: Process exited with status 0
2018-07-08T17:35:48.475654+00:00 heroku[worker.1]: State changed from crashed to starting
2018-07-08T17:35:52.257156+00:00 heroku[worker.1]: Starting process with command `node bot.js`
2018-07-08T17:35:52.995975+00:00 heroku[worker.1]: State changed from starting to up
2018-07-08T17:35:56.888137+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-08T17:35:56.871199+00:00 heroku[worker.1]: Process exited with status 0
Bot source code:
https://github.com/meowwwls/words-of-tori-amos/blob/master/bot.js
const twit = require('twit');
const getVideo = require('./youtube');
const { getLyrics } = require('./lyricadder/lyrics');
const { randomNumber } = require('./helpers');
const config = {
consumer_key: process.env.consumer_key,
consumer_secret: process.env.consumer_secret,
access_token: process.env.access_token,
access_token_secret: process.env.access_token_secret
};
const Twitter = new twit(config);
const lyrics = getLyrics();
const tweetLyric = () => {
const random = randomNumber(lyrics.length);
const lyric = lyrics[random];
getVideo(lyric.song).then(response => {
const songHash = lyric.song.replace(/\s/g, '');
const tweet = {
status: `${lyric.lyric}\n${response} #ToriAmos #${songHash}`
};
Twitter.post('statuses/update', tweet, (err, data, response) => {
if (err) {
console.log(err);
}
});
});
};
tweetLyric();
Solved by Heroku support! This was driving me mad. I thought I would share the support answer in case someone else ever comes across this issue. I think the reason Twitter bot tutorials I read didn't have this issue is they all had their bots doing other things as well, such as responding to hashtags, followers, or tweets sent to their bot. Or they were using setInterval to tweet, which kept the app running constantly.
I followed this advice and it has been running perfectly.
The reason for both the crashing is that you are not running a process on your worker dynos, you are just issuing the command to tweet and exiting, heroku web and worker dynos are designed to work off of long running tasks, so your worker is starting, doing a tweet then abruptly exiting and crashing, causing us to detect the crash and spin up a new worker, which just does the same thing round and round in a loop.
If you only want to run the scheduled tweets you can just delete your Procfile and scale down your web and worker dynos, the scheduler will start a separate one-off dyno whenever you have it scheduled too which will run your tweet script for you and exit.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 10 months ago.
The community reviewed whether to reopen this question 10 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Okay, so I've been on this problem for hours now with no idea how to solve this, since I'm just a newbie. I was following a UDEMY course titled WEBDEVBOOTCAMP by Colt Steele. On the deployment section, every time I deploy using Heroku, this gives me a "Method not allowed". I've been following Colt's ways from scratch and that's why I wonder how come it's like this.
These are the Heroku logs that I've been receiving:
2017-08-07T21:45:10.990742+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-07T21:45:14.881336+00:00 app[web.1]:
2017-08-07T21:45:14.881350+00:00 app[web.1]: > v1#1.0.0 start /app
2017-08-07T21:45:14.881352+00:00 app[web.1]:
2017-08-07T21:45:14.881351+00:00 app[web.1]: > node app.js
2017-08-07T21:45:16.594550+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2017-08-07T21:45:16.594555+00:00 app[web.1]: designed for a production
environment, as it will leak
2017-08-07T21:45:16.594556+00:00 app[web.1]: memory, and will not scale past a single process.
2017-08-07T21:45:16.610398+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
2017-08-07T21:45:16.612243+00:00 app[web.1]: The Yelp Camp Server is up!
2017-08-07T21:45:16.665653+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
2017-08-07T21:45:16.914410+00:00 heroku[web.1]: State changed from starting to up
2017-08-07T21:54:00.075655+00:00 app[api]: Starting process with command `ls` by user lao_tabudlong#yahoo.com
2017-08-07T21:54:03.051279+00:00 heroku[run.4055]: Awaiting client
2017-08-07T21:54:03.090885+00:00 heroku[run.4055]: Starting process with command `ls`
2017-08-07T21:54:03.268924+00:00 heroku[run.4055]: State changed from starting to up
2017-08-07T21:54:08.289699+00:00 heroku[run.4055]: Process exited with status 0
2017-08-07T21:54:08.303853+00:00 heroku[run.4055]: State changed from up to complete
2017-08-07T22:16:51.093190+00:00 heroku[web.1]: Idling
2017-08-07T22:16:51.093810+00:00 heroku[web.1]: State changed from up to down
2017-08-07T22:16:52.026960+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-08-07T22:16:52.187881+00:00 heroku[web.1]: Process exited with status 143
2017-08-07T22:38:33.000000+00:00 app[api]: Build started by user lao_tabudlong#yahoo.com
2017-08-07T22:38:44.152229+00:00 heroku[web.1]: State changed from down to starting
2017-08-07T22:38:43.802847+00:00 app[api]: Deploy 8174904f by user lao_tabudlong#yahoo.com
2017-08-07T22:38:43.802847+00:00 app[api]: Release v5 created by user lao_tabudlong#yahoo.com
2017-08-07T22:38:33.000000+00:00 app[api]: Build succeeded
2017-08-07T22:38:45.764651+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-07T22:38:48.251552+00:00 app[web.1]:
2017-08-07T22:38:48.251586+00:00 app[web.1]: > yelpcamp#1.0.0 start /app
2017-08-07T22:38:48.251586+00:00 app[web.1]: > node app.js
2017-08-07T22:38:48.251587+00:00 app[web.1]:
2017-08-07T22:38:49.001981+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2017-08-07T22:38:49.001994+00:00 app[web.1]: designed for a production environment, as it will leak
2017-08-07T22:38:49.001995+00:00 app[web.1]: memory, and will not scale past a single process.
2017-08-07T22:38:49.018239+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
2017-08-07T22:38:49.020061+00:00 app[web.1]: The Yelp Camp Server is up!
2017-08-07T22:38:49.043200+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
2017-08-07T22:38:49.214038+00:00 heroku[web.1]: State changed from starting to up
2017-08-07T23:10:56.925104+00:00 heroku[web.1]: Idling
2017-08-07T23:10:56.925706+00:00 heroku[web.1]: State changed from up to down
2017-08-07T23:10:58.007504+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-08-07T23:10:58.359969+00:00 heroku[web.1]: Process exited with status 143
2017-08-08T04:47:35.000000+00:00 app[api]: Build started by user lao_tabudlong#yahoo.com
2017-08-08T04:47:45.285929+00:00 heroku[web.1]: State changed from down to starting
2017-08-08T04:47:35.000000+00:00 app[api]: Build succeeded
2017-08-08T04:47:45.069248+00:00 app[api]: Release v6 created by user lao_tabudlong#yahoo.com
2017-08-08T04:47:45.069248+00:00 app[api]: Deploy f14ef4fc by user lao_tabudlong#yahoo.com
2017-08-08T04:47:46.628278+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-08T04:47:48.774464+00:00 app[web.1]:
2017-08-08T04:47:48.774484+00:00 app[web.1]: > yelpcamp#1.0.0 start /app
2017-08-08T04:47:48.774485+00:00 app[web.1]: > node app.js
2017-08-08T04:47:48.774486+00:00 app[web.1]:
2017-08-08T04:47:49.444240+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2017-08-08T04:47:49.444256+00:00 app[web.1]: designed for a production environment, as it will leak
2017-08-08T04:47:49.444256+00:00 app[web.1]: memory, and will not scale past a single process.
2017-08-08T04:47:49.454406+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
2017-08-08T04:47:49.455893+00:00 app[web.1]: The Yelp Camp Server is up!
2017-08-08T04:47:49.472576+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
2017-08-08T04:47:49.919585+00:00 heroku[web.1]: State changed from starting to up
2017-08-08T05:21:42.640479+00:00 heroku[web.1]: Idling
2017-08-08T05:21:42.641117+00:00 heroku[web.1]: State changed from up to down
2017-08-08T05:21:43.112034+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-08-08T05:21:43.397138+00:00 heroku[web.1]: Process exited with status 143
2017-08-08T05:35:24.000000+00:00 app[api]: Build started by user lao_tabudlong#yahoo.com
2017-08-08T05:35:34.046061+00:00 app[api]: Release v7 created by user lao_tabudlong#yahoo.com
2017-08-08T05:35:34.046061+00:00 app[api]: Deploy 52579a31 by user lao_tabudlong#yahoo.com
2017-08-08T05:35:34.347211+00:00 heroku[web.1]: State changed from down to starting
2017-08-08T05:35:24.000000+00:00 app[api]: Build succeeded
2017-08-08T05:35:36.040512+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-08T05:35:38.881422+00:00 app[web.1]:
2017-08-08T05:35:38.881446+00:00 app[web.1]: > yelpcamp#1.0.0 start /app
2017-08-08T05:35:38.881447+00:00 app[web.1]: > node app.js
2017-08-08T05:35:38.881448+00:00 app[web.1]:
2017-08-08T05:35:39.981312+00:00 heroku[web.1]: State changed from starting to up
2017-08-08T05:35:39.914694+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2017-08-08T05:35:39.914717+00:00 app[web.1]: designed for a production environment, as it will leak
2017-08-08T05:35:39.914718+00:00 app[web.1]: memory, and will not scale past a single process.
2017-08-08T05:35:39.932988+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
2017-08-08T05:35:39.935319+00:00 app[web.1]: The Yelp Camp Server is up!
2017-08-08T05:35:39.967512+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
2017-08-08T05:49:20.000000+00:00 app[api]: Build started by user lao_tabudlong#yahoo.com
2017-08-08T05:49:31.423119+00:00 heroku[web.1]: Restarting
2017-08-08T05:49:31.425641+00:00 heroku[web.1]: State changed from up to starting
2017-08-08T05:49:31.128129+00:00 app[api]: Deploy 98890a0e by user lao_tabudlong#yahoo.com
2017-08-08T05:49:31.128129+00:00 app[api]: Release v8 created by user lao_tabudlong#yahoo.com
2017-08-08T05:49:32.024642+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-08-08T05:49:32.234319+00:00 heroku[web.1]: Process exited with status 143
2017-08-08T05:49:20.000000+00:00 app[api]: Build succeeded
2017-08-08T05:49:33.865572+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-08T05:49:36.912525+00:00 app[web.1]:
2017-08-08T05:49:36.912549+00:00 app[web.1]: > yelpcamp#1.0.0 start /app
2017-08-08T05:49:36.912550+00:00 app[web.1]: > node app.js
2017-08-08T05:49:36.912550+00:00 app[web.1]: `enter code here`
2017-08-08T05:49:38.250325+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2017-08-08T05:49:38.250352+00:00 app[web.1]: designed for a production environment, as it will leak
2017-08-08T05:49:38.250353+00:00 app[web.1]: memory, and will not scale past a single process.
2017-08-08T05:49:38.270747+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
2017-08-08T05:49:38.273329+00:00 app[web.1]: The Yelp Camp Server is up!
2017-08-08T05:49:38.314596+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.
2017-08-08T05:49:38.342241+00:00 heroku[web.1]: State changed from starting to up
From the Q&A on the webdevbootcamp video:
"Make sure you are trying to access the correct link that gets printed to the console. You shouldn't try to load the link which ends with .git since that is just the repository location.
Your link should look like https://your-app-name.herokuapp.com/"
I faced the same problem. Check your url, you might be opening the one which ends in .git. Instead go to your heroku dashboard and open the app from there using the correct url.
This Problem Bacicaly comes when you are using wrong link
Your link should be like https://test-name.herokuapp.com/
With reference to Matt's answer: -
Even if the deployment is successful, but you have not defined a html as to how the webpage should look like, then you get 'Method not allowed', meaning,
"https://your-app-name.herokuapp.com/" will have "Method not allowed".
But there is a way you can test if the deployment is done okay and you are getting Response 200.
Open jupyter notebook and run:
Reference: https://towardsdatascience.com/create-an-api-to-deploy-machine-learning-models-using-flask-and-heroku-67a011800c50
In short :
import requests
import json
# local url
url = 'https://your-app.herokuapp.com/'
# sample data
data = {'Pclass': 3
, 'Age': 2
, 'SibSp': 1
, 'Fare': 50}
data = json.dumps(data)
send_request = requests.post(url, data) #should get : Response 200
print(send_request.json())# should get predicted result
I faced the same issue while deploying a golang web app on heroku. The root cause of the issue was with how i frame the url. The url generated by heroku consisted of a trailing "/" and i was constructing the url as "heroku_url" + "/login" which resulted in heroku_url//login, try removing a / from heroku_url or from your route and give a try.
Before deploying your app make sure your project is on the main branch.
Refer: Git Branches.
I'm running a simple express app, it is pulling static files from S3, and runs fine locally, but on Heroku it crashes constantly on a warning about permission denied but with no further info.
Is there a way I could find out what is causing the permission error?
Heroku log from deploy to crash:
2011-12-26T22:41:14+00:00 heroku[slugc]: Slug compilation started
2011-12-26T22:41:19+00:00 heroku[api]: Deploy 20d0578 by jeffandersen#gmail.com
2011-12-26T22:41:19+00:00 heroku[api]: Release v20 created by jeffandersen#gmail.com
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from crashed to created
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from created to starting
2011-12-26T22:41:21+00:00 heroku[slugc]: Slug compilation finished
2011-12-26T22:41:22+00:00 heroku[web.1]: Starting process with command `node server.js`
2011-12-26T22:41:23+00:00 app[web.1]: info - socket.io started
2011-12-26T22:41:23+00:00 app[web.1]: warn - error raised: Error: EACCES, Permission denied
2011-12-26T22:41:24+00:00 heroku[web.1]: State changed from starting to crashed
2011-12-26T22:41:25+00:00 heroku[web.1]: Process exited
Are you binding the server port to the environment variable injected by Heroku, $PORT?
ANSWER: Don't put a Gemfile into the root of your Node.js project. Heroku get's confused and treats it like a Ruby app.
I am trying to follow the instructions from the Heroku documentation but am receiving an error: "No such file or directory - node web.js".
My Procfile is...
web: node web.js
Foreman runs locally as expected.
Here's a logging snapshot...
2011-07-21T23:28:49+00:00 heroku[web.1]: State changed from starting to crashed
2011-07-21T23:37:50+00:00 heroku[web.1]: State changed from crashed to created
2011-07-21T23:37:50+00:00 heroku[web.1]: State changed from created to starting
2011-07-21T23:37:51+00:00 heroku[web.1]: Starting process with command: `node web.js`
2011-07-21T23:37:51+00:00 app[web.1]: Error: No such file or directory - node web.js
2011-07-21T23:37:52+00:00 heroku[web.1]: Process exited
And my heroku ps output...
Process State Command
------------ ------------------ ------------------------------
web.1 crashed for 8m node web.js
Source is https://github.com/just3ws/hellode
If it didn't run locally I'd move forward and just assume it was only me.
Thanks in advance.
My guess is it's the Gemfile or .rvmrc ;)
http://twitter.com/ryanbriones/status/94212379654631424