Skip to content
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

Deploy with Heroku throws error #16

Closed
ravibaskaran opened this issue Oct 29, 2020 · 23 comments · Fixed by #18
Closed

Deploy with Heroku throws error #16

ravibaskaran opened this issue Oct 29, 2020 · 23 comments · Fixed by #18

Comments

@ravibaskaran
Copy link

ravibaskaran commented Oct 29, 2020

I am getting this error when I use the "deeply with Heroku" button. I am a newbie on Heroku. Can you please help?

2020-10-29T14:10:13.231789+00:00 app[web.1]: indentified DB in use postgreSQL
2020-10-29T14:10:15.255596+00:00 app[web.1]: UserSettings got generated and saved to: /data/.n8n/config
2020-10-29T14:10:17.664103+00:00 heroku[web.1]: Process exited with status 0
2020-10-29T14:10:17.704169+00:00 heroku[web.1]: State changed from starting to crashed
2020-10-29T14:11:33.220234+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=53e04ef3-f526-4198-a638-f3647d7312c4 fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:11:37.275558+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=64eb2462-dc86-427f-86c9-04759b8640cf fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:11:58.583151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=fd25af93-bcd2-4087-ab15-b825a9e245bb fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:00.702291+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=cd7109b6-7793-4e4e-921b-24c34b9f585f fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:52.867403+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=f3507cb4-582d-43d4-b3db-58a650481832 fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:55.363898+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=ab60c37c-a956-45ef-aa1c-6890ae8714da fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https

@JulienBardin
Copy link

I have the same error

@bellonline
Copy link

Me too. I try to use PostgreSQL the It happened.
Could @sarveshpro please explain more about how to use PostgreSQL?

@bellonline
Copy link

I find this error log

npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/n8n -> /usr/local/lib/node_modules/n8n/bin/n8n

sqlite3@4.2.0 install /usr/local/lib/node_modules/n8n/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.15.0 (node-v83 ABI, musl) (falling back to source compile with node-gyp)
make: Entering directory '/usr/local/lib/node_modules/n8n/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3310100/sqlite3.o

@Vadorequest
Copy link

Vadorequest commented Dec 6, 2020

Same, I basically clicked on the "Deploy to heroku button" and it got deployed, but I get the following when I go to the app:

image

Note that I changed the basic auth login/password, but that's it.

Logs:

heroku logs --tail --app=unly-n8n
[...]
2020-12-06T15:29:04.699249+00:00 heroku[web.1]: Starting process with command `/start.sh`
2020-12-06T15:29:06.764250+00:00 app[web.1]: N8N will start on '58444'
2020-12-06T15:29:06.764297+00:00 app[web.1]: postgres://wgenyjymnkdjnm:85e9523675340b5f866dc18afa36b14f841ecf1701a8021d569f757aff845dd8@ec2-54-247-70-127.eu-west-1.compute.amazonaws.com:5432/d62fc9j92lg1uo
2020-12-06T15:29:06.764300+00:00 app[web.1]: postgre config detected
2020-12-06T15:29:06.765536+00:00 app[web.1]: postgres://wgenyjymnkdjnm:85e9523675340b5f866dc18afa36b14f841ecf1701a8021d569f757aff845dd8@ec2-54-247-70-127.eu-west-1.compute.amazonaws.com:5432/d62fc9j92lg1uo
2020-12-06T15:29:06.767977+00:00 app[web.1]: indentified DB in use postgreSQL
2020-12-06T15:29:08.144153+00:00 app[web.1]: UserSettings got generated and saved to: /data/.n8n/config
2020-12-06T15:29:09.888779+00:00 heroku[web.1]: Process exited with status 0
2020-12-06T15:29:09.922281+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-06T15:29:09.925661+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-06T15:29:17.682825+00:00 heroku[web.1]: Starting process with command `/start.sh`
2020-12-06T15:29:19.858017+00:00 app[web.1]: N8N will start on '41378'
2020-12-06T15:29:19.858048+00:00 app[web.1]: postgres://wgenyjymnkdjnm:85e9523675340b5f866dc18afa36b14f841ecf1701a8021d569f757aff845dd8@ec2-54-247-70-127.eu-west-1.compute.amazonaws.com:5432/d62fc9j92lg1uo
2020-12-06T15:29:19.858051+00:00 app[web.1]: postgre config detected
2020-12-06T15:29:19.859350+00:00 app[web.1]: postgres://wgenyjymnkdjnm:85e9523675340b5f866dc18afa36b14f841ecf1701a8021d569f757aff845dd8@ec2-54-247-70-127.eu-west-1.compute.amazonaws.com:5432/d62fc9j92lg1uo
2020-12-06T15:29:19.861364+00:00 app[web.1]: indentified DB in use postgreSQL
2020-12-06T15:29:21.350517+00:00 app[web.1]: UserSettings got generated and saved to: /data/.n8n/config
2020-12-06T15:29:23.191713+00:00 heroku[web.1]: Process exited with status 0
2020-12-06T15:29:23.224363+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-06T15:29:45.043603+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=unly-n8n.herokuapp.com request_id=f00efeec-d3f8-49fc-8c48-23bf262d6c85 fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:29:45.047882+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=unly-n8n.herokuapp.com request_id=57bb117c-81df-43b2-9253-523bd1b8e46b fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:29:47.130703+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=unly-n8n.herokuapp.com request_id=bc9751bd-03f7-42dd-9a54-b5fc24db106b fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:30:39.798149+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=unly-n8n.herokuapp.com request_id=da4f12b0-e005-4ab2-9157-10b3902b47c1 fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:30:41.422700+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=unly-n8n.herokuapp.com request_id=30d81874-cc95-41d2-907a-11d5e789354d fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:34:46.662806+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=unly-n8n.herokuapp.com request_id=2e46bad2-0ba9-4bf5-a24f-24fa86ee5679 fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https
2020-12-06T15:34:48.135301+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=unly-n8n.herokuapp.com request_id=875cb88e-01ed-4312-90f3-ca1e3707b158 fwd="176.158.114.162" dyno= connect= service= status=503 bytes= protocol=https

@fullbright
Copy link

Same issue here. Did you find a solution?

@Vadorequest
Copy link

@fullbright Nope, I haven't search much for one either, basically moved to the Cloud offering.

But it'd be great to have it for free and unlimited using Heroku!

@fullbright
Copy link

@Vadorequest I found a solution. You need to move the version of n8n in the Dockerfile to 0.98.0 and redeploy the application.
Worked for me.

@Vadorequest
Copy link

@fullbright Awesome! I never used Heroku, could you share how to edit the Dockerfile?
Do you edit it prior to deploying? Can you change it after you deployed? (and if so, how)

Shouldn't the version be defined as a ENV variable? That might be much easier to update this way. 🤔

Vadorequest added a commit to UnlyEd/n8n-heroku-demo that referenced this issue Dec 18, 2020
@Vadorequest
Copy link

I forked this repository and fixed the Heroku integration following @fullbright trick.

https://github.com/UnlyEd/n8n-heroku-demo

Also made an online version available, hosted on heroku at https://unly-n8n-demo.herokuapp.com

@Vadorequest
Copy link

Also, I tried using another login/password for a proprietary project and I couldn't authenticate myself. Maybe I made a dumb mistake, but I feel like Basic Auth might have some restrictions like a password max length or so.

@capriciousduck
Copy link

@Vadorequest I found a solution. You need to move the version of n8n in the Dockerfile to 0.98.0 and redeploy the application.
Worked for me.

What if the n8n upgrades to a newer version? Then if I make the change in Dockerfile and redeploy, will all the triggers I created wipe off?

@fullbright
Copy link

fullbright commented Jan 7, 2021 via email

@capriciousduck
Copy link

@fullbright What about the triggers I created then? Should I re-create the triggers when I deploy a new version of the app?

@fullbright
Copy link

fullbright commented Jan 7, 2021 via email

@capriciousduck
Copy link

capriciousduck commented Jan 7, 2021

@fullbright What if I create a new trigger in the heroku-hosted ngn instance and then I re-deploy the app, leaving the database add-ons as they are. Would that confirm?

@fullbright
Copy link

fullbright commented Jan 7, 2021 via email

@capriciousduck
Copy link

capriciousduck commented Jan 7, 2021

@fullbright It's working!. I created a test trigger and re-deployed the app. I could still see the test trigger I created. Thanks!

By the way, how many triggers can I create before reaching the 1Gb database storage limit? Please forgive me if the question sounds silly. I have no knowledge of databases.

And, is 512Mb of RAM enough for ngn? Wouldn't that be a problem in the future after I create many workflows?

@Vadorequest
Copy link

@capriciousduck 1GB data storage is huge, you might never reach it. I don't know what's stored in the DB, but if it's only the workflow files, then you could have thousands workflows without issue.

Regarding the RAM, hard to say, but I expect n8n to be really light considering it's a short-live process that only triggers when an event occurs. Basically, it might limit the number of workflows triggering in parallel, but that's it. I don't feel like you'd need more unless you have hundreds of workflows triggering at the same time.

You should probably ask on n8n forum https://community.n8n.io/ then might give you interesting feedback regarding how big your hosting server should be.

@vongohren
Copy link

There seem to be a couple of issues with this heroku deployment?
It cannot handle webhooks, triggers?
I tried with a trello one and got back 403, because it tried registering with a localhost url. Which is strange.
I also updated my heroku instance but ended up having to setup all my triggers all over again, as they we decrypted with a different key than available after the deploy.

Strange stuff

@fullbright
Copy link

fullbright commented Feb 15, 2021 via email

@lchanc3
Copy link

lchanc3 commented Feb 15, 2021

To solve "Credentials could not be decrypted. The reason is that probably a different", you can refer to the method in this article to set
https://community.n8n.io/t/credentials-error/181/4

@vongohren
Copy link

It seems that I found some variables thanks to you guys
Encryption key worked: https://docs.n8n.io/reference/configuration.html#encryption-key. No longer not problem with credentials

Then for webhook, I needed this: https://docs.n8n.io/reference/configuration.html#webhook-url. First thought i needed this: https://docs.n8n.io/reference/configuration.html#publish, but that did not work. So the webhook-url is important.

So all fixed for me now. I had to go via: https://github.com/UnlyEd/n8n-heroku-demo/ to deploy though.

@SefaDedeoglu
Copy link

I had same error and fixed it with dotenv
Heroku dont allow static ports
Ekran Resmi 2022-01-24 16 12 00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants