Heroku domain doesn't work - heroku

I go to freenom create the free domain name: mydomain.ga
And the dns target at dashboard in heroku is mydomain.ga.herokudns.com
So I go to DNS MANAGEMENT
Name: any name
Type: CNAME
TTL:14440
Target:mydomain.ga.herokudns.com
But When I connect to www.mydomain.ga
And it has the error about can not find out the server.
What was I missed?

I finally fixed .
heroku domains:add www.mydomain.ga
heroku domains:add mydomain.ga
IN the freenom's Target: www.mydomain.ga.herokudns.com

Related

heroku knex migration/seed error: no pg_hba.conf entry for host ssl false

Trying to use the Heroku console to run knex migration and seeds. Everything works in the development environment but it doesn't in Heroku. I get an SSL error and I don't know how to solve it without paying for a higher database tier.
Because node-Postgres enables SSL validation by default while free Heroku hosting doesn’t provide it automatically, you need to turn it off. disable SSL in Heroku:
CLI solution:
heroku config:set PGSSLMODE=no-verify --app <app name>
Sources:
https://dpletzke.medium.com/configuring-free-heroku-node-postgresql-hosting-with-knex-b0e97a05c6af
https://help.heroku.com/DR0TTWWD/seeing-fatal-no-pg_hba-conf-entry-errors-in-postgres
Resolved with:
{
production: {
client: 'pg',
connection: {
connectionString: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: false,
},
},
},
}

heroku console No route to host error

I have a simple Ruby app hosted on Heroku. It is not Rails app, it only uses Rack and Sinatra and it is running on cedar-14 stack.
When I try to run heroku run console or heroku run bash it prompts:
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No route to host - connect(2) (Errno::EHOSTUNREACH)
Also, when I try to telnet as suggested here It prompts just the same
$ telnet rendezvous.heroku.com 5000
Trying 50.19.103.36...
telnet: Unable to connect to remote host: No route to host
and
$ telnet s1.runtime.heroku.com 5000
telnet: could not resolve s1.runtime.heroku.com/5000: Name or service not known
I'm not premium Heroku user.
Can I get that One-Off dyno and If I can how?

Heroku Postgres connection from another ec2 instance

How can i connect to heroku postgres from another webapplication running on different cloud service.
I have a heroku postgres. I have another webapplication running on EC2. When my webapp on ec2 is trying to connect to heroku app, it fails.
I tried telnet from ec2 instance to heroku postgres on port 5432, it fails.
Can anyone please provide a pointer?
You can use heroku pg:credentials command to get the credentials for your database. For example:
$ heroku pg:credentials DATABASE_URL
Connection info string:
"dbname=abcdefghijklmn host=ec2-1-2-3-4.compute-1.amazonaws.com port=5432 user=abcdefghijklmn password=abcdefghijklmnopqrstuvwxyz sslmode=require"
Connection URL:
postgres://abcdefghijklmn:abcdefghijklmnopqrstuvwxyz#ec2-1-2-3-4.compute-1.amazonaws.com:5432/abcdefghijklmn
Then, you can use Connection URL or decomposed credentials in your other application. Pay attention to sslmode=require. Connections to Heroku Postgres require you to use SSL, which is an "advanced" option in some of the PostgreSQL clients (e.g. Navicat). For example:
$ psql postgres://abcdefghijklmn:abcdefghijklmnopqrstuvwxyz#ec2-1-2-3-4.compute-1.amazonaws.com:5432/abcdefghijklmn
More information here: https://devcenter.heroku.com/articles/heroku-postgresql#external-connections-ingress

IP address of Proximo add-on Heroku

How can I determine the IP address of Proximo add-on Heroku? I looked at the following link https://devcenter.heroku.com/articles/proximo but could not figure it out.
heroku config | grep PROXIMO_URL
PROXIMO_URL: http://proxy:password#proxy-12-34-45-56.proximo.io
so your ip address would be 12.34.45.56

ssh: connect to host heroku.com port 22: Connection timed out

I am working on Ubuntu 11.10
Local branch of my git-repo is up to date
I then wrote following command in terminal: heroku create --stack cedar and it said:
Notice: on Wed, 20 June, our default stack will change to Cedar. http://bit.ly/Lh0rM5
Creating radiant-wind-7413... done, stack is cedar
http://radiant-wind-7413.herokuapp.com/ | git#heroku.com:radiant-wind-7413.git
Git remote heroku added
All fine till now, then I typed following in terminal:
git push heroku master
and the following error occured:
ssh: connect to host heroku.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly
As of November 30, 2021, the SSH Git Transport feature has been deprecated by Heroku and only HTTP transport is supported. The real shutdown of SSH was in March 2022.
You have to reconfigure the repo with :
heroku git:remote -a <app-name>
Official statement from Heroku
If you are using a remote with a different name, e.g. production then use
heroku git:remote -a <app-name> -r <remote-name>
Maybe you will have to unset ssh connections on git global config :
git config --global --unset url.ssh://git#heroku/.insteadof
git config --global --unset url.ssh://git#heroku.com/.insteadof
Most probably some sort of firewall issue or your network admin has blocked outgoing port 22 in your network.
You may use simple scrip to see your connection to Heroku by :
$ ssh -vvv git#heroku.com
If you seeing connect timed out then you may need to request your admin to unblock port 22. Alternatively may access Heroku via tunneling as per my answer in Connecting to heroku using port 443
I had the similar problem with keys. Ok this is what I did.
Check the status of your keys with
heroku keys
It shows you list of keys that are added to heroku. You can always generate new keys and add them to heroku.
ssh-keygen -t rsa
Generates new key.
heroku keys:add
adds the keys to heroku. Before adding it lists the available keys that you can add. Enter the option and you key is added to heroku.
This article can be helpful. If that doesn't work then there should be some problem with ssh. Try doing an ssh localhost and see if ssh is working.
Today Heroku uses git over ssh. The default port for ssh is 22 and it looks like your network doesn't allow outbound connections to port 22. Perhaps this is something your network administrator can change.
I had been working on this for hours trying to figure out how I could suddenly have a closed port 22, etc. when literally 5 hours ago everything was working and nothing had changed.
Finally I just reset my Git repo on Heroku and repushed everything. Still no idea what happened.
heroku plugins:install heroku-repo
heroku repo:reset --app appname
Do following steps.
ssh-keygen -t rsa
heroku keys:add
heroku keys # lists keys
For me helped destroying whole app and recreating again - leaving it here for future reference.
heroku apps:destroy appname
heroku apps:create appname
heroku git:remote -a appname
git push heroku master
I added the https url to the .git/config file in my project folder. I found the HTTPS URL in the project Settings on Heroku. I then added that URL to replace the SSH url inside the .git/config text file.

Resources