I'm trying to deploy node.js app on heroku for the first time. As instructed I installed heroku toolbelt but something is wrong.
My machine with windows 10 using heroku toolbelt
Issue:
C:\Users(username)\Downloads\Heroku [master]> heroku login heroku-cli:
Installing Toolbelt v4... ! 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: getaddrinfo: No such host is known.
(SocketError(Excon::Errors::SocketError) Command: heroku login
Version: heroku/toolbelt/3.42.45 (i386-mingw32) ruby/2.1.7 Error
ID: c47aaf8f037042beb25fdceb46cfe78f
More information in C:/Users/courtaks/.heroku/error.log
--------------------------------------------------------------------------------
Solved:
as instructed by the heroku team in this isssue: https://github.com/heroku/heroku/issues/1939
it appears to be a temporary DNS issue.
it's working now.
I didn't do anything except waiting the problem to solve it self. also try changing your dns server, maybe that will work.
--------------------------------------------------------------------------------
Almost 6 months later, I got the exact same issue on the first interaction with heroku, not a good start.
I used the command to verify the installation:
heroku --version
It probably needs some additional data downloading for the first start and installing/preparing heroku-cli.
I am behind a corporate firewall and git + npm are working perfectly fine (after one-time proxy configuration).
The issue resolved automatically after some time along with initial frustration and time consumption. Just shared my experience for any next user landing here until the issue is actually resolved.
Log File extract:
Heroku client internal error. getaddrinfo: No such host is known.
(SocketError)
.
.
.
Heroku client internal error. getaddrinfo: This is
usually a temporary error during hostname resolution and means that
the local server did not receive a response from an authoritative
server. (SocketError)
[cross posted partially on the given heroku git link, same like the original question and answer]
--------------------------------------------------------------------------------
Solved:
as instructed by the heroku team in this isssue: https://github.com/heroku/heroku/issues/1939
it appears to be a temporary DNS issue.
it's working now.
I didn't do anything except waiting the problem to solve it self. also try changing your dns server, maybe that will work.
--------------------------------------------------------------------------------
Related
I set up a NodeJS API on cPanel using the NodeJS setup that is provided. the app starts but none of my endpoints are reachable with 404 pages being displayed.
In the cPanel > metrics > errors I can see the error: Path for NodeJS application is invalid: /home/username/repositories/repo
where username is the cpanel username and repo is the server.
I used the built in git support in cPanel to link to a remote repo via SSH. This part is most likely not the problem since I can see the actual server files referenced in the NodeJS server with the correct path (which is why this error message is so strange.)
The server works fine on localhost so this likely has something to do with cPanel.
I have never hosted a node app on cPanel and I know a VPS would be better but this is what I have to work with for now. There isn't a lot of discussions/forums/docs on this online so I am running out of options.
I would highly appreciate it if someone can tell me what is wrong or guide me in the right direction for where to start looking for the problem.
I solved the problem. When you don't use a git repo you can use a relative path from your home to the place the server is stored. i.e. don't include home/username/ in the path
for git repos you must use the absolute path meaning
home/username/repositories/yourserver
where "username" is your cPanel username and "yourserver" is the name of the folder where your server is located
I installed heroku cli.
$ heroku --version
heroku-cli/6.14.36-15f8a25 (windows-x64) node-v8.7.0
Started cmd.exe as admin
$ heroku login (asked me for username and password)
After I provided the username and password. I get the following error:
! EACCES: connect EACCES 34.234.38.27:443
I tried using gitbash to login in heroku. I get the same error message if I try same thing in git bash using the following cmd:
winpty heroku login
I have looked everywhere I could. Most places have closed the tickets but there is no solution anywhere. I also tried deleting the heroku folder from appdata/local/ but that also didn't help. I know its permission issue. I get a better error message when I try
$ heroku update
heroku-cli: Updating plugins... done
! Get https://cli-assets.heroku.com/branches/v6/manifest.json: dial tcp 52.84.64.82:443: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.
I want to host a small NodeJS app for free. What are my other options because if I have to spend so much time just deploying then maybe it is not an option.
maybe your problem is the firewall or the antivirus, add the exception for the address that shows you (34.234.38.27:443), and do the test. Also check your antivirus if it is not blocking you heroku cli, and always run in administrator mode
You can also do the following. Enable debugging during login. Make sure to redact your password from the output before sending it to support! Enable it by running set HEROKU_DEBUG=true; set HEROKU_DEBUG_HEADERS=1; heroku login on Windows to get more information.
Good luck with your app my friend!
OS: Ubuntu 16.04
Hypervisor: VirtualBox
Network configuration: Nat Network with port forwarding to access the vms through the host ip. I can also ping a VM from another VM.
I try to connect my Jenkins app hosted on a VM to my BitBucket server also on a VM. I followed a tutorial on internet but when i enter the address of my git repository i'm getting this:
Failed to connect to repository : Command "usr/bin/git ls-remote -h http://admin#192.168.6.102:8005/scm/tes/repository-test.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'http://admin#192.168.6.102:8005/scm/tes/repository-test.git/': The requested URL returned error: 403
So, to be sure I tried to exectute the command on the terminal... and on the terminal it seems to work.. I can also push, clone, pull etc..
On this image you can see that it's true
Do you have an explanation?
EDIT:
I try some others things like use or not sudo to see if the permissions problem came from that and it seems that it's not the case.
But I see that there is no result when we use the "HEAD" argument.
Do you think that because "HEAD" give no result, git in jenkins interprets it like no answer and returns the damn** error 403?
EDIT 2:
I found that on the web: http: // jenkins-ci.361315.n4.nabble.com/Jenkins-GIT-ls-remote-error-td4646903.html
The guy has the same problem but in a different way, I will try to allocate more RAM to see if it does the trick.
There could be many possible problems, but you are getting 403 - Access Forbidden, which indicates some problem with permissions. I would suggest first common mistakes:
a) trying https instead http - my scm only uses https,
b) check if admin is correct - scm by default uses scmadmin.
Here I run the exact same command twice.
The first time I used the proxy configuration wich I need to access internet, and the second time I set the mandatory server on "none".
So there is a problem with the damn proxy.
I was thinking that the proxy was not used in NAT connection with VirtualBox...
I found the solution.
I had to reinstall jenkins to have a user named "jenkins" with his own home directory.
I don't know if it is linked or not, but I configured my bitbucket server to use only HTTPS with a self signed certificate (I work in lan)
My troubleshoot was linked with my proxy settings.
I disabled all my proxy settings in Linux so I was able to launch the command that did'nt worked in jenkins with terminal.
I logged with sudo su jenkins the commands also worked.
I found out that in the home directory of the jenkins user there was a "proxy.xml" file. I opened it and saw my old proxy settings.
I deleted all the content with vim, saved and restarted and the error was gone.
there can be git version miss match.....
I would suggest you update git once. maybe it will resolve your issues.
I am getting an error on a form submit in localhost, but no errors on my live website.
The error is: Error: Can't set headers after they are sent.
I ran git diff to see the differences between my remote and local repos, and there were some since I had made a couple of changes. Those changes were: adding a custom bootstrap configuration (I wanted to change the base font from 14 to 18px) and uninstalling New Relic, an npm package for analytics. I am not sure how any of that would have caused the error, I am just trying to explain thoroughly.
My remote git repository is the code behind my live site, which is not getting this error, so I decided to make my local files match my remote, so I ran:
git fetch origin
git reset --hard origin/master
git clean -f
and then ran git diff again and there were no differences this time. That is what is puzzling to me. It seems like there should be no difference. Thanks in advance for any tips.
As a result of some earlier testing I had created duplicate usernames, and this error is only occurring when logged in with one of the duplicates, which only exist in my local DB. That explains why I was getting this error in localhost and not in my live site.
I am on windows 7.
I followed the documentation on heroku there: https://devcenter.heroku.com/articles/nodejs
when I execute
git push heroku master
it does absolutely nothing and I get no error. I tried to re-generate my ssh key, to delete everything and do it again. Always the same.
Sorry for providing so few info but as I have no error message, it is really difficult for me to figure out...
If anyone else has this problem, my issue was that I was not pushing from my local master branch to heroku/master. You have to either push from your local master branch to heroku/master or run the command
git push heroku yourbranch:master
This is from the heroku documentation here
Ok. SSH Key problem. So if you have no error message on window, try to re-created manually your ssh key following this instruction and it will work. Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly
Might be a bit late, but just wanted to add the following:
A simple login over the cli resolved the issue for me.
heroku login
Comment above ^ worked for me:
heroku login