-
1. Re: Ports in use
peterj Aug 10, 2010 12:55 PM (in response to iapazmino)What firewall are you running? Or other security software (I know tha SELinux can be a problem on SUSE, Fedora and RHEL in this regard).
By the way, I run JBoss AS just fine on Ubuntu 10.04.
-
2. Re: Ports in use
iapazmino Aug 10, 2010 1:11 PM (in response to peterj)I was thinking the same and reseted the iptables, but didn't help. I even restarted the box after reseting the iptables, in the hope of windows' methods to work here, but nothing...
-
3. Re: Ports in use
peterj Aug 10, 2010 1:36 PM (in response to iapazmino)Do you have another system you can try it on? It could even be a virtual machine. There must be something about your particular system that is causing the issue, perhaps by using a different system, or doing a clean install of Ubuntu in a location such as a VM, you might be able to track down the difference.
Also, try using nmap to test which ports are open on your system, it won't catch all ports but will tell you if port 8080 is really in use:
sudo nmap -sT -O localhost
You will have to install nmap first - it is not installed by default.
-
4. Re: Ports in use
iapazmino Aug 10, 2010 4:29 PM (in response to peterj)I've found when it happens but can't see why.
I have a static ip in /etc/network/interfaces
auto eth0
iface eth0 inet static
address 172.xxx.xxx.xxx
netmask 255.255.240.0
gateway 172.xxx.xxx.1but I changed to the by default dhcp configuration
auto lo
iface lo inet loopbackand it worked, the JBoss AS started up; but I los internet connecction and email access.
How could I fix this?
-
5. Re: Ports in use
peterj Aug 10, 2010 4:45 PM (in response to iapazmino)This makes sense. JBoss AS by default binds to localhost (since 4.2.x). Try adding the -b option with your IP address (-b 172.xxx.xxx.xxx) to the run command. JBoss AS will then bind to the IP address and should then start up (of course, after to change eth0 back to its original setting).
-
6. Re: Ports in use
iapazmino Aug 10, 2010 6:16 PM (in response to peterj)Thanks a lot Peter!
Adding -b option made the trick and used the static address configuration.
run.sh -c srv_name -b 0.0.0.0
Now, a new problem has arised.
I can't access from the web browser to the server.
I tried starting both ways
run.sh -c srv_name -b 0.0.0.0
run.sh -c srv_name -b 172.xxx.xxx.xxx
Both will answer Unable to connect, either using localhost or the ip address.
-
7. Re: Ports in use
jaikiran Aug 11, 2010 1:13 AM (in response to iapazmino)What URL are you using to connect through the browser? Also can you post the logs that you see on the console? Mainly the log messages which look like:
10:42:03,409 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 10:42:03,440 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
If you haven't changed any port configurations, then by default the HTTP port is 8080. Also what is the output of:
telnet localhost 8080
-
8. Re: Ports in use
iapazmino Aug 11, 2010 9:41 AM (in response to jaikiran)I haven't changed the default ports, this is an excerpt pf the startup log
========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /usr/local/java/jboss/jboss-4.2.3.GA JAVA: java JAVA_OPTS: -Dprogram.name=run.sh -server -Xms256m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Duser.language=EN -Duser.region=us -XX:PermSize=256M -XX:MaxPermSize=512M -Djava.net.preferIPv4Stack=true CLASSPATH: /usr/local/java/jboss/jboss-4.2.3.GA/bin/run.jar ========================================================================= 08:24:17,668 INFO [Server] Starting JBoss (MX MicroKernel)... 08:24:17,668 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417) 08:24:17,671 INFO [Server] Root Deployment Filename: jboss-service.xml 08:24:17,930 INFO [ServerInfo] Java version: 1.6.0_20,Sun Microsystems Inc. 08:24:17,931 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 16.3-b01,Sun Microsystems Inc. 08:24:17,931 INFO [ServerInfo] OS-System: Linux 2.6.32-24-generic,i386 08:24:18,242 INFO [Server] Core system initialized 08:24:20,083 INFO [WebService] Using RMI server codebase: http://UIOiapm270409:8083/ 08:24:46,106 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080 08:24:46,106 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009 08:24:48,747 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093 08:24:52,056 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 08:24:52,078 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009 08:24:52,086 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 34s:414ms
If the full log is needed just let me know
the telnet fails...
iapm270409@UIOiapm270409:~$ telnet localhost 8080 Trying 127.0.0.1... Trying ::1... telnet: Unable to connect to remote host: Network is unreachable
-
9. Re: Ports in use
iapazmino Aug 11, 2010 10:31 AM (in response to iapazmino)One new weird thing is the server starts up no problem if is binded to an ip
-b 0.0.0.0 -b 172.xxx.xxx.xxx
but the ports problem happens again if I change the param to
-b localhost
-
10. Re: Ports in use
iapazmino Aug 11, 2010 12:38 PM (in response to iapazmino)Fixed! The problem was the network configuration, it was not starting the loopback interface.
Thanks for all your help.
auto lo iface lo inet loopback #auto eth0 #iface eth0 inet dhcp auto eth0 iface eth0 inet static address 172.xxx.xxx.xxx netmask 255.255.240.0 gateway 172.xxx.xxx.1