I have a nodejs app (parse-server-example) that I want to connect to a remote mongoDB that has access controlled via IP whitelist.
I have configured Proximo, and my startup Procfile looks like this:
web: bin/proximo npm start
However, I get timeout errors on trying to contact the Proximo proxy.
The error looks like:
2016-03-08T21:18:18.190795+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/parse/classes/_User" host=something.herokuapp.com request_id=064586db-9b43-4b11-9b80-25b4b521e0bd fwd="129.51.22.25" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0
If I remove the proximo start call (and just have "npm start") and also open my database server to all IPs, then it all works fine.
But I would prefer to have the security of the static and whitelisted IP.
I have the feeling I am missing something very simple configuration-wise, but I can't find what it is - any help appreciated :)
Related
Procfile
web: npm run start:prod
Package.json
"start:prod": "NODE_ENV=production node dist/main",
Heroku logs
2022-05-10T09:01:50.583126+00:00 app[web.1]: [Nest] 22 - 05/10/2022, 9:01:50 AM LOG [NestApplication] Nest application successfully started +42ms
2022-05-10T09:01:50.818469+00:00 heroku[web.1]: Process exited with status 1
2022-05-10T09:01:50.875464+00:00 heroku[web.1]: State changed from starting to crashed
Everything works fine on local (heroku local and npm run start), but crashes on Heroku. I've tried these before:
Listen on process.env.PORT || 8080
All environments are set (heroku run printenv)
Set 0.0.0.0/0 IP on MongoDB Atlas
These are the environments that Heroku adds:
MEMORY_AVAILABLE=512
PWD=/app
PORT=42675
NODE_ENV=production
NODE_HOME=/app/.heroku/node
LINES=17
HOME=/app
COLUMNS=150
SHLVL=0
WEB_MEMORY=512
WEB_CONCURRENCY=1
PS1=\[\033[01;34m\]\w\[\033[00m\] \[\033[01;32m\]$ \[\033[00m\]
PATH=/app/.heroku/node/bin:/app/.heroku/yarn/bin:/usr/local/bin:/usr/bin:/bin:/app/bin:/app/node_modules/.bin
DYNO=run.5170
I'm not sure, but could it be for minimum hardware specification?
The issue was using port 80 for gateway and http-session-affinity was not enabled as it's required for Socket.io. Set process.env.PORT for both HTTP and gateway.
To enable http-session-affinity, run heroku features:enable http-session-affinity
I'm trying to deploy a Nuxt SPA app to Heroku.
Locally everything works fine, but when I deploy to Heroku it gives me an application error with the info to check my heroku logs:
2019-10-11T02:49:50.897584+00:00 heroku[web.1]: State changed from crashed to starting
2019-10-11T02:49:54.670233+00:00 heroku[web.1]: Starting process with command `npm start`
2019-10-11T02:49:56.590749+00:00 app[web.1]:
2019-10-11T02:49:56.590769+00:00 app[web.1]: > sol37.web#1.0.0 start /app
2019-10-11T02:49:56.59077+00:00 app[web.1]: > nuxt start
2019-10-11T02:49:56.590772+00:00 app[web.1]:
2019-10-11T02:49:57.167804+00:00 app[web.1]: ℹ Listening on: http://localhost:49791/ 2019-10-11T02:50:02.00478+00:00 heroku[web.1]: source=web.1 dyno=heroku.149207054.9b940788-6a37-40a9-82de-b19b3519e60c sample#memory_total=55.14MB sample#memory_rss=55.14MB sample#memory_cache=0.00MB sample#memory_swap=0.00MB sample#memory_pgpgin=14487pages sample#memory_pgpgout=1392pages sample#memory_quota=512.00MB
2019-10-11T02:50:23.81059+00:00 heroku[web.1]: source=web.1 dyno=heroku.149207054.9b940788-6a37-40a9-82de-b19b3519e60c sample#memory_total=55.14MB sample#memory_rss=55.14MB sample#memory_cache=0.00MB sample#memory_swap=0.00MB sample#memory_pgpgin=14487pages sample#memory_pgpgout=1392pages sample#memory_quota=512.00MB
2019-10-11T02:50:45.744385+00:00 heroku[web.1]: source=web.1 dyno=heroku.149207054.9b940788-6a37-40a9-82de-b19b3519e60c sample#load_avg_1m=0.00
2019-10-11T02:50:45.762243+00:00 heroku[web.1]: source=web.1 dyno=heroku.149207054.9b940788-6a37-40a9-82de-b19b3519e60c sample#memory_total=55.14MB sample#memory_rss=55.14MB sample#memory_cache=0.00MB sample#memory_swap=0.00MB sample#memory_pgpgin=14487pages sample#memory_pgpgout=1392pages sample#memory_quota=512.00MB
2019-10-11T02:50:54.906637+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
I checked if I set the port somewhere manually, but I'm not doing that anywhere in the project.
Without more information, i tried to build the app on heroku directly.
("heroku run bash" and "npm run build") which gave me the following error.
ERROR in ./pages/index.vue
Module not found: Error: Can't resolve 'sass-loader' in '/app'
and 7 more of those errors all concerning sass-loader.
not sure if "npm run build" works over heroku bash, but at least it gave me some information.
I have another nuxt project that i run on the same heroku instance which works without a problem.
I tried to check what the differences are and i found that it used a lower sass-loader version, which i downgraded on my current project but it's still not working.
After that I tried to run "npm run start" which is what Heroku runs upon deployment. this gave me first an error with nuxtjs/style-ressource, which i realized i don't utilize right now, so i removed that. After that it ran without any issues, but i couldn't get it to show up in the browser.
Does anyone have any idea what else I could try?
Thanks in Advance
Carlo
I've just started with Jhipster and have built a standard app (Maven, Postgres, Grunt, Sass, Java 8). It works fine in Dev but when I run the yo jhipster:heroku command, and then cd to deploy/heroku and run heroku open the browser responds with a 404.
The Postgres database looks fine on Heroku (no lock tables). Subsequent runs of grunt deployHeroku and git push heroku master don't solve the problem.
The heroku logs:
2015-04-26T13:29:36.053325+00:00 heroku[router]: at=info method=GET path="/" host=myapp.herokuapp.com request_id=c7f77c65-688f-45ac-90f4-aac54d0cea95 fwd="185.51.75.249" dyno=web.1 connect=2ms service=50ms status=404 bytes=4224
2015-04-26T13:29:36.331877+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=84eb4f79-9eda-4517-a60d-3fd25f2e6176 fwd="185.51.75.249" dyno=web.1 connect=1ms service=28ms status=200 bytes=5647
What's interesting is that the favicon and the custom 404 page (I modified it to test this) itself are working correctly. However all of the routes result in a 404. The Heroku logs indicate the app is running.
Update
I did a maven build locally using the prod configuration and ran it:
mvn -Pprod package
mvn spring-boot:run
grunt serve
All worked fine on my dev machine. Also, deployment to Cloud Front is working.
Any ideas, or more info I can provide?
Thanks.
This should be issue with running frontend of jhipster webapp, that I did not resolve yet, but at least you can check whether your spring boot backend is alive:
https://PROJECT_NAME.herokuapp.com/management/info
I am running jhipster with -Pdev profile so far on heroku.
My Rails app that uses Spree and is hosted on Heroku was working fine until last night but I woke up this morning to find that the app had crashed and I have no clue why. I have not made any changes recently. I tried heroku restart without success. It looks like something is up with Heroku (the log is asking me a question about whether the amazon host is running??) How do I let them know to resolve this for me?
2013-06-04T06:47:59.795210+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1076:in `initialize': could not connect to server: Connection refused (PGError)
2013-06-04T06:47:59.795659+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bundler/gems/spree-58e0391d3496/core/config/initializers/spree.rb:15:in `<top (required)>'
2013-06-04T06:47:59.795210+00:00 app[web.1]: Is the server running on host "ec2-54-243-188-56.compute-1.amazonaws.com" and accepting
2013-06-04T06:47:59.795210+00:00 app[web.1]: TCP/IP connections on port 5442?
go to http://help.heroku.com and Open a Support Ticket
Check logs from terminal
heroku logs --app <heroku app name>
check the crash stacktrace and then restart all dynos from dashboard
i am experiencing following error while trying to run application on heroku
2011-06-03T11:24:25-07:00 heroku[nginx]: GET / HTTP/1.1
2011-06-03T18:24:37+00:00 heroku[router]: Error H14 (No web processes runnig)
that's the only message i am getting, and it's not even mentioned in heroku error codes at http://devcenter.heroku.com/articles/error-codes
what could be the reason of this?
heroku restart
made it work properly again
As given on http://devcenter.heroku.com/articles/error-codes
H14 - No web processes running
This is most likely the result of scaling your web processes down to zero through the client.
$ heroku scale web=0
Use the heroku ps command to determine the state of your web processes.
If problems persists after heroku restart;
Destroy the heroku app and re-create.
Heroku restart
didn't fix the issue. I added a new line in my Gemfile (just a new line, no text) to force heroku to reinstall gems and this fixed the issue.