Deployement of app (php + Mysql) in Heroku - heroku

I am getting an error message when I give "heroku open" command.
Can any one please tell me where I am going wrong?

Related

Don't work Heroku logs(Service temporarily unavailable. Please try again later.)

I'm trying to get the application log, but I get the following:
heroku logs --app [my_app]
Error: Service temporarily unavailable. Please try again later.
Error ID: unavailable
What could be the problem?

certificate has expired error whilst running heroku commands

I'm trying to do the following with my hosted app on Heroku-
create a database backup
download the database backup
Restore the backup in a local postgres database
However, I get stuck in the first step itself. Running the below command throws the following error -
heroku pg:backups:capture -a app-name
CERT_HAS_EXPIRED: certificate has expired
I even tried running the following command, however, that did not help either -
heroku run:detached pg:backups capture –a app-name
Running pg:backups:capture on ⬢ app-name... done, run.1879 (Free)
Run heroku logs --app app-name --dyno run.1879 to view the output.
(env) E:\new_website\>heroku logs --app app-name --dyno run.1879
2021-10-29T05:18:36.001962+00:00 heroku[run.1879]: Starting process with command pg:backups:capture
2021-10-29T05:18:36.564987+00:00 heroku[run.1879]: State changed from starting to up
2021-10-29T05:18:36.953570+00:00 app[run.1879]: bash: pg:backups:capture: command not found
2021-10-29T05:18:37.068925+00:00 heroku[run.1879]: Process exited with status 127
2021-10-29T05:18:37.103435+00:00 heroku[run.1879]: State changed from up to complete
Finally, I also tried using the HEROKU_DEBUG environment variable to see what the real error was -
(env) E:\new_website\>SET HEROKU_DEBUG=1
(env) E:\new_website\>heroku pg:backups:capture --app app-name
Adding the following trusted certificate authorities
E:\ap01\Ruby\cacert.pem
--> POST /actions/addon-attachments/resolve
--> {"app":"neevista-web","addon_attachment":"DATABASE_URL","addon_service":"heroku-postgresql"}
<-- 200 OK
<-- [{"addon":{"id":"9ccc7a6d-8001-473a-8ef1-e24614ad26c0","name":"postgresql-curly-92807","app":{"id":"587ec79f-3989-40eb-bceb-17220824a275","name":"app-name"},"plan":{"id":"062a1cc7-f79f-404c-9f91-135f70175577","name":"heroku-postgresql:hobby-dev"}},"app":{"id":"587ec79f-3989-40eb-bceb-17220824a275","name":"app-name"},"id":"5a2ba589-22e6-4c42-a3bd-d634b4581eb5","name":"DATABASE","namespace":null,"created_at":"2021-06-21T15:05:48Z","updated_at":"2021-06-21T15:05:48Z","web_url":"https://addons-sso.heroku.com/apps/587ec79f-3989-40eb-bceb-17220824a275/addons/9ccc7a6d-8001-473a-8ef1-e24614ad26c0","log_input_url":null,"config_vars":["DATABASE_URL"]}]
Adding the following trusted certificate authorities
E:\ap01\Ruby\cacert.pem
--> GET /client/v11/databases/9ccc7a6d-8001-473a-8ef1-e24614ad26c0
! CERT_HAS_EXPIRED: certificate has expired
Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)
at TLSSocket.emit (events.js:314:20)
at TLSSocket._finishInit (_tls_wrap.js:937:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)
I've tried updating Heroku CLI, restarting the Heroku app but nothing has helped. Not sure if this helps but I've two versions (9 and 13) of Postgresql running on this windows machine and my app is trying the use the version 13.
Could you please advise what I'm doing wrong here or if there is an ongoing issue at your end?
I finally figured it out myself after Heroku support failed to assist as they classified the issue as a local problem.
For some reason, I'd setup SSL_CERT_FILE environment variable previously. This environment variable was pointing to a certificate pem file -> E:\ap01\Ruby\cacert.pem
After deleting this environment variable heroku commands started to work again.

postgres bad connection localhost

On UBUNTU, I have a ruby app with a postgresql database on my localhost.
Everything was working fine yesterday, but today my database was gone. I was still able to open the app. Then I got an error saying something like,
run rails db:migrate
After I ran the command I started getting
PG::ConnectionBad at /
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
None of the config files were changed since yesterday.
I use docker-compose up to start the server and apparently it starts the connection but I still cannot access my localhost.
What could be the problem here?
Thank you in advance
Check the logs in your DB, if the DB is running on docker as well then maybe it's not finishing the DB boot correctly.
If this is the case, run the DB container manually first with the same options as in your docker-compose and then check docker logs for that container.

heroku run returns "no route to host" error

I have a django project that is running on heroku. I am able to run certain heroku commands, such as heroku ps and heroku logs. When I try to use any heroku run commands, I get a no route to host error.
heroku run ls
Running ls attached to terminal... /usr/local/heroku/lib/heroku/client/rendezvous.rb:33:in `initialize': No route to host - connect(2) (Errno::EHOSTUNREACH
I am using chrome on a home wireless dsl connection, with no firewalls or anything on my end.
What can I do to use heroku run?

unknown heroku error

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.

Resources