You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nodejs on AIX 7.2 os.networkInterfaces throws system error #30504
./node -e 'const os = require("os"); const interfaces = os.networkInterfaces(); for (const interface in interfaces) {console.log(interface); const addrs = interfaces[interface]; for (const addr of addrs) {console.log(addr.address)}}'
NodeJS 10.17.0 returns nothing.
NodesJS 11.15.0, 12.13.0, 13.10 return:
throw new ERR_SYSTEM_ERROR(ctx);
^
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: undefined returned undefined (undefined)
at Object.networkInterfaces (os.js:195:16)
at [eval]:1:49
at Script.runInThisContext (vm.js:116:20)
at Object.runInThisContext (vm.js:306:38)
at Object.<anonymous> ([eval]-wrapper:9:26)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at evalScript (internal/process/execution.js:80:25)
at internal/main/eval_string.js:23:3 {
code: 'ERR_SYSTEM_ERROR',
info: {},
errno: [Getter/Setter: undefined],
syscall: [Getter/Setter: undefined]
}
Works for me, and works in our CI. Which doesn't mean it works everywhere, obviously, but I'll need more information. ifconfig -a would help. Do you have interfaces?
Thanks for the answer. It is AIX 7.2 TL3 SP3 LPAR in IBM cloud. It has interfaces:
# lsdev -Cc if
en0 Available Standard Ethernet Network Interface
en1 Available Standard Ethernet Network Interface
en2 Available Standard Ethernet Network Interface
et0 Defined IEEE 802.3 Ethernet Network Interface
et1 Defined IEEE 802.3 Ethernet Network Interface
et2 Defined IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
I'll see if I can repro, its probably an assumption far-down that interfaces have IPv4 addresses if they are up.
Do you have any suggestions on how to create an ifx without an address? If there's a non-destructive way, it would save some time. All the AIX I have access to are remote, so I can't take the addresses off the regular interfaces!
If you see, it shows all IPv6 addresses correct, but I'm not sure if it is correct to show IPv4 address 0.0.0.0 for en2. It has no IPv4 address. Anyway it works! Thank you @richardlau!
Activity
sam-github commentedon Nov 16, 2019
Works for me, and works in our CI. Which doesn't mean it works everywhere, obviously, but I'll need more information.
ifconfig -awould help. Do you have interfaces?sam-github commentedon Nov 16, 2019
libuv/libuv@810377f is the only sinilar bug I can recall, but it doesn't seem directly related.
@nodejs/platform-aix
aklyachkin commentedon Nov 16, 2019
Thanks for the answer. It is AIX 7.2 TL3 SP3 LPAR in IBM cloud. It has interfaces:
It looks like the problem is in sit0. I removed sit0 and it works (v13.1.0):
aklyachkin commentedon Nov 16, 2019
Not only on sit0, but on any interface without IP address:
sam-github commentedon Nov 16, 2019
I'll see if I can repro, its probably an assumption far-down that interfaces have IPv4 addresses if they are up.
Do you have any suggestions on how to create an ifx without an address? If there's a non-destructive way, it would save some time. All the AIX I have access to are remote, so I can't take the addresses off the regular interfaces!
sam-github commentedon Nov 16, 2019
I could try to take the addr off of my lo0, but I'm a bit worried about bricking the LPAR:
aklyachkin commentedon Nov 16, 2019
The problem is with interfaces which have IPv6 address, but no IPv4 address.
The way to create a virtual interface on AIX without any IP (no problems with nodejs):
with IPv6 address but without IPv4 (the error above):
with IPv6 and IPv4 addresses (no problems):
richardlau commentedon Nov 19, 2019
I think libuv/libuv#2545 should fix this. Would it be possible for you to test it?
aklyachkin commentedon Nov 19, 2019
I'm not so deep in details of node.js functionality. How can I test it? Should I first compile libuv and then nodejs? or run some test with libuv?
sam-github commentedon Nov 19, 2019
roughly:
git clone node, checkout the branch you want to use,
cd ./deps; rm -rf uv;then git clone richards' branch of libuv intodeps/uv.Follow the standard node.js build instructions after that: https://github.com/nodejs/node/blob/master/BUILDING.md
richardlau commentedon Nov 19, 2019
@aklyachkin Patch
deps/libuvwith the changes in that PR and then rebuild Node.js.aklyachkin commentedon Nov 19, 2019
@sam-github @richardlau thank you for the explanation! I will try to compile it.
aklyachkin commentedon Nov 20, 2019
I compiled v13.1.0 and it works:
ifconfig output to compare:
If you see, it shows all IPv6 addresses correct, but I'm not sure if it is correct to show IPv4 address 0.0.0.0 for en2. It has no IPv4 address. Anyway it works! Thank you @richardlau!
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0
deps: upgrade to libuv 1.34.0