Link to home
Start Free TrialLog in
Avatar of NytroZ
NytroZFlag for United States of America

asked on

NMAP shows service 1521 is closed

I am having issues connecting to my Oracle database from the web server. I used nmap  from the Oracle server to identify the state of port 1521.   If I run nmap on port 1521 using the IP address of the oracle server is says it is closed.  If I run NMAP from the Oracle server and run it against local host or 127.0.0.1 is shows open.  Why open from the servers IP address but open from localhost or 127.0.0.1?
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

127.0.0.1 is the loopback address.  Packets never leave the server so it is likely a firewall or network device blocking 1521 outside the server.

You also shouldn't be using the default listener port of 1521 on anything other than a development machine.
Avatar of NytroZ

ASKER

This is development!  This service has been running for quite some time and there have been no changes to the FW or any other network device.  I checked the FW logs and found no evidence of the traffic being blocked but the response from Zenmap does reference the SonicWALL.  

 User generated image
I can help with the Oracle specific pieces but you will have to wait for a Networking Expert for tool specific issues.

Is the Oracle listener actually listening on the loopback ip or the server ip?

Log into the database server as the oracle user and post the results of:
lsnrctl status
Avatar of NytroZ

ASKER

Loopback IP

User generated image
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
can you check your listener.ora
if system is configured to use localhost (127.0.0.1) it can only talk to itself.
not to the actual IP.
Avatar of NytroZ

ASKER

After changing listener.ora file I get the following:

User generated image
What did I do wrong?  And I did stop and restart the listner
Do the stop again and post the start output.

Can you copy and past instead of posting images?

Triple check the local servers IP address.
Avatar of NytroZ

ASKER

Stopped and restarted again and it works now!  I'm sure he missed a start after he stopped it.  NMAP is showing open but still having issues with web server and oracle server but we can at least rule the port connection out.  

Starting Nmap 7.12 ( https://nmap.org ) at 2016-07-11 12:52 Central Daylight Time

Nmap scan report for ora11gdev.cxt.local (192.168.50.19)

Host is up (0.00s latency).

PORT     STATE SERVICE

1521/tcp open  oracle

MAC Address: C0:EA:E4:65:6A:29 (Sonicwall)



Nmap done: 1 IP address (1 host up) scanned in 0.47 seconds
Is there a specific error message from the web server?
Avatar of NytroZ

ASKER

No, but Oracle is giving me another error.

ORA-28547: connection to server failed, probable Oracle Net8 admin error
Never seen that error.

Had to resort to the Internet for that one.

My first guess is this one:  an issue with the database character set and drivers used to connect to the server.

https://community.oracle.com/thread/2263004?start=0&tstart=0

There is also some stuff pointing to a 10g issue.

Not knowing and of the drivers/applications or versions involved, I'll probably not be much help.

Since the port issue is resolved, you might want to open a new question and provide as much of the details as you can.
check that your  tnsnames.ora protocols and service names match those in the code calling the connection.
Also set SQL_AUTHENTICATION_SERVICES = (NONE) in  sqlnet.ora and see if it works.