Node: Node 11 won't run on Windows Nano Server

Created on 31 Jan 2019  路  8Comments  路  Source: nodejs/node

  • Version: Node 11
  • Platform: Windows Nano Server

22712 introduced a dependency on NETAPI32.dll鈥檚 NetApiBufferFree and NetServerGetInfo which are not present on Windows Nano Server, and as a result, Node crashes on launch with STATUS_DLL_NOT_FOUND.

Looking at the code in #22712, I can suggest alternative dependencies (admittedly based on limited information/understanding): use GetVersionEx to get OS information, and use GetComputerNameEx to get the machine name.

Both GetVersionEx and GetComputerNameEx are guaranteed to be available on all versions of Windows and so should be preferred over other alternatives (including GetComputerName, which seems to be used in the fallback codepath in #22712).

Please let me know if I can help further with getting this issue resolved!

report

Most helpful comment

@jstarks I think uv_os_gethostname might do the trick :)

All 8 comments

@bterlson - thanks for reporting this. Don't know our support statement around Nano server. In addition, either the CI or I have system to test this . Do you want to go for a PR?

I would love to PR, but it would take me a lot of time that I don't have right now 馃槀 If necessary I can poke around here and see if I can find someone to take on this work?

I think the support statement for Windows Nano Server is somewhat irrelevant since we can fix this in a way that "just works" across all Windows versions. So I think you don't really even need CI beyond your normal Windows CI - if you replace the Net* calls with GetVersionEx and GetComputerNameEx and things pass in normal Windows CI you can have pretty high confidence this will work on every Windows.

That said, I am happy to help testing bits on nano server to validate this issue is fixed, and longer term I can help get nano server under CI because, long term, I'd like to see that happen 馃槃

/cc @bmeck who I was discussing this with earlier

Fwiw, I鈥檝e mentioned this somewhere, but I鈥檇 love it if we could replace the platform-specific code with uv_os_uname as much as possible?

I'm planning to work on that this weekend. There is a change I need to make in libuv first though.

It looks like uv_os_uname doesn't include the hostname, while the current code does query it. Is there a libuv function that includes this?

Otherwise the current implementation of uv_os_uname would certainly work fine on Nano Server containers.

@jstarks I think uv_os_gethostname might do the trick :)

@cjihrig I'll be around this weekend if you need help! I'll get a nano server VM up and running in anticipation.

@bterlson see https://github.com/libuv/libuv/pull/2170. If we take that approach, we should be able to remove the problematic code mentioned in the OP.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathanong picture jonathanong  路  91Comments

addaleax picture addaleax  路  146Comments

mikeal picture mikeal  路  90Comments

nicolo-ribaudo picture nicolo-ribaudo  路  147Comments

AkashaThorne picture AkashaThorne  路  207Comments