Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Packager] npm start ERROR listen EAFNOSUPPORT :::8081 #2441

Closed
fsp1990 opened this issue Aug 26, 2015 · 13 comments
Closed

[Packager] npm start ERROR listen EAFNOSUPPORT :::8081 #2441

fsp1990 opened this issue Aug 26, 2015 · 13 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@fsp1990
Copy link

fsp1990 commented Aug 26, 2015

I run react-native on centos64 , it will be error when npm start:

ERROR listen EAFNOSUPPORT :::8081
{"code":"EAFNOSUPPORT","errno":"EAFNOSUPPORT","syscall":"listen","address":"::","port":8081}
Error: listen EAFNOSUPPORT :::8081
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at Server._listen2 (net.js:1218:19)
at listen (net.js:1267:10)
at net.js:1370:9
at doNTCallback3 (node.js:440:9)
at process._tickCallback (node.js:346:17)
at Function.Module.runMain (module.js:473:11)
at startup (node.js:117:18)
at node.js:951:3

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.

npm ERR! Linux 2.6.32-431.23.3.el6.x86_64
npm ERR! argv "/root/.nvm/versions/io.js/v3.2.0/bin/iojs" "/root/.nvm/versions/io.js/v3.2.0/bin/npm" "start"
npm ERR! node v3.2.0
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! BTYAppIos3React@0.3.0 start: node_modules/react-native/packager/packager.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the BTYAppIos3React@0.3.0 start script 'node_modules/react-native/packager/packager.sh'.
npm ERR! This is most likely a problem with the BTYAppIos3React package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node_modules/react-native/packager/packager.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls BTYAppIos3React
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/src/bty_nodeJs/npm-debug.log

@ide
Copy link
Contributor

ide commented Aug 26, 2015

Try io.js 2.x. If that doesn't work for you then I think you might need OS X.

@fsp1990
Copy link
Author

fsp1990 commented Aug 26, 2015

@ide what's the reason? i try io.js 2.5.0 and 2.4.0, but it does't work (: I really don't want to switch to OS X

@brentvatne
Copy link
Collaborator

Any ideas @amasad?

@brentvatne brentvatne changed the title npm start ERROR listen EAFNOSUPPORT :::8081 [Packager] npm start ERROR listen EAFNOSUPPORT :::8081 Aug 30, 2015
@amasad
Copy link
Contributor

amasad commented Sep 8, 2015

Never seen this before. Can your machine listen on any other http port?

@fsp1990
Copy link
Author

fsp1990 commented Sep 8, 2015

@amasad yes. it was my apache server.

@ide
Copy link
Contributor

ide commented Sep 8, 2015

@cheyueyong can you try io.js 2.5.0?

@fsp1990
Copy link
Author

fsp1990 commented Sep 9, 2015

@ide io.js 2.2.0 ~2.5.0 is not ok i run 'nvm install v2.x.0' to install.

@ide
Copy link
Contributor

ide commented Sep 9, 2015

Maybe your computer / environment doesn't support IPv6? That error means "address family not supported". Could try binding to 127.0.0.1 instead of ::.

@fsp1990
Copy link
Author

fsp1990 commented Sep 9, 2015

how to bind 127.0.0.1 ? @ide

@ide
Copy link
Contributor

ide commented Sep 9, 2015

You'll have to read the packager code under packager/react-packager and figure it out.

@LunaGao
Copy link

LunaGao commented Dec 25, 2015

using the ipv6

@brentvatne
Copy link
Collaborator

Closing this issue, please create a new issue with some more details if possible @LunaGao :)

@tdzl2003
Copy link
Contributor

In this file, binds uses ipv6 address '::', which is not supported by some machine.

ghost pushed a commit that referenced this issue Jan 20, 2016
Summary:
Now packager only listen to "::", which is IPv6 "Any address".
It failed to run in IPv4 Environment.

defaults to undefined or empty string will fix this.

And I think it's necessary to let user define host by cli argument.

It's also for security reason. When working on a public network, it's much safer to listen with localhost instead of ::, which may let everyone in same network be able to get your code from debugger-ui.

recommit for #1918, fixes #2441
Closes #5377

Reviewed By: svcscm

Differential Revision: D2842594

Pulled By: martinbigio

fb-gh-sync-id: 575944c5469dac80e99136a7903ea99f5339dba1
christopherdro pushed a commit to wildlifela/react-native that referenced this issue Jan 20, 2016
Summary:
Now packager only listen to "::", which is IPv6 "Any address".
It failed to run in IPv4 Environment.

defaults to undefined or empty string will fix this.

And I think it's necessary to let user define host by cli argument.

It's also for security reason. When working on a public network, it's much safer to listen with localhost instead of ::, which may let everyone in same network be able to get your code from debugger-ui.

recommit for facebook#1918, fixes facebook#2441
Closes facebook#5377

Reviewed By: svcscm

Differential Revision: D2842594

Pulled By: martinbigio

fb-gh-sync-id: 575944c5469dac80e99136a7903ea99f5339dba1
MattFoley pushed a commit to skillz/react-native that referenced this issue Jan 21, 2016
Summary:
Now packager only listen to "::", which is IPv6 "Any address".
It failed to run in IPv4 Environment.

defaults to undefined or empty string will fix this.

And I think it's necessary to let user define host by cli argument.

It's also for security reason. When working on a public network, it's much safer to listen with localhost instead of ::, which may let everyone in same network be able to get your code from debugger-ui.

recommit for facebook#1918, fixes facebook#2441
Closes facebook#5377

Reviewed By: svcscm

Differential Revision: D2842594

Pulled By: martinbigio

fb-gh-sync-id: 575944c5469dac80e99136a7903ea99f5339dba1
brentvatne pushed a commit to expo/react-native that referenced this issue Jan 22, 2016
Summary:
Now packager only listen to "::", which is IPv6 "Any address".
It failed to run in IPv4 Environment.

defaults to undefined or empty string will fix this.

And I think it's necessary to let user define host by cli argument.

It's also for security reason. When working on a public network, it's much safer to listen with localhost instead of ::, which may let everyone in same network be able to get your code from debugger-ui.

recommit for facebook#1918, fixes facebook#2441
Closes facebook#5377

Reviewed By: svcscm

Differential Revision: D2842594

Pulled By: martinbigio

fb-gh-sync-id: 575944c5469dac80e99136a7903ea99f5339dba1
@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants