Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Suse11.2 machine with the following services: oracle database XE Jboss+Tomcat6.0

I needed to change oracle default dbms_xdb httpport to 9080, so with that I can use tomcat @8080 port. Since I'm developing this app I've made a lot of tests using localhost:8080 and access the DB through localhost:1521 and worked fine. But when I need to access this ip, it doesnt respond: like 192.168.1.4:8080 and :1521 it shows me in browser and when I tried to connect the oracle that it can't connect with server.... But I cant understand WHY it connects at 9080 port (oracle dbms http)

Things I did:

1 stop the firewall at yast2 and prevent it to starts automatically

2 run " /etc/init.d/SuSEfirewall2_setup stop"

reply:"Shutting down the Firewall ...done"

3 list iptables rules:

========================================================begin Chain INPUT (policy ACCEPT) target prot opt source destination

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination ========================================================end

but it keeps blocking others ports besides 9080, and icmp... does anybody have some idea of whats happening:?

Thanks in advance, Andre.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

netstat -lnt | grep 8080

tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN

netstat -lnt | grep 1521

tcp 0 0 127.0.0.1:1521 0.0.0.0:* LISTEN

netstat -lnt | grep 9080

tcp 0 0 0.0.0.0:9080 0.0.0.0:* LISTEN

Well, perhaps I wasn't clear: but oracle(1521) and (jboss+tomcat)8080 are working, but only work accessible through localhost.

That is your answer: ports 1521 and 9080 are only listening on the IP address 127.0.0.1 (localhost). No firewall is involved.

You need to change the config of those services to listen on all IP addresses of the server. I don't know how to do that for Oracle.

share|improve this answer
    
you should check out tnsnames.ora at ORACLE_HOME/network/admin/tnsnames.ora. Look for the line "(HOST = <hostname/ip>)". If it has a hostname, then your problem is that /etc/hosts is telling that your hostname points to localhost. Either change your hostname or change that line at tnsnames.ora, and put your address (in both cases you must restart the listener). –  Torian Oct 2 '10 at 1:30

Make sure database engine is running:

This will tell you if listener is running:

$ netstat -tnl | grep 1521

If you see no results here, startup the listener (make sure you have environment set properly):

$ lsnrctl start
$ lsnrctl status

This will tell you if proccess monitor is running:

$ pgrep -fl pmon

If pmon is running, it will take some time to for the db engine to register. If no results from that command, start it up (again, check your environment):

$ sqlplus /nolog
sqlplus> conn / as sysdba
sqlplus> startup

If database is up, and you have any other problem (SQLNet), you can always use internal. As the user which runs the process, generally oracle, you can excecute practically the same lines:

$ sqlplus /nolog
sqlplus> conn / as sysdba
sqlplus> # your statements / alter system / alter database

If everything seems to be up, telnet to your IP on port 1521:

$ telnet <ip> 1521

Also, make sure iptables allows you to connect:

# iptables -nL

If you see any suspecting rules wipe it all up (you will have no more firewall rules):

# iptables -F
share|improve this answer
    
Well, perhaps I wasn't clear: but oracle(1521) and (jboss+tomcat)8080 are working, but only work accessible through localhost, when I type my ip addr like 192.168.1.4:8080 or @sql developer at 1521 they don't connect. –  AndreDurao Oct 1 '10 at 16:04
    
but 9080 connects when I try 192.168.1.4:9080 –  AndreDurao Oct 1 '10 at 16:11
    
Best answer, your tips helped me with firewall config. –  Sérgio Michels Aug 25 at 18:28

Have you tried making sure that those ports are indeed listening?

netstat -lnt | grep 1521
netstat -lnt | grep 8080
share|improve this answer
    
me@localhost:~> netstat -lnt | grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN me@localhost:~> netstat -lnt | grep 1521 tcp 0 0 127.0.0.1:1521 0.0.0.0:* LISTEN me@localhost:~> netstat -lnt | grep 9080 tcp 0 0 0.0.0.0:9080 0.0.0.0:* LISTEN –  AndreDurao Oct 1 '10 at 16:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.