Skip to content

Ubuntu 20.x / Oracle 21.3 / ORA-12170: TNS:Connect timeout occurred #2410

Open
@maquejp

Description

@maquejp

Hello,
I am having issue with the docker image on Ubuntu 20.x

Until this week, I was working on a WIN20+WSL2 but I was asked to start working on a new computer which use Ubuntu 20.

So I start to try to created an Oracle Database 21c.

I cloned this project, downloaded the related file (LINUX.X64_213000_db_home.zip) and created the image following the guidelines (not my first time)

Then I have set a simple dockercompose file

version: "3.8" services: service-oracle2130-database: image: oracle2130 container_name: service-oracle2130-database ports: - "1596:1521" environment: - ORACLE_SID=ORCLCDB - ORACLE_PDB=ORCLPDB - ORACLE_PWD=Oracle4System - ORACLE_MEM=2000 - DISABLE_OOB=ON volumes: - ./database/OracleDB/oradata:/opt/oracle/oradata - ./database/scripts/system/setup:/opt/oracle/scripts/setup - ./database/scripts/system/startup:/opt/oracle/scripts/startup networks: - app-oracle2130-network networks: app-oracle2130-network:

The container is well created, the database is successfully created and ready to use.
BUT when I try to connect to it it fails.
with SQLDeveloper or the command sqlplus system/"Oracle4System"@localhost:1596/ORCLCDB

WIth SQL+ I receive : ORA-12637: Packet receive failed

And I have the following in the log of the server

`Fatal NI connect error 12170, connecting to:
(ADDRESS=(PROTOCOL=tcp)(HOST=172.20.0.1)(PORT=45488))

VERSION INFORMATION:
TNS for Linux: Version 21.0.0.0.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 21.0.0.0.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 21.0.0.0.0 - Production
Version 21.3.0.0.0
Time: 14-JUL-2022 15:49:14
Tracing not turned on. Process Id = 1288
Tns error struct:
ns main err code: 12535

TNS-12535: TNS:operation timed out
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
2022-07-14T15:49:14.747455+00:00
opiodr aborting process unknown ospid (1288) as a result of ORA-609
2022-07-14T15:49:14.747695+00:00
Errors in file /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/trace/ORCLCDB_ora_1288.trc:
ORA-00609: could not attach to incoming connection
ORA-12170: TNS:Connect timeout occurred`

I found this issue #1821 and added the sqlora.net with the DISABLE_OOB workaround and it worked with SQL+ BUT not with SQLDeveloper.

As I can work/live without SQLDeveloper, no problems.

So I a took a real project (which use the same parameter for the oracle container) and ran it.
But it does not work either.
It is using NodeJs and of course the node-oracledb package.
Again this project runs smoothly on my WIN10+WSL2 Machine but on Ubuntu.

Base on my previous experience, I modified the Dockerfile that create my NodeJS express server adding the sqlnet.ora file with the DISABLE_OOB. But same as for SQLDeveloper or without the sqlnet.ora trick.

In the NodeJs, the console.log (err) gives me the following
[Error: ORA-12170: TNS:Connect timeout occurred] { errorNum: 12170, offset: 0 }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions