I’m using node-oracledb inside a docker container in Kubernetes cluster, where containers are started with random user. Thus, the container doesn’t have home directory for the user.
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
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:250:5)
at new NodeError (node:internal/errors:361:7)
at Object.userInfo (node:os:366:11)
at Object.<anonymous> (/node_modules/oracledb/lib/thin/sqlnet/navNodes.js:446:64)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18) {
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]
}
4. Include a runnable Node.js script that shows the problem.
1. What versions are you using?
OS: Alpine Linux 3.16 (Dockerhub image tag: node:18.16.0-alpine3.16) node.js: v18.16.0 node-oracledb: 6.0.0
2. Is it an error or a hang or a crash?
Node.js process throws a
SystemError
and crashes.3. What error(s) or behavior you are seeing?
I’m using node-oracledb inside a docker container in Kubernetes cluster, where containers are started with random user. Thus, the container doesn’t have home directory for the user.
node-oracledb uses
os.userInfo()
to get the user information. This will throw aSystemError
if home directory doesn’t exist. https://nodejs.org/api/os.html#osuserinfooptionsFull error message:
4. Include a runnable Node.js script that shows the problem.
Check the minimum example with dockerfile included in: https://github.com/tomirantanen/oracledb-issue