vertica / vertica-nodejs

Official native node.js client for the Vertica Analytics Database.
https://www.vertica.com/
Apache License 2.0
12 stars 14 forks source link

Error: uv_os_get_passwd returned ENOENT in container environment due to PR#132 #136

Closed HankLeo closed 6 months ago

HankLeo commented 6 months ago

Hi mates,

Nowadays we got the error as below:

SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
    at new SystemError (node:internal/errors:256:5)
    at new NodeError (node:internal/errors:367:7)
    at Object.userInfo (node:os:365:11)
    ...
    at node:internal/main/run_main_module:28:49 {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: -2,
    code: 'ENOENT',
    message: 'no such file or directory',
    syscall: 'uv_os_get_passwd'
  },
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}

This error is imported from release 1.1.1 with the change: https://github.com/vertica/vertica-nodejs/pull/132/files#diff-8b957f11f1cf0fb604dac14ef10fc85b583bd97977888c111b53c450376bc199R124 When our application runs to this.client_os_user_name = os.userInfo().username in connection-parameters.js, this error occurs. We run our application in the pod of container environment with limited permission and protected user. Can you give me any advice or just add some fallback logic to handle this error?

Best Regards, Hank

sitingren commented 6 months ago

Fix is included in v1.1.3