seandaniels
06/05/2023, 2:14 PMThe IP address that [myhost.name] resolves to can't be bound. If you ping it, does it point to a local network adapter?
In order to get the server running I have to manually open /etc/hosts
and remove the prior entry. Is this a known issue or is something wrong with my configuration? MacOS, using CommandBox 5.9.0+00721
and hostupdater 1.9.2
bdw429s
06/05/2023, 2:52 PMseandaniels
06/05/2023, 2:52 PMserver start
bdw429s
06/05/2023, 2:52 PMseandaniels
06/05/2023, 2:52 PMseandaniels
06/05/2023, 2:52 PMbdw429s
06/05/2023, 2:53 PMseandaniels
06/05/2023, 2:53 PMbdw429s
06/05/2023, 2:53 PMbdw429s
06/05/2023, 2:54 PMseandaniels
06/05/2023, 2:54 PMPING myhost.name (127.127.0.1): 56 data bytes
64 bytes from 127.127.0.1: icmp_seq=0 ttl=64 time=0.029 ms
64 bytes from 127.127.0.1: icmp_seq=1 ttl=64 time=0.210 ms
64 bytes from 127.127.0.1: icmp_seq=2 ttl=64 time=0.085 ms
64 bytes from 127.127.0.1: icmp_seq=3 ttl=64 time=0.254 ms
seandaniels
06/05/2023, 2:55 PMbdw429s
06/05/2023, 2:55 PMbdw429s
06/05/2023, 2:56 PMbdw429s
06/05/2023, 2:56 PMseandaniels
06/05/2023, 2:57 PMbdw429s
06/05/2023, 7:00 PMbdw429s
06/05/2023, 7:01 PMifconfig lo0 alias 127.127.x.x up
when adding a new IP address. I've had Mac users report that quit working after updating their system.bdw429s
06/05/2023, 7:01 PMseandaniels
06/05/2023, 7:02 PMseandaniels
06/05/2023, 7:03 PMbdw429s
06/05/2023, 7:05 PMbdw429s
06/05/2023, 7:06 PMbdw429s
06/05/2023, 7:07 PMBindException
bdw429s
06/05/2023, 7:07 PMcreateObject( "java", "java.net.InetAddress" ).getByName( 'myhost.name' ).toString()
bdw429s
06/05/2023, 7:08 PMseandaniels
06/05/2023, 7:09 PMbdw429s
06/05/2023, 7:10 PMUnknownHostException
which is throws the error 2 lines abovebdw429s
06/05/2023, 7:11 PMcreateObject( "java", "java.net.ServerSocket" ).init( 8080, 1, createObject( "java", "java.net.InetAddress" ).getByName( '<http://site1.com|site1.com>' ) ).close()
where <http://site1.com|site1.com>
is the hostname and 8080
is the port (replace as-necessary)bdw429s
06/05/2023, 7:11 PMBindException
which causes the error you see.bdw429s
06/05/2023, 7:12 PMseandaniels
06/05/2023, 7:17 PMcreateObject( "java", "<http://java.net|java.net>.InetAddress" ).getByName( 'myhost.name' ).toString()
in the REPL I get: Can't assign requested address (Bind failed)
seandaniels
06/05/2023, 7:17 PMseandaniels
06/05/2023, 7:18 PMbdw429s
06/05/2023, 7:19 PMbdw429s
06/05/2023, 7:19 PMbdw429s
06/05/2023, 7:20 PMifconfig lo0 alias 127.127.x.x up
trick would be my first guess at what the issue may beseandaniels
06/05/2023, 7:20 PMbdw429s
06/05/2023, 7:20 PMbdw429s
06/05/2023, 7:20 PMbdw429s
06/05/2023, 7:20 PMtry{}catch( any e ) {}
bdw429s
06/05/2023, 7:21 PMverboseErrors
config setting is enabled.seandaniels
06/05/2023, 7:23 PMbdw429s
06/05/2023, 7:23 PMseandaniels
06/05/2023, 7:32 PMbdw429s
06/05/2023, 7:36 PMbdw429s
06/05/2023, 7:36 PMbdw429s
06/05/2023, 7:36 PMifconfig
command yet?seandaniels
06/05/2023, 7:42 PMifconfig lo0
the response isseandaniels
06/05/2023, 7:42 PMlo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.127.0.7 netmask 0xff000000
inet 127.127.0.1 netmask 0xff000000
inet 127.127.0.2 netmask 0xff000000
nd6 options=201<PERFORMNUD,DAD>
seandaniels
06/05/2023, 7:43 PMbdw429s
06/05/2023, 7:53 PMbdw429s
06/05/2023, 7:53 PMhosts
file that isn't workingbdw429s
06/05/2023, 7:54 PMup
command that the hostupdater module runs the first time it puts an IP address in your hosts file.bdw429s
06/05/2023, 7:55 PMhosts
file
• run that exactly same full ifconfig command
• see if it makes any difference in Java being able to bind to itseandaniels
06/05/2023, 7:55 PMseandaniels
06/05/2023, 7:57 PMseandaniels
06/05/2023, 7:59 PMseandaniels
06/05/2023, 8:01 PMbdw429s
06/05/2023, 8:26 PM