You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With upgrade from Node 16 to 18, I noticed the IPv4 localhost (127.0.0.1) is no longer used.
By default is used IPv6 localhost (::1).
From curl with -vvv option:
* Trying 127.0.0.1:3000...
* connect to 127.0.0.1 port 3000 failed: Connection refused
* Trying [::1]:3000...
* Connected to localhost (::1) port 3000 (#0)
While it is not a problem for curl, it is a problem when one tries to call localhost with other clients, e.g. hosted on JVM.
Trying to reach localhost:3000 from Java (tested on Java 11 & 17), results with:
Execution error (ClosedChannelException) at sun.nio.ch.SocketChannelImpl/ensureOpen (SocketChannelImpl.java:195).
Current Behavior
IPv4 localhost is not available.
It is possible to use it but host: 127.0.0.1 needs to be specified in config, otherwise by default service is available under ::1.
Either make IPv4 localhost (127.0.0.1) reachable by default, or clear messaging in logs is needed that service is running exclusively on IPv6 localhost (::1).
Environment
serverless version: 3.38.0
serverless-offline version: 13.5.0
node.js version: v18.20.2
OS: Fedora 38
The text was updated successfully, but these errors were encountered:
@rynkowsg I can't reproduce the issue. Can you share a sample repo? The link to the sample app you gave doesn't seem to be a good example of the issue you are describing.
Bug Report
With upgrade from Node 16 to 18, I noticed the IPv4 localhost (127.0.0.1) is no longer used.
By default is used IPv6 localhost (::1).
From curl with
-vvv
option:While it is not a problem for curl, it is a problem when one tries to call localhost with other clients, e.g. hosted on JVM.
Trying to reach localhost:3000 from Java (tested on Java 11 & 17), results with:
Current Behavior
IPv4 localhost is not available.
It is possible to use it but
host: 127.0.0.1
needs to be specified in config, otherwise by default service is available under ::1.Sample Code
Expected behavior/code
Either make IPv4 localhost (127.0.0.1) reachable by default, or clear messaging in logs is needed that service is running exclusively on IPv6 localhost (::1).
Environment
serverless
version: 3.38.0serverless-offline
version: 13.5.0node.js
version: v18.20.2OS
: Fedora 38The text was updated successfully, but these errors were encountered: