We're sorry, but something went wrong Heroku - heroku

Don't start app at Heroku.
Migrate I was do, but it don`t work anyway... Please help my anyone
2015-07-17T08:27:11.996879+00:00 app[web.1]: => Booting Puma
2015-07-17T08:27:11.996906+00:00 app[web.1]: => Rails 4.2.1 application starting in production on http://0.0.0.0:15906
2015-07-17T08:27:11.996909+00:00 app[web.1]: => Run `rails server -h for more startup options
2015-07-17T08:27:11.996910+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-07-17T08:27:16.038259+00:00 heroku[web.1]: State changed from starting to up
2015-07-17T08:27:15.924000+00:00 app[web.1]: Puma 2.11.3 starting...
2015-07-17T08:27:15.924095+00:00 app[web.1]: * Min threads: 0, max threads: 16
2015-07-17T08:27:15.924199+00:00 app[web.1]: * Environment: production
2015-07-17T08:27:15.924281+00:00 app[web.1]: * Listening on tcp://0.0.0.0:15906
2015-07-17T08:27:18.702571+00:00 heroku[router]: at=info method=GET path="/" host=shrouded-eyrie-5960.herokuapp.com request_id=7976700d-bee7-4e6f-b20a-67d60a5d5e8a fwd="176.104.8.251" dyno=web.1 connect=1ms service=210ms status=500 bytes=1669
2015-07-17T08:27:18.819798+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=shrouded-eyrie-5960.herokuapp.com request_id=23341143-bd39-46ed-a48a-736533558ccd fwd="176.104.8.251" dyno=web.1 connect=1ms service=2ms status=200 bytes=143`

This error comes from your app's code. However, your app is sending it's logs to the local filesystem, which means you don't see the exception in heroku logs.
You would need to configure your app to send logs to STDOUT or STDERR to be able to see them.
You can add the rails_12factor gem to your app, which will change your configuration to do just that.
Once you have added this gem to your app and redeployed it, the raised exception should show in your logs and you can fix in your app's code.

Related

Why Heroku + voila ipynb app fail to deploy with `failed to bind to $PORT within 60 seconds of launch`

I followed the different pages to deploy a voila ipynb app on heroku:
https://pythonforundergradengineers.com/deploy-jupyter-notebook-voila-heroku.html
https://medium.com/analytics-vidhya/deploying-jupyter-notebook-as-a-web-app-with-heroku-d157b68bcccc
https://github.com/voila-dashboards/voila-heroku
Unfoprtunately, it seems that there is a persisting bug this last month (saw here for instance https://forums.fast.ai/t/heroku-app-wont-deploy/92875/4)
You can find the github repo I am trying to deploy here:
https://github.com/vpicouet/fireball2-etc
The app is base on this Procfile
web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
Unfortunately I get this error
2022-03-27T15:17:49.880973+00:00 app[web.1]: [Voila] Using /tmp to store connection files
2022-03-27T15:17:49.881302+00:00 app[web.1]: [Voila] Storing connection files in /tmp/voila_yih2j7ic.
2022-03-27T15:17:49.881356+00:00 app[web.1]: [Voila] Serving static files from /app/.heroku/python/lib/python3.8/site-packages/voila/static.
2022-03-27T15:17:49.890735+00:00 app[web.1]: [Voila] Voilà is running at:
2022-03-27T15:17:49.890737+00:00 app[web.1]: http://localhost:7758/
2022-03-27T15:17:58.000000+00:00 app[api]: Build succeeded
2022-03-27T15:18:48.015586+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-03-27T15:18:48.055996+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-27T15:18:48.227953+00:00 heroku[web.1]: Process exited with status 137
2022-03-27T15:18:48.274554+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-27T15:24:44.773897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=0b0c1707-d6ae-449a-9059-f2d1d3f8c652 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
2022-03-27T15:39:30.626492+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=af5c3e4a-019f-47c3-a047-e5115ebd5fc7 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
Do you know fow to solve this?
Thanks a lot!
I already tried some ideas on the web:
change
web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
by
worker: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
The answer can be found here: issue 1047
From 0.3.0, Voila will not listen on all interfaces by default (#926) for security reasons. In the case of Heroku, you need to add --Voila.ip=0.0.0.0 to your command in the Procfile to make it work.
See also: https://github.com/voila-dashboards/voila-heroku

Liveview app reloading infinitely on heroku deployment

This might be a stupid question to ask but are there any extra steps I need to complete to deploy a phoenix liveview app to heroku?
From official documents deployment of phoenix app was successful but converting the same page into a liveview caused the page to reload infinitely
And the error I get on heroku logs are:
2022-01-18T07:35:12.424013+00:00 heroku[router]: at=info method=GET path="/" host=fast-fortress-60216.herokuapp.com request_id=0bf752c3-185a-44d4-84ce-7004f7031984 fwd="27.34.20.173" dyno=web.1 connect=0ms service=2ms status=200 bytes=4941 protocol=https
2022-01-18T07:35:13.895958+00:00 heroku[router]: at=info method=GET path="/assets/app-097a5c6ca9e10ff4881312b83e54a14f.css?vsn=d" host=fast-fortress-60216.herokuapp.com request_id=8d4e402d-cf16-4e4d-8b26-3bdcbbc6186c fwd="27.34.20.173" dyno=web.1 connect=0ms service=2ms status=200 bytes=15612 protocol=https
2022-01-18T07:35:15.191409+00:00 heroku[router]: at=info method=GET path="/live/websocket?_csrf_token=SC9hAXBiKRoOLDYALRkhCT8EBzk8LT0syDSs70xHbMfQfZyowhVUrjDs&_track_static%5B0%5D=https%3A%2F%2Ffast-fortress-60216.herokuapp.com%2Fassets%2Fapp-097a5c6ca9e10ff4881312b83e54a14f.css%3Fvsn%3Dd&_track_static%5B1%5D=https%3A%2F%2Ffast-fortress-60216.herokuapp.com%2Fassets%2Fapp-a670ca05a10bcaada1c4842b40be19a2.js%3Fvsn%3Dd&_mounts=0&vsn=2.0.0" host=fast-fortress-60216.herokuapp.com request_id=e8ef08c8-d80a-4a79-8b73-d21cc5e47d2c fwd="27.34.20.173" dyno=web.1 connect=0ms service=1ms status=403 bytes=195 protocol=https
2022-01-18T07:35:15.191230+00:00 app[web.1]: 07:35:15.191 [error] Could not check origin for Phoenix.Socket transport.
2022-01-18T07:35:15.191243+00:00 app[web.1]:
2022-01-18T07:35:15.191244+00:00 app[web.1]: Origin of the request: https://fast-fortress-60216.herokuapp.com
2022-01-18T07:35:15.191244+00:00 app[web.1]:
2022-01-18T07:35:15.191245+00:00 app[web.1]: This happens when you are attempting a socket connection to
2022-01-18T07:35:15.191246+00:00 app[web.1]: a different host than the one configured in your config/
2022-01-18T07:35:15.191246+00:00 app[web.1]: files. For example, in development the host is configured
2022-01-18T07:35:15.191246+00:00 app[web.1]: to "localhost" but you may be trying to access it from
2022-01-18T07:35:15.191247+00:00 app[web.1]: "127.0.0.1". To fix this issue, you may either:
2022-01-18T07:35:15.191247+00:00 app[web.1]:
2022-01-18T07:35:15.191248+00:00 app[web.1]: 1. update [url: [host: ...]] to your actual host in the
2022-01-18T07:35:15.191248+00:00 app[web.1]: config file for your current environment (recommended)
2022-01-18T07:35:15.191248+00:00 app[web.1]:
2022-01-18T07:35:15.191248+00:00 app[web.1]: 2. pass the :check_origin option when configuring your
2022-01-18T07:35:15.191249+00:00 app[web.1]: endpoint or when configuring the transport in your
2022-01-18T07:35:15.191249+00:00 app[web.1]: UserSocket module, explicitly outlining which origins
2022-01-18T07:35:15.191250+00:00 app[web.1]: are allowed:
2022-01-18T07:35:15.191251+00:00 app[web.1]:
2022-01-18T07:35:15.191251+00:00 app[web.1]: check_origin: ["https://example.com",
2022-01-18T07:35:15.191251+00:00 app[web.1]: "//another.com:888", "//other.com"]
Do I have to install extra buildpacks or some changes in my configs?
My bad
The solution was right there but I didn't exactly know how to implement it.
The solution is adding
config :grasruts, GrasrutsWeb.Endpoint, check_origin: ["http://localhost:4000/","https://HEROKU_APP_URL/"]

How to get rid of application error in heroku when running

I deployed this app on Heroku for the first time 6 months ago and it was running fine. Its still running fine on localhost but now when I try to use the same heroku link its showing application error.
Here are my logs:
heroku logs --tail
2021-11-22T21:25:37.247493+00:00 heroku[web.1]: Restarting
2021-11-22T21:25:37.291674+00:00 heroku[web.1]: State changed from up to starting
2021-11-22T21:25:38.213115+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2021-11-22T21:25:38.434284+00:00 heroku[web.1]: Process exited with status 143
2021-11-22T21:25:39.432521+00:00 heroku[web.1]: Starting process with command `node app.js`
2021-11-22T21:25:40.721334+00:00 app[web.1]: Database_URL undefined
2021-11-22T21:25:40.722187+00:00 app[web.1]: Server has started
2021-11-22T21:25:41.145424+00:00 heroku[web.1]: State changed from starting to up
2021-11-22T21:26:10.715356+00:00 app[web.1]: connect ECONNREFUSED 127.0.0.1:27017
2021-11-22T21:26:20.762822+00:00 heroku[router]: at=info method=GET path="/" host=sleepy-basin-23202.herokuapp.com request_id=9145c837-b0b8-409e-af04-38431cef02a5 fwd="47.15.8.93" dyno=web.1 connect=0ms service=12ms status=304 bytes=151 protocol=https
2021-11-22T21:26:21.119967+00:00 heroku[router]: at=info method=GET path="/style.css" host=sleepy-basin-23202.herokuapp.com request_id=7cd5ff7a-a627-4f97-a28f-b4f73b08b463
fwd="47.15.8.93" dyno=web.1 connect=0ms service=9ms status=200 bytes=4543 protocol=https
2021-11-22T21:26:21.123105+00:00 heroku[router]: at=info method=GET path="/script.js" host=sleepy-basin-23202.herokuapp.com request_id=3176b0d8-80b4-4c6c-a389-cc786bbd0e0f
fwd="47.15.8.93" dyno=web.1 connect=0ms service=7ms status=404 bytes=392 protocol=https
2021-11-22T21:26:21.452457+00:00 heroku[router]: at=info method=GET path="/script.js" host=sleepy-basin-23202.herokuapp.com request_id=cbdc660f-90e1-443b-8b2d-2f255018b63d
fwd="47.15.8.93" dyno=web.1 connect=0ms service=2ms status=404 bytes=392 protocol=https
2021-11-22T21:26:22.904249+00:00 heroku[router]: at=info method=POST path="/view" host=sleepy-basin-23202.herokuapp.com request_id=3a4c38b1-5798-490e-bc1b-73338fc18cf5 fwd="47.15.8.93" dyno=web.1 connect=0ms service=13ms status=302 bytes=246 protocol=https
2021-11-22T21:26:33.202949+00:00 app[web.1]: (node:4) UnhandledPromiseRejectionWarning: MongooseError: Operation `users.find()` buffering timed out after 10000ms
2021-11-22T21:26:33.202957+00:00 app[web.1]: at Timeout.<anonymous> (/app/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:20)
2021-11-22T21:26:33.202958+00:00 app[web.1]: at listOnTimeout (internal/timers.js:554:17)
2021-11-22T21:26:33.202959+00:00 app[web.1]: at processTimers (internal/timers.js:497:7)
2021-11-22T21:26:33.202960+00:00 app[web.1]: (Use `node --trace-warnings ...` to show where the warning was created)
2021-11-22T21:26:33.203001+00:00 app[web.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2021-11-22T21:26:33.203100+00:00 app[web.1]: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are
not handled will terminate the Node.js process with a non-zero exit code.
2021-11-22T21:26:53.190725+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/view" host=sleepy-basin-23202.herokuapp.com request_id=23595d4a-6e69-48cf-a1ce-2ef12ce13815 fwd="47.15.8.93" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
There isn't much information here, but I see
Database_URL undefined
in your logs. Assuming you are using a Heroku database addon like Heroku Postgres, your database URL will be defined in a variable called DATABASE_URL. Case is important: DATABASE_URL and Database_URL are different things.
Please update your code to use DATABASE_URL.
Note that environment variable names are not case-sensitive on Windows. If you are using Windows for local development that's one reason this might work locally and not work on Heroku.
It can't find you database Url check your env configuration

Dashing on Heroku giving "config.ru" error

So, I am just trying to get a simple Heroku server running Dashing up. So far, I have the dashing and gemlock committed to heroku. Whenever I open the site, I get an error. My logs give me this:
2015-03-14T04:05:37.617789+00:00 heroku[api]: Deploy 2447a74 by #gmail.com
2015-03-14T04:05:37.617789+00:00 heroku[api]: Release v8 created by #gmail.com
2015-03-14T04:05:38.099916+00:00 heroku[web.1]: State changed from crashed to starting
2015-03-14T04:05:41.184158+00:00 heroku[web.1]: Starting process with command bundle exec thin start -R config.ru -e pr
oduction -p 12627
2015-03-14T04:05:43.367997+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:32
:in read': No such file or directory - config.ru (Errno::ENOENT)
2015-03-14T04:05:43.368046+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/rack/adapter/load
er.rb:32:inload'
2015-03-14T04:05:43.368055+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/runner.rb:20
0:in run_command'
2015-03-14T04:05:43.368051+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/controllers/
controller.rb:182:inload_rackup_config'
2015-03-14T04:05:43.368053+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/controllers/
controller.rb:72:in start'
2015-03-14T04:05:43.368064+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/bin/thin:6:in'
2015-03-14T04:05:43.368066+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/thin:23:in load'
2015-03-14T04:05:43.368062+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/runner.rb:15
6:inrun!'
2015-03-14T04:05:43.368069+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/thin:23:in `'
2015-03-14T04:05:44.164461+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-14T04:05:44.157004+00:00 heroku[web.1]: Process exited with status 1
2015-03-14T04:06:01.687293+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-d
awn-3700.herokuapp.com request_id=902320e9-1789-4099-94b2-8b4431d59495 fwd="66.190.95.133" dyno= connect= service= statu
s=503 bytes=
2015-03-14T04:06:02.015965+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" hos
t=pacific-dawn-3700.herokuapp.com request_id=6563d675-9732-4a21-84f4-c486fb6d792e fwd="66.190.95.133" dyno= connect= ser
vice= status=503 bytes=
A config.ru file was never created...I'm new to Ruby and Dashing and Heroku. I've even tried creating a blank config.ru, but even more errors occur...
Found the config file in anothjer directory somehow. Popped it in, it works!

After pushing on heroku my #Messages(value) are not interpreted

After pushing on heroku my #Messages(value) are not interpreted:
--> value is display instead of the translation present in conf/Messages file.
I use play framework 2.2.1.
Here is the log of a start and a first display of a page containning #Messsages() use.
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: State changed from down to starting
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: Unidling
2014-10-12T05:37:24.363328+00:00 heroku[web.1]: Starting process with command `target/universal/stage/bin/kosh -Dhttp.port=41328 -DapplyEvolutions.default=true`
2014-10-12T05:37:25.260260+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
2014-10-12T05:37:25.672105+00:00 app[web.1]: Play server process ID is 2
2014-10-12T05:37:27.084724+00:00 app[web.1]: [←[37minfo←[0m] play - database [default] connected at jdbc:h2:mem:play
2014-10-12T05:37:27.660047+00:00 app[web.1]: [←[37minfo←[0m] play - Application started (Prod)
2014-10-12T06:39:14.765169+00:00 heroku[router]: at=info method=GET path="/" host=mmmm.herokuapp.com request_id=31eeed7d-0b4d-43ac-b2df-3d142f6db4ba fwd="-" dyno=web.1 connect=1ms service=16ms status=200 bytes=34657
2014-10-12T06:39:14.939740+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/bootstrap.min.css" host=mmmm.herokuapp.com request_id=7ffe7b15-d521-481fb9f1-fba1c146fbf0 fwd="-" dyno=web.1 connect=1ms service=7ms status=304 bytes=173
2014-10-12T06:39:14.949590+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/normalize.css" host=mmmm.herokuapp.com request_id=4616036b-d3d3-4891-bc69-8c3461d69e26 fwd="-" dyno=web.1 connect=1ms service=8ms status=304 bytes=1732
2014-10-12T06:47:05.367842+00:00 heroku[router]: at=info method=GET path="/webjars/jquery/1.9.1/jquery.min.js" host=mmmm.herokuapp.com request_id=2938c0d1-62ad-4e43-acdb-1dc23588754f fwd="-" dyno=web.1 connect=1ms service=5ms status=304 bytes=173
My Procfile contains :
web: target/universal/stage/bin/kosh -Dhttp.port=$PORT -DapplyEvolutions.default=true
Changing the name of the file from "Messages" to "messages" (with a lowercase m) had fix the problem. On my Windows side file was case insensitive, on heroku side, in an Unix world, file names were case sensitives. Play framework seem to look for file in lower case at heroku.

Resources