When Presto returns a nextUri without a specified port number(e.g. http://prestoserver/v1/api/...), the following error is returned: RangeError: Port should be >= 0 and < 65536. Received .RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received .
Specifically, line 59, URL returns href.port as ''.
The way to fix this is to add the following at line 69: if (opts.port === '') delete opts.port; or opts.port = client.port;
My scenario is not an unusual situation. I simply have a firewall forwarding port 80 (as well as 443) to the presto coordinator on port 8080. The above error is seen when trying to contact it using port 80 or port 443 (with ssl turned on).
Would you be able to add one of the above-mentioned fixes?
When Presto returns a nextUri without a specified port number(e.g.
http://prestoserver/v1/api/...
), the following error is returned:RangeError: Port should be >= 0 and < 65536. Received .RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received .
This is due to the
opts.port
being an empty string when making a subsequent request due to: https://github.com/tagomoris/presto-client-node/commit/5b879892ae147c2f7013c7dfd0a2217469c36eff#diff-bc0ed6253188f59cfb43f199aaea9eabR57-R67Specifically, line 59, URL returns href.port as
''
.The way to fix this is to add the following at line 69:
if (opts.port === '') delete opts.port;
oropts.port = client.port;
My scenario is not an unusual situation. I simply have a firewall forwarding port 80 (as well as 443) to the presto coordinator on port 8080. The above error is seen when trying to contact it using port 80 or port 443 (with ssl turned on).
Would you be able to add one of the above-mentioned fixes?
Thanks