lavagna icon indicating copy to clipboard operation
lavagna copied to clipboard

--bindAddress argument does not work properly in Lavagna 1.1.7 running in Windows

Open jhtlh opened this issue 3 years ago • 0 comments

When running Lavagna 1.1.7 in Windows, the --bindAddress argument does not work properly. The --port argument works fine.

When --bindAddress is not specified, Lavagna listens on all IP addresses (0.0.0.0) as expected. When --bindAddress <IP address> is specified, Lavagna listens on the last IP address on the last NIC, regardless of of the IP address specified with the --bindAddress argument.

Example scenario with four NICs:

Ethernet adapter Ethernet0: 10.99.0.50 Ethernet adapter Ethernet1: 10.99.0.51 Ethernet adapter Ethernet2: 10.99.0.52 Ethernet adapter Ethernet3: 10.99.0.53, 10.99.0.100

Lavagna.xml argument test 1 (works as expected): -Ddatasource.dialect=HSQLDB -Ddatasource.url=jdbc:hsqldb:mem:lavagna -Ddatasource.username=sa -Ddatasource.password= -Dspring.profiles.active=dev -jar ..\..\lavagna\lavagna-jetty-console.war --port 8123

lavagna.out.log: Server is listening at 0.0.0.0/0.0.0.0:8123

netstat -nb output:

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:8123           0.0.0.0:0              LISTENING
 [java.exe]

Lavagna.xml argument test 2 (does not work as expected): -Ddatasource.dialect=HSQLDB -Ddatasource.url=jdbc:hsqldb:mem:lavagna -Ddatasource.username=sa -Ddatasource.password= -Dspring.profiles.active=dev -jar ..\..\lavagna\lavagna-jetty-console.war --bindAddress 10.99.0.51 --port 8123

lavagna.out.log: Server is listening at TestMachine/10.99.0.51:8123

netstat -nb output:

  Proto  Local Address          Foreign Address        State
  TCP    10.99.0.100:8123       0.0.0.0:0              LISTENING
 [java.exe]

In case it's relevant, this is running in a test environment on Windows 10 Pro version 21H1 build 19043.1165. Java version:

java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)```

jhtlh avatar Aug 17 '21 21:08 jhtlh