-
Notifications
You must be signed in to change notification settings - Fork 291
Invalid argument: family must be 4 or 6 #3413
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
Comments
These files are part of node core, so they're actually embedded inside of the @lindaorny I'll try to investigate some more. |
Thanks @bl-ue! I just think if we can amend the file inside the |
What would be best is for me to see it myself. Could you perhaps enable SSH access on your VM, and send me the credentials here, or something like that? Being able to reproduce the issue myself would be so invaluable, I might be able to root it down. (I'm going to bed now, so you might want to wait 9 hours before you do that, I'll be up by then.) |
Maybe, but when @dmilith tried that it gave him a different strange error. |
ping @lindaorny I'm available now if you want to let me SSH in — I'll probably get it figured out in a few hours. |
@bl-ue By looking into more details from the nodejs log
I added some logger to the file The execution stops at
So the issue is related to the Socket when establishing connection. Then, I trace back the Then, I go through the code at the
and trace to the dns.lookup function... and I go to the
At
It is suspected that the socketio fail to connect to the node repository. |
When I reference It seems that the nodejs behavior on the node built at openstack is strange. On openstack,
On vmware vm,
The value of It can be one of the clue too... |
Ah, so perhaps |
@lindaorny are you able to download files from GitHub and put them on OpenStack? I'll build a copy of node with some debugging in The file should be about 50-60 MB. |
Yes. I am able to download files from Github and put them on Openstack. Sure. I will wait for your update. Thanks a lot! |
To clarify: what exact command triggered the error? |
I just installed the desired nodejs package. Perform npm init and npm install express. The command is like below:
Just simply cannot install any package... A side note: The network connection is completely fine as I can ping the nodejs repository and perform |
Ah, okay, that's all great info. I'll investigate tomorrow — I'm off now. Thank you! (the side note bit is really invaluable) |
@bl-ue any clue so far ... |
@bl-ue Hey.. Just solved the issue which I feel really grateful... The issue is with the hypervisor behind openstack. At first, I tried to compiled my own version of nodejs using the steps mentioned Building Node.js on supported platforms here. I added one line of code at dns.js to bypass the error and I can finally npm install the package on the machine. However, it is not a really ideal solution as the compilation of customized nodejs takes time and we really do not know the root cause. It may cause issue afterwards. Therefore, I have a deeper search on the internet. It seems it is related to QEMU bug. QEMU has floating point cast to int issue and the patch is at version 4.2. The steps is as shown Download QEMU. Again, the compilation takes time. I am not really understand why the compilation of QEMU need to be done on our own machine with the whole ./configure and make process. The patch not really help or I am not very sure about the steps to install QEMU. I finally give up using QEMU and used KVM instead. I change the openstack compute base hypervisor to KVM and oopss... The calculation of undefined variable returns 0 not 4294967295... Hope can help anyone future in need when deploying nodejs on openstack. |
Uh oh!
There was an error while loading. Please reload this page.
I am installing nodejs on the machine built on top of openstack with ubuntu cloud image 16.04. However, it prompts "Invalid argument: family must be 4 or 6" whenever I type npm install.
I have googled a lot these days and have done a lot of trial and error but cannot find a workable solution... I am posting here and hoping that I can gather opinion to resolve the issue T.T which I really want to build a docker nodejs app but do not want to stuck here.
Below is the list of item that I have tried:
(1) Try to install nodejs version from v4 to v13
I installed the nodejs by the following steps:
apt-get method:
which by default the nodejs version installed is v4.2.6. This allows me to perform npm install without the "Invalid argument: family must be 4 or 6" but the version of the modules is too old which is not compatible to my app requirement.
Install using a PPA
Install using nvm
Then, I try the PPA installation and nvm installation method by creating new ubuntu 16.04 server over and over again (in case my previous installation by apt remove has not completely remove nodejs package). However, the same family 4 or 6 issue prompt out again when using node v8, v9, v10, v11, v12. Only the version under v8 does not have the issue but again I want v8 as I need v8 to compatible to my app.
(2) Try out different ubuntu image
I tried out ubuntu 16.04, 18.04 and 20.04 by using the point (1) installation method but still does not help so it does not related to my OS version
(3) Change the nodejs node setting
From
https://github.com/nodejs/node/issues/8635
From
https://npm.community/t/npm-install-g-typescript-fails-with-npm-err-the-value-false-is-invalid-for-option-readablehighwatermark/8668/3
From
https://stackoverflow.com/questions/60049568/npm-error-the-value-4294967295-is-invalid-for-option-family
I searched through all the file in the ubuntu server that contain options.family string and
(4) I doubt if it related to ipv4 or ipv6 setting
The server orginally is configured with both ipv6 and ipv4 and I disable ipv6 on my ubuntu machine but still no help
(5) I doubt if the network speed is to slow to download packages
I set the
npm install -timeout=9999999
but still no help(6) I doubt if it is related to the openstack ubuntu cloud image issue
I extracted the raw format cloud image instead of qcow2 format to build the server and install node by using the steps at point(1) but still no help
Hope that anyone can help to give me some insight T.T
Thanks!
The text was updated successfully, but these errors were encountered: