Hi all,
I have a jailed setup running www/tomcat7. The jail's interface is lo2 with an IPv4 address 192.168.13.3.
when I try to telnet my local IP (from within the jail) on any of its listening ports, I get:
The same holds if I try to connect to localhost. My /etc/hosts reads:
If I connect to mysql server using mysql(1) command (using no host arguments) everything works as expected (probably via a socket). The problem is that the application I try to run on tomcat uses a custom configuration that reads a connection url, and no matter what value I give it refuses to connect. If I give an external url, it connects normally, so I assume that it encounters the same problems as the above telnet(1) command (tomcat logs state that it is unable to connect to the db server, and mysql logs confirm that no connection is initiated).
Any advises on what to do? And any explanations as to why the network configuration of the jails functions this way?
Thanx all in advance!
PS. I edited /etc/hosts so that 192.l68.13.3 also accounts for localhost, with no luck.
I have a jailed setup running www/tomcat7. The jail's interface is lo2 with an IPv4 address 192.168.13.3.
Code:
# sockstat -4l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www jsvc 23050 42 tcp4 192.168.13.3:8080 *:*
www jsvc 23050 43 tcp4 192.168.13.3:8083 *:*
www jsvc 23050 44 tcp4 192.168.13.3:443 *:*
www jsvc 23050 45 tcp4 192.168.13.3:8443 *:*
www jsvc 23050 46 tcp4 192.168.13.3:8009 *:*
mysql mysqld 22393 13 tcp4 192.168.13.3:3306 *:*
root sendmail 4099 4 tcp4 192.168.13.3:25 *:*
when I try to telnet my local IP (from within the jail) on any of its listening ports, I get:
Code:
# !telnet
telnet 192.168.13.3 3306
Trying 192.168.13.3...
telnet: connect to address 192.168.13.3: Operation not permitted
telnet: Unable to connect to remote host
The same holds if I try to connect to localhost. My /etc/hosts reads:
Code:
# cat /etc/hosts
127.0.0.1 localhost localhost.my.domain
192.168.13.3 myip myip.mydomain
If I connect to mysql server using mysql(1) command (using no host arguments) everything works as expected (probably via a socket). The problem is that the application I try to run on tomcat uses a custom configuration that reads a connection url, and no matter what value I give it refuses to connect. If I give an external url, it connects normally, so I assume that it encounters the same problems as the above telnet(1) command (tomcat logs state that it is unable to connect to the db server, and mysql logs confirm that no connection is initiated).
Any advises on what to do? And any explanations as to why the network configuration of the jails functions this way?
Thanx all in advance!
PS. I edited /etc/hosts so that 192.l68.13.3 also accounts for localhost, with no luck.