10

My steps are below:

  1. Download the heroku-osx.pkg, and installed it.
  2. $ heroku login with my account and password
  3. cloned the ruby-getting-started: $ git clone https://github.com/heroku/ruby-getting-started.git
  4. But when I run $ heroku create in my Terminal.

Reports the error:

Creating app... !
▸ ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443

I have find the related question in SO:

But they are not when execute $ heroku create comes out the error.

Community
  • 1
  • 1
aircraft
  • 25,146
  • 28
  • 91
  • 166

9 Answers9

20

The same was happening to me on Mac OS X 10.12.6 in iTerm2 3.1.5

Restarting iTerm solved the issue for me.

the21st
  • 1,012
  • 1
  • 10
  • 24
10

Carelessly, I don't know why, I tried several times of :

$ heroku create

It create succeed, with the logs:

Creating app... done, ⬢ still-harbor-32209    
https://still-harbor-32209.herokuapp.com/ |    
https://git.heroku.com/still-harbor-32209.git

So, I think try several times will solve it.

aircraft
  • 25,146
  • 28
  • 91
  • 166
  • 2
    Did the same for me when trying to run `heroku run console`. Didn't work the first time but it worked the second time. Seems random. – Pere Apr 02 '17 at 04:28
8

It means that the connection between api.heroku.com with a port of 443 and to your PC failed and results to shutdown. Thus retrying the command will succeeds.

Joseph
  • 653
  • 1
  • 12
  • 28
6

You may not be connected to the internet. Make sure to check your connection as it is required to complete this command.

Wilfred Ruck
  • 109
  • 1
  • 9
2

This happened to me when the internet temporarily cut out for a few seconds while I was trying to run a heroku command.

The Heroku CLI returned Error: getaddrinfo ENOTFOUND api.heroku.com

As soon as the internet connection was restored, everything was back to normal

stevec
  • 41,291
  • 27
  • 223
  • 311
1

I experienced the same issue recently. To debug this:

1) I tried restarting my terminal entirely CMD+Q, but still hit the timeout issue

2) I ran a whois on my-heroku-app.com and that command also timed out, even though I could connect to it through my browser

3) I disconnected my VPN and ran a whois command. This fixed the issue

After reconnecting my VPN, everything worked smoothly. Not sure what caused the hiccup, but I hope these steps help for anyone trying to debug this.

Joe
  • 1,850
  • 1
  • 13
  • 15
0

I had a similar issue. my OS is windows, I solve this problem by restarting my command line and running the command all over and everything worked fine

fill_J
  • 459
  • 5
  • 13
0

The problem for me was network connection, by checking and re-establishing connection, it worked perfectly fine

Nicholas Mberev
  • 1,563
  • 1
  • 14
  • 14
0

I was getting the same , Because I was connected to VPN and I think network was blocking the same . So disconnect VPN and try once.