http calls from node proxies fail to some servers with error EINVAL

Not applicable

We are experiencing an issue where we are unable to do some http calls out of our NodeJS proxies.

We have a private cloud install. We are using a127 to build nodejs proxy apis and then we deploy (using a127 project deploy) to edge. The http calls work fine when running on our local devices (via a127) however fail with the following error when deployed to Edge: { [Error: connect EINVAL] message: 'connect EINVAL', code: 'EINVAL', errno: 'EINVAL', syscall: 'connect' }

We are using the NPM request module version 2.50.00. We are able to perform GET and POST calls to some servers but others fail. GET calls from the nodejs proxies to APIs deployed on Apigee fail as well. I am able to successfully ping from the Edge server to the servers that the http calls fail to call. I can also call those services using Postman from my local device successfully.

I have looked at the nodejs.properties file deployed at: /opt/apigee4/conf/apigee/message-processor it contains the following properties:

#nodejs.enabled=true listen.ports.allowed=-1

#connect.ports.allowed=

#connect.ranges.allowed=

#connect.ranges.denied=

script.tick.timeout.seconds=60

max.class.cache.entries=2000

npm.registry.uri=https://apigee.registry.nodejitsu.com

npm.preserve.temp.dirs=false h

ttp.request.timeout.seconds=110

cached.log.lines=500 jar.loading.allowed=false

log.throttle.interval=300 log.throttle.limit=100

1 1 1,120
1 REPLY 1

Not applicable

The "connect.ranges.denied" and "connect.ranges.allowed" settings would cause Trireme to refuse to connect to various IP ranges. However since both are commented out in your installation that shouldn't be happening.

perhaps if you turned on debug in logback.xml we could see if there were some stack traces being emitted by Trireme.

Another possibility is to set the environment variable:

NODE_DEBUG=net

in your node.js code and we can see if that tells us anything.