0

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.

3 Answers 3

2

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.

1
  • 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, 2010 at 1:30
1

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
3
  • 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, 2010 at 16:04
  • but 9080 connects when I try 192.168.1.4:9080
    – AndreDurao
    Oct 1, 2010 at 16:11
  • Best answer, your tips helped me with firewall config. Aug 25, 2014 at 18:28
0

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

netstat -lnt | grep 1521
netstat -lnt | grep 8080
1
  • 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, 2010 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .