olebedev / go-starter-kit

[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Other
2.82k stars 358 forks source link

connect ECONNREFUSED 127.0.0.1:5000 #27

Closed magj2006 closed 8 years ago

magj2006 commented 8 years ago

when i make serve, the output is :

Error: connect ECONNREFUSED 127.0.0.1:5000 at Object.exports._errnoException (util.js:856:11) at exports._exceptionWithHostPort (util.js:879:20) at TCPConnectWrap.afterConnect as oncomplete

i type lsof -i:5000, nothing output.

olebedev commented 8 years ago

Could you paste the output of the env command?

magj2006 commented 8 years ago

Thanks so much. the output is in env_output.txt env_output.txt

olebedev commented 8 years ago

It's strange a bit. I didn't see anything what can be the cause of it. What is output of go build -o $GOPATH/bin/app. Is the binary there after this command?

magj2006 commented 8 years ago

it happened when i modify some file.

i typed go build -o $GOPATH/bin/app, nothing output. but i can see app file.

cloud@ubuntu:~/Code/gsk$ ls -l bin/app -rwxr-xr-x 1 cloud cloud 14010368 Jan 21 12:33 bin/app

olebedev commented 8 years ago

Please try to reproduce this steps and make sure that you have all dependencies(particularly fswatch) installed.

magj2006 commented 8 years ago

yea, i do it by your steps: 1. npm i 2.export GOPATH=pwd 3.srlt r && srlt e go install {{.Name}}/... 4.make serve it's good, but when I modify some file, it output ECONNREFUSED 127.0.0.1:5000 and many restart app...

cloud@ubuntu:~/Code/gsk$ which fswatch /opt/apps/fswatch/bin/fswatch

olebedev commented 8 years ago

Hm, I cannot reproduce this bug because I on Mac OS and it works well for me.

It looks like that Golang server is terminated but not restarted. Try to do it manually step-by-step from makefile rules with each step total checking.

magj2006 commented 8 years ago

Okay, I try it. thanks so much.

olebedev commented 8 years ago

Closed. Feel free open it if needed.