Webpack-dev-server: Port seems to be open, but connection refused

Created on 9 Apr 2015  路  16Comments  路  Source: webpack/webpack-dev-server

if I access via localhost:2015 - all works fine, but 192.168.7:2015 (my IP in local net) - CONNECTION REFUSED

Most helpful comment

--host 0.0.0.0 should be added to the docs. Only a little hint that 0.0.0.0 is enough to access the machine from other machines like mobile devices.

All 16 comments

one of the previous version 1.7.0 - work's ok

Yes, when I set --host 0.0.0.0 - all start workin, please add this to Documentation

+1

Not sure why this should have to be added to the documentation. The 0.0.0.0 address is not a feature of webpack-dev-server, it is part of IPv4. A basic knowledge of networking is kind of expected when configuring a web application.

ok

Pardon my ignorance, but what exactly I should do to prevent this message? It worked with previous webpack. Do I have something wrong in my settings? https://github.com/steida/este/tree/master/webpack

I'm not sure why it would have worked in a previous version, but your dev server config is currently written to only listen on the device's loopback interface here.

Try something like:

new WebpackDevServer(webpack(webpackConfig), options).listen('8888', callback);

The other lines in that dev config that mention localhost will need to be tweaked as well.

Didn't help, same behavior :(

What behavior are you referring to? More information would be helpful.

I think I got it. Piping is restarting server, and it seems also webpack-dev-server is restarted. https://github.com/steida/este/blob/master/src/server/index.js#L3

Thank you for directing me.

Not sure why this should have to be added to the documentation

@troutowicz I disagree. The official documentation currently has 0 mentions regarding this newly added host config option, and some people will need this option to make things work in 1.8.0 again. Can't expect everyone to come up here and dig for clues for solutions.

http://webpack.github.io/docs/webpack-dev-server.html#cli

I added the --host flag to the docs a while back. I am with you that that should be in the docs. I interpreted @11111000000's comment as a request for an explanation on the meaning of 0.0.0.0.

--host 0.0.0.0 should be added to the docs. Only a little hint that 0.0.0.0 is enough to access the machine from other machines like mobile devices.

problem still after add --host 0.0.0.0 to cli, but i solved by use another hotspot share software wifi鍏变韩澶у笀

before that i use 灏忓害WIFI

just mark the solution who may use 灏忓害WIFI still got connection refused

Was this page helpful?
0 / 5 - 0 ratings