LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 01-04-2009, 08:02 AM   #1
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Rep: Reputation: 32
Accessing Jboss port 8080 remotely


Hi ,

I am running Jboss server 4.2.3.GA on my machine , and I am able to access the port locally ( eg: http://localhost:8080/ ) and is working fine with all my JSP Servelet application . But here the issue is , if I try to access the port from outside ( eg: http://192.168.xxx.xxx:8080 ) , I am not able to get the port number. I tried enabling the HTTP port 80 , but nothing happend .

I am using

Fedora 10
Kernel 2.6.27.9-159.fc10.x86_64 ( 64 bit )
Gnome 2.24.2

How can I open the port ?

Thanks in Advance
Peeths
 
Old 01-04-2009, 11:41 AM   #2
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 186

Rep: Reputation: 34
A few things I would look for:

Is that the correct ip address of the jboss server?
can you ping the address?
What ports does nmap show open on the server?
can you telnet to the port on the server?
is iptables being used on the server?
is the jboss server blocking access?
 
Old 01-05-2009, 07:22 AM   #3
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
Quote:
Is that the correct ip address of the jboss server?
The IP address is of the machine in which Jboss server is running

Quote:
can you ping the address?
I am able to ping to 192.168.xxx.xxx ( without the port number )

Quote:
can you telnet to the port on the server
telnet 192.168.xxx.xxx
Trying 192.168.xxx.xxx...
telnet: connect to address 192.168.xxx.xxx: Connection refused


telnet 192.168.xxx.xxx:8080
telnet: 192.168.xxx.xxx:8080: Name or service not known
192.168.xxx.xxx:8080: Unknown host

From Windows Machine

C:\>telnet 192.168.xxx.xxx
Connecting To 192.168.xxx.xxx...Could not open connection to the host, on port 23: C
onnect failed

Quote:
What ports does nmap show open on the server?

[root@localhost ~]# nmap 192.168.xxx.xxx

Starting Nmap 4.68 ( http://nmap.org ) at 2009-01-05 23:11 IST
Interesting ports on 192.168.xxx.xxx:
Not shown: 1712 closed ports
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
6000/tcp open X11

Nmap done: 1 IP address (1 host up) scanned in 13.120 seconds


Ho can i open the port 8080 for http request ?


Quote:
is iptables being used on the server?
is the jboss server blocking access?
I am not sure of these 2 questions , I dont know whether iptable is being used in the JBoss server , how can i check that ?

How to find out whether Jboss server is blocking the access ?

Please help

Thanks
Peeths ....

Last edited by peeths003; 01-05-2009 at 07:23 AM.
 
Old 01-05-2009, 07:25 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
ps -ef|egrep -i 'java|jboss'
this to make sure jboss is running....

netstat -ntalp|grep java
this to see on which port/address is running. should be something like: 0.0.0.0:8080 or some ip address like: 192.168.0.1:8080.

if this doesnt work it means jboss is not running or its running... but somehow weird, you will need to check the config.

Ops, I forgot, if everything is fine... you see the bg process and the 0.0.0.0:8080 or something like that, could be your firewall the issue.

Last edited by robertjinx; 01-05-2009 at 07:27 AM.
 
Old 01-05-2009, 07:47 AM   #5
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
ps -ef|egrep -i 'java|jboss'

Quote:
500 3056 1 0 21:05 ? 00:00:00 /bin/bash /usr/local/netbeans-6.5/bin/../platform9/lib/nbexec --userdir /home/Bugslayer/.netbeans/6.5 --jdkhome /usr/local/jdk1.6.0_07 --branding nb --clusters /usr/local/netbeans-6.5/nb6.5:/usr/local/netbeans-6.5/ide10:/usr/local/netbeans-6.5/java2:/usr/local/netbeans-6.5/xml2:/usr/local/netbeans-6.5/apisupport1:/usr/local/netbeans-6.5/webcommon1:/usr/local/netbeans-6.5/websvccommon1:/usr/local/netbeans-6.5/enterprise5:/usr/local/netbeans-6.5/mobility8:/usr/local/netbeans-6.5/profiler3:/usr/local/netbeans-6.5/gsf1:/usr/local/netbeans-6.5/ruby2:/usr/local/netbeans-6.5/php1:/usr/local/netbeans-6.5/visualweb2:/usr/local/netbeans-6.5/soa2:/usr/local/netbeans-6.5/identity2:/usr/local/netbeans-6.5/harness:/usr/local/netbeans-6.5/cnd2:/usr/local/netbeans-6.5/groovy1:/usr/local/netbeans-6.5/javafx2: -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -J-Xmx512m -J-Dcom.sun.aas.installRoot=/usr/local/glassfish-v2ur2 -J-Dorg.glassfish.v3.installRoot=/usr/local/glassfish-v3-prelude -J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true
500 3199 3056 0 21:05 ? 00:01:04 /usr/local/jdk1.6.0_07/bin/java -Djdk.home=/usr/local/jdk1.6.0_07 -classpath /usr/local/netbeans-6.5/platform9/lib/boot.jar:/usr/local/netbeans-6.5/platform9/lib/org-openide-modules.jar:/usr/local/netbeans-6.5/platform9/lib/org-openide-util.jar:/usr/local/netbeans-6.5/platform9/lib/locale/boot_ja.jar:/usr/local/netbeans-6.5/platform9/lib/locale/boot_pt_BR.jar:/usr/local/netbeans-6.5/platform9/lib/locale/boot_zh_CN.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-modules_ja.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-modules_pt_BR.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-modules_zh_CN.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-util_ja.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-util_pt_BR.jar:/usr/local/netbeans-6.5/platform9/lib/locale/org-openide-util_zh_CN.jar:/usr/local/jdk1.6.0_07/lib/dt.jar:/usr/local/jdk1.6.0_07/lib/tools.jar -Dnetbeans.system_http_proxy=DIRECT -Dnetbeans.system_http_non_proxy_hosts= -Dnetbeans.dirs=/usr/local/netbeans-6.5/nb6.5:/usr/local/netbeans-6.5/ide10:/usr/local/netbeans-6.5/java2:/usr/local/netbeans-6.5/xml2:/usr/local/netbeans-6.5/apisupport1:/usr/local/netbeans-6.5/webcommon1:/usr/local/netbeans-6.5/websvccommon1:/usr/local/netbeans-6.5/enterprise5:/usr/local/netbeans-6.5/mobility8:/usr/local/netbeans-6.5/profiler3:/usr/local/netbeans-6.5/gsf1:/usr/local/netbeans-6.5/ruby2:/usr/local/netbeans-6.5/php1:/usr/local/netbeans-6.5/visualweb2:/usr/local/netbeans-6.5/soa2:/usr/local/netbeans-6.5/identity2:/usr/local/netbeans-6.5/harness:/usr/local/netbeans-6.5/cnd2:/usr/local/netbeans-6.5/groovy1:/usr/local/netbeans-6.5/javafx2: -Dnetbeans.home=/usr/local/netbeans-6.5/platform9 -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Xmx512m -Dcom.sun.aas.installRoot=/usr/local/glassfish-v2ur2 -Dorg.glassfish.v3.installRoot=/usr/local/glassfish-v3-prelude -client -Xverify:none -Xss2m -Xms32m -XX:PermSize=32m -XX:MaxPermSize=200m -Dapple.laf.useScreenMenuBar=true -Dsun.java2d.noddraw=true org.netbeans.Main --userdir /home/Bugslayer/.netbeans/6.5 --branding nb
500 3323 3294 0 21:06 pts/0 00:00:00 /bin/sh /usr/local/jboss-4.2.3.GA/bin/run.sh
500 3347 3323 0 21:06 pts/0 00:00:49 java -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/usr/local/jboss-4.2.3.GA/lib/endorsed -classpath /usr/local/jboss-4.2.3.GA/bin/run.jar org.jboss.Main
500 3716 3028 0 22:43 ? 00:00:04 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/../../bin/java sun.applet.PluginMain
root 4325 3831 0 23:42 pts/2 00:00:00 egrep -i java|jboss



netstat -ntalp|grep java

Quote:
[root@localhost ~]# netstat -ntalp|grep java
tcp 0 0 127.0.0.1:3873 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:1098 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 3347/java
tcp 0 0 0.0.0.0:39214 0.0.0.0:* LISTEN 3347/java
tcp 0 0 0.0.0.0:43182 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 3347/java
tcp 0 0 0.0.0.0:59696 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:8083 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:8093 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:4445 0.0.0.0:* LISTEN 3347/java
tcp 0 0 127.0.0.1:4446 0.0.0.0:* LISTEN 3347/java
tcp 1 0 192.168.x.x:55670 xxx.xxx.xx.xx:80 CLOSE_WAIT 3716/java
tcp 1 0 127.0.0.1:60858 127.0.0.1:8080 CLOSE_WAIT 3716/java
tcp 1 0 127.0.0.1:60857 127.0.0.1:8080 CLOSE_WAIT 3716/java
tcp 0 0 ::1:45741 :::* LISTEN 3199/java
I don't know what the issue is ............... is there something that is blocking the connection like firewall or something ?

Last edited by peeths003; 01-05-2009 at 08:11 AM.
 
Old 01-05-2009, 09:16 AM   #6
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
You jboss is running on localhost:

tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 3347/java

You need to change the configuration of jboss from 127.0.0.1 to 0.0.0.0 then restart jboss and try again.
 
Old 01-12-2009, 01:49 PM   #7
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
I tried changing this too ... but i didnt get any thing positive , how can i check that there is any firewall blocking the port ?
 
Old 01-13-2009, 02:48 AM   #8
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
iptables -L -n -v
 
Old 01-13-2009, 03:57 AM   #9
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
Also I forgot, but if you changed it... you need to check netstat if you really have it on other adapters then localhost. If you jboss still runs on 127.0.0.1:8080 doesnt matter the firewall. Make sure that is running like: 0.0.0.0:8080 then think of the firewall.
 
Old 01-15-2009, 05:42 AM   #10
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
I tried checkin with netstat -a by starting up the Jboss server , it is still pointing to 127.0.0.1 , how can i change it to 127.0.0.0

Thanks
Peeths
 
Old 01-15-2009, 10:36 AM   #11
flipouk
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
try this

Launch your server as follows:

$JBOSS_HOME/bin/run.sh -b 0.0.0.0

It will then listen to any address and not only localhost...

HTH
F.
 
Old 01-19-2009, 01:51 PM   #12
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
thats cool ........... thanks ............ i guess its working .......... how about tomcat , weblogic and other servers ... ? how can i make them listen so that it is acceble from out side the machine ............ ?

EDIT : and is it that this will work only with the current ip of the machine ( 192.168.xxx.xxx) and the port ( 8080 ) , or is that other port also might be open ........

How does this work , is it making one port open for any one accessing the network .... ? is there any security risk on this ... ?

Last edited by peeths003; 01-19-2009 at 01:53 PM.
 
Old 01-20-2009, 02:47 AM   #13
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
For tomcat you have in server.xml a part where you define the port, like port 8080, lets say you will have to add also: address="0.0.0.0", something like that

Example: <Connector port="8080" address="127.0.0.1" ... />
 
Old 01-21-2009, 07:52 AM   #14
peeths003
Member
 
Registered: Jun 2008
Distribution: Fedora 12 i686, Debian 5.0.1 i686, Fedora 14 x86_64, Debian Lenny 5.0.1x86_64 and CentOS_5.4_x86-64
Posts: 311

Original Poster
Rep: Reputation: 32
Hey ... here i tried accesing the JBoss from an out side machine , and it is not working , i tried in the same machine with the IP and it is working , i doubt there is some firewall that is blocking the access .....


Thanks
Peeths
 
Old 01-21-2009, 08:24 AM   #15
robertjinx
Member
 
Registered: Oct 2007
Location: Brno, CZ
Distribution: RedHat / CentOS / Ubuntu
Posts: 418

Rep: Reputation: 44
Did u check to see if jboss (if we talk about jboss) is running at is should?

netstat -tnalp|grep -i 8080
or
netstat -tnalp|grep -i java

like i said before should be 0.0.0.0:8080
make sure is running, also iptable -L -v -n, see if you actually or maybe have some firewall setup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 03:38 AM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 01:59 AM
JBoss Web Port Conflict with Oracle EMS Port fortezza Programming 1 05-21-2006 08:02 PM
Port 80-->8080?? flamesrock Linux - Software 4 08-01-2004 02:40 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 01:16 PM


All times are GMT -5. The time now is 02:26 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration