I am trying to create an Oracle Database container that has an SSL enabled listener for connections.
But I am having trouble getting the listener to start.
I have tried many configurations but here is where I am stuck:
File structure:
[oracle#361ebc8481f2 /]$ ls -la $ORACLE_HOME/network/admin
total 24
drwxr-xr-x 1 oracle oinstall 4096 Mar 11 17:45 .
drwxr-xr-x 1 oracle oinstall 4096 Feb 26 16:36 ..
lrwxrwxrwx 1 root root 44 Feb 26 17:07 listener.ora -> /opt/oracle/oradata/dbconfig/XE/listener.ora
drwxr-xr-x 2 oracle oinstall 4096 Feb 26 16:36 samples
-rw-r--r-- 1 oracle oinstall 1441 Aug 26 2015 shrept.lst
-rw-r--r-- 1 root root 188 Mar 11 17:45 sqlnet.backup
-rw-r----- 1 oracle oinstall 589 Mar 11 17:45 sqlnet.ora
lrwxrwxrwx 1 root root 44 Feb 26 17:07 tnsnames.ora -> /opt/oracle/oradata/dbconfig/XE/tnsnames.ora
sqlnet.ora:
[oracle#e05203241582 /]$ cat $ORACLE_HOME/network/admin/sqlnet.ora
# sqlnet.ora Network Configuration File: /opt/oracle/product/18c/dbhomeXE/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/wallet)
)
)
# General Settings
SSL_CLIENT_AUTHENTICATION = FALSE
# SSL_SERVER_DN_MATCH = FALSE
# SSL_CIPHER_SUITES = (TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256)
# SQLNET Settings
SQLNET.AUTHENTICATION_SERVICES = (TCPS,NTS,BEQ)
# SQLNET.WALLET_OVERRIDE = TRUE
listener.ora:
oracle#e05203241582 /]$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/18c/dbhomeXE)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
)
)
SID_LIST_LISTENER2 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/18c/dbhomeXE)
(PROGRAM = extproc)
)
)
LISTENER2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCPS)(HOST = 0.0.0.0)(PORT = 1522))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
DEFAULT_SERVICE_LISTENER2 = (XESSL)
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/wallet)
)
)
SSL_CLIENT_AUTHENTICATION = FALSE
# SSL_SERVER_DN_MATCH = FALSE
tnsnames.ora:
[oracle#e05203241582 /]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
XEPDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XEPDB1)
)
)
XESSL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = 0.0.0.0)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XESSL)
)
)
LISTENER2_XESSL =
(ADDRESS = (PROTOCOL = TCPS)(HOST = 0.0.0.0)(PORT = 1522))
XEPDB1SSL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = 0.0.0.0)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XEPDB1SSL)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
Okay so when I start the server LISTENER is running but LISTENER2 is not:
[oracle#e05203241582 /]$ lsnrctl status LISTENER
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 11-MAR-2021 18:06:01
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 11-MAR-2021 18:00:28
Uptime 0 days 0 hr. 5 min. 33 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/e05203241582/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=e05203241582)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "bc414e16d5db0a27e053020011ac7dda" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "xepdb1" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle#e05203241582 /]$ lsnrctl status LISTENER2
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 11-MAR-2021 18:06:26
Copyright (c) 1991, 2018, Oracle. All rights reserved.
TNS-01101: Could not find listener name or service name LISTENER2
If I try to start LISTENER2 I get:
[oracle#e05203241582 /]$ lsnrctl start LISTENER2
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 11-MAR-2021 18:07:49
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /opt/oracle/product/18c/dbhomeXE/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/e05203241582/listener2/alert/log.xml
TNS-01151: Missing listener name, LISTENER2, in LISTENER.ORA
Listener failed to start. See the error message(s) above...
But it does exist in that file.
Is there something else I need to configure to get this listener to start correctly?
Sorry I know throwing a bunch of outputs into a stack overflow question isn't great, but I haven't been able to find a way to resolve this for a couple of days. Any help would be appreciated.
Related
I was trying to Backup and recovery through Oracle 12c and everytime I went to shutdown the database, the listener and tnsnames.ora files get reconfigured and I don't know why. Now, everytime that has happened, I had to go to our DBA and he fixed it. Today he was on leave, so I spent the entire day trying to configure these two files in notepad++. So far I am convinced that what I have written in the tnsnames.ora file is fine. But the issue is with the listener.ora file.
Here are the contents of both of those:
tnsnames.ora file:
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MISL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = misl)
)
)
JAHIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jahin)
)
)
listener.ora file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Jahin\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-TG0P7GL)(PORT = 1521))
)
)
Whenever I try to check the status of the listener through lsnrctl status command, (I stopped and started the process after every change) it gave me a message that it found the service, how many instances it has, but it's status always returned Unknown.
C:\Windows\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 27-OCT-2022 16:37:31
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 12.1.0.2.0 - Production
Start Date 27-OCT-2022 16:15:54
Uptime 0 days 0 hr. 21 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Jahin\product\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File C:\app\Jahin\diag\tnslsnr\DESKTOP-TG0P7GL\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-TG0P7GL)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
One more thing: whenever I try to login to sqlplus , I get a message saying connected to idle instance. And then it won't let startup or even shutdown the database.
C:\Users\Jahin Catalan Mahbub>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Oct 27 15:59:52 2022
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> show parameter
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> show parameter uniq
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_MISL'
SQL> exit
Disconnected
any idea where the issue might be? Is it even in any of these places??
Now, AFAIR, when my DBA did it and he confirmed that it was working, the lsnrctl status would return 3 services, each of them had one instance, and every instance status was ready. All commands worked fine. Sunshines and rainbows.
The problem was that I didn't keep a copy of this listener.ora file the very last time he edited it and fixed it. I couldn't get any work done because of this.
I spoke with my DBA today and we have found a solution to my problem. Turns out, the listener.ora was mostly fine. I just needed to add one line to my tnsnames.ora file.
'
LISTENER_MISL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MISL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = misl)
)
)
JAHIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jahin)
)
)
'
Here is the minor changes that had been made to the lister.ora file:
''
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Jahin\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Jahin\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-TG0P7GL)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
''
I am not getting any significant errors so far, my DB starts up and shuts down without much issue.
Hi I Have been trying to solve this error with happens 3 days ago. I try everything with is on internet, and I still getting the same error.
If you can help me with this, due to I'm quite new on this, I thanks you a lot:
The file tnsnames.ora is this:
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
The Listener.ora is this:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
)
)
DEFAULT_SERVICE_LISTENER = (XE)
And the lsnrctl status is this:
C:\WINDOWS\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 20-ABR-2020 20:16:51
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Start Date 20-ABR-2020 20:02:42
Uptime 0 days 0 hr. 14 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\DESKTOP-7AC259Q\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
I guess that as the Listener works, the problem must be on the "tnsnames.ora" file, but I don't find the possible error.
1000 Thank you for advance!
UPDATE: I realize when I try to make the tnsping to the services xe, that they don't response:
C:\Users\manul>tnsping xe
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 21-ABR-2020 11:45:53
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
Beside I checked that I can to connect to the database via cmd, so the problem is in the conection, and not in database I guess.
C:\WINDOWS\system32>sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Mar Abr 21 11:55:40 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: hr
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL>
Now I'm really confuse due to I restart the service XE, and I put on automatic, but nothing change.
I tried to connect to Oracle 11g but this is what happens, and not for the first time.
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor Vendor code 12505.
Here is listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-EJG24HE)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
and tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-EJG24HE)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
I tried to do something with it, but I cannot understand where is the problem.
Additional information:
SQL> show parameter service_names
SP2-0640: Not connected
SQL> show parameter local_listener
SP2-0640: Not connected
SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-EJG24HE)(PORT=1521))' scope=both;
SP2-0640: Not connected
SQL> alter system register;
SP2-0640: Not connected
SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected to an idle instance.
I tried to check status of listener and other, but it is not like in my friend's program where it works right.
C:\Users\Sultankhan>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 24-╨б╙Ш╨г-2018 13:44:46
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Start Date 22-╨б╙Ш╨г-2018 00:56:00
Uptime 2 days 12 hr. 48 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\DESKTOP-EJG24HE\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-EJG24HE)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\Users\Sultankhan>netstat -an -O | find /i "1521"
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING 2772
TCP [::]:1521 [::]:0 LISTENING 2772
C:\Users\Sultankhan>tnsping xe
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 24-╨б╙Ш╨г-2018 13:35:00
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-EJG24HE)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
Hello everyone! I'd like to thank you in advance, for taking your time to look into this question, no matter if you have an answer or not. :)
I already have the XE service running, but I can't get the ICIVM1D service to work. When trying to run my application, it fails with an error.
The log returns:
20-OKT-2017 10:40:08 * (CONNECT_DATA=(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=skj))(SID=ICIVM1D)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.148.1)(PORT=53564)) * establish * ICIVM1D * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
64-bit Windows Error: 203: Unknown error
I have unsuccesfully tried the solutions that were mentioned in questions regarding TNS-12518, TNS-12560 and TNS-00530, on stackoverflow and other websites.
The Oracle services are up and running, logged on as Local System (and host is localhost):
OracleServiceXE
OracleXETNSListener
The listener:
C:\WINDOWS\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 20-OKT-2017 10:09:21
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Start Date 20-OKT-2017 08:36:03
Uptime 0 days 1 hr. 33 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File ..\listener.ora
Listener Log File ..\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<my PC name>)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ICIVM1D" has 1 instance(s).
Instance "ICIVM1D", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
listener.ora
(I see no difference in error, if I change the DEFAULT_SERVICE_LISTENER and restart the listener.)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ICIVM1D)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = <my PC name>)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
ICIVM1D =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ICIVM1D)
)
)
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
I've tried restarting the connection:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2260048 bytes
Variable Size 666895280 bytes
Database Buffers 394264576 bytes
Redo Buffers 5517312 bytes
Database mounted.
Database opened.
I've checked the number of processes:
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 4
log_archive_max_processes integer 4
processes integer 800
I've tried pinging:
C:\WINDOWS\system32>tnsping icivm1d
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 20-OKT-2017 10:36:00
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ICIVM1D)))
OK (50 msec)
The alert return:
Create Relation ADR_CONTROL
Running SQL statements, I got the following results:
SQL> select name, value from v$PARAMETER where name like '%name%';
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
lock_name_space
db_file_name_convert
log_file_name_convert
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
global_names
FALSE
instance_name
xe
service_names
XE
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
db_name
XE
db_unique_name
XE
8 rows selected.
And
SQL> select name, NETWORK_NAME from v$services;
NAME
----------------------------------------------------------------
NETWORK_NAME
--------------------------------------------------------------------------------
XEXDB
XEXDB
XE
XE
SYS$BACKGROUND
NAME
----------------------------------------------------------------
NETWORK_NAME
--------------------------------------------------------------------------------
SYS$USERS
I have a problem with Oracle Express Edition. I can open and run commands in the Data Base by using sqlplus, but then I try to connect to Data Base by using sql developer it doesn't work. It's strange because I have many other remote Oracle databases and I can connect to them by using sql developer or other tools like IDEA. May be something wrong with listener?
When I try to connect I get timed out on connection to port 1521.
Connection to #myhost.company.com failed.
lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 22-╤┼═-2017 12:04:43
Copyright (c) 1991, 2010, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
C:\Users\luchser>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 22-╤┼═-2017 12:11:20
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Start Date 21-╤┼═-2017 14:21:26
Uptime 0 days 21 hr. 49 min. 53 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\localhost\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost.company.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost.company.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.company.com)(PORT = 1521)(IP=V4_ONLY))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.company.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
tnsping XE 10
C:\Users\luchser>tnsping XE 10
TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 26-╤┼═-2017 14:49:12
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.company.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (0 msec)
OK (20 msec)
OK (0 msec)
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (20 msec)
sqlplus user/password#XE
C:\Users\luchser>sqlplus my_user/my_password#XE
SQL*Plus: Release 11.2.0.2.0 Production on ┬Є ╤хэ 26 14:50:11 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
The last just hags and nothing happens.
In this configuration, listener.ora and tnsnames.ora.
You can make a connection only on the local database, you can not make a remote connection to the database, because The listener listens only to IP localhost.
You must add an external IP to the listener configuration. listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)(IP=V4_ONLY))
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP DB server>)(PORT = 1521)(IP=V4_ONLY))
)
)
Add an exception for port 1521 and port range (32768-65536) for the firewall on the database server, this is necessary for the SQL * NET protocol.
On the client machine, you need to fix tnsnames.ora,
It is necessary to replace localhost with the IP address of the database server.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP DB server>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)