Skip to content
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

Error in starting tb-js-executor:3.3.3 #58

Open
michelevolpe opened this issue Feb 18, 2022 · 0 comments
Open

Error in starting tb-js-executor:3.3.3 #58

michelevolpe opened this issue Feb 18, 2022 · 0 comments

Comments

@michelevolpe
Copy link

michelevolpe commented Feb 18, 2022

In starting tb-js-executor:3.3.3 the following error is recorded:

2022-02-18 10:48:02,925 [main] INFO: kafka template started.
2022-02-18 10:48:03,725 [main] ERROR: uncaughtException: options.port should be >= 0 and < 65536. Received NaN.
RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received NaN.
at new NodeError (node:internal/errors:371:5)
at validatePort (node:internal/validators:216:11)
at Server.listen (node:net:1461:5)
at Function.listen (/usr/share/tb-js-executor/node_modules/express/lib/application.js:618:24)
at Object. (/usr/share/tb-js-executor/api/httpServer.js:30:5)


It seems the offending line is:

(/usr/share/tb-js-executor/api/httpServer.js:30:5)

where it tries to start a web server for readiness probe:

app.listen(httpPort, () => logger.info(Started http endpoint on port ${httpPort}. Please, use /livenessProbe !))

using the httpPort config parameter:

const config = require('config'),
logger = require('../config/logger')._logger('httpServer'),
express = require('express');

const httpPort = Number(config.get('http_port'));

But it seems the config parameter httpPort cannot be retrieved.

Indeed, looking at the source, the config file is in config/default.yml

http_port: "8888" # /livenessProbe

but it seems it cannot be read or its type is not correct, so ending up in the error:

port should be >= 0 and < 65536. Received NaN.

Thanks
Michele

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant