Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Can';t连接到oracle:12.1.0.2外部docker容器_Linux_Oracle_Docker_Oracle12c - Fatal编程技术网

Linux Can';t连接到oracle:12.1.0.2外部docker容器

Linux Can';t连接到oracle:12.1.0.2外部docker容器,linux,oracle,docker,oracle12c,Linux,Oracle,Docker,Oracle12c,oracle容器上次日志: SQL> Mon Sep 30 06:06:45 2019 Shutting down instance (immediate) Stopping background process SMCO Shutting down instance: further logons disabled Mon Sep 30 06:06:46 2019 Stopping background process CJQ0 Stopping background process M

oracle容器上次日志:

SQL> Mon Sep 30 06:06:45 2019
Shutting down instance (immediate)
Stopping background process SMCO
Shutting down instance: further logons disabled
Mon Sep 30 06:06:46 2019
Stopping background process CJQ0
Stopping background process MMNL
Stopping background process MMON
License high water mark = 13
Mon Sep 30 06:06:48 2019
Stopping Job queue slave processes, flags = 7
Mon Sep 30 06:06:48 2019
Job queue slave processes stopped
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL
Mon Sep 30 06:06:50 2019
Mon Sep 30 06:06:50 2019
SMON: disabling tx recoveryStopping Emon pool

Stopping Emon pool
Mon Sep 30 06:06:50 2019
SMON: disabling cache recovery
Database closed.
Database dismounted.
Mon Sep 30 06:06:51 2019
Shutting down archive processes
Archiving is disabled
Mon Sep 30 06:06:51 2019
Thread 1 closed at log sequence 21
Successful close of redo thread 1
Completed: ALTER DATABASE CLOSE NORMAL
ALTER DATABASE DISMOUNT
Shutting down archive processes
Archiving is disabled
Completed: ALTER DATABASE DISMOUNT
Mon Sep 30 06:06:52 2019
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 30-SEP-2019 06:08:37

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Starting /opt/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/97ffb86e57bb/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                30-SEP-2019 06:08:38
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/97ffb86e57bb/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully

SQL*Plus: Release 12.1.0.2.0 Production on Mon Sep 30 06:08:38 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2924928 bytes
Variable Size             520097408 bytes
Database Buffers         1073741824 bytes
Redo Buffers               13848576 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
The Oracle base remains unchanged with value /opt/oracle
#########################
DATABASE IS READY TO USE!
#########################
The following output is now a tail of the alert.log:
AQPC started with pid=30, OS id=89 
Database Characterset for PDB$SEED is AL32UTF8
Opening pdb PDB$SEED (2) with Resource Manager plan: DEFAULT_PLAN
Database Characterset for ORCLPDB1 is AL32UTF8
Opening pdb ORCLPDB1 (3) with Resource Manager plan: DEFAULT_PLAN
Pluggable database ORCLPDB1 opened read write
Starting background process CJQ0
Mon Sep 30 06:08:48 2019
CJQ0 started with pid=31, OS id=199 
Completed: ALTER DATABASE OPEN
Mon Sep 30 06:08:49 2019
Shared IO Pool defaulting to 64MB. Trying to get it from Buffer Cache for process 61.
===========================================================
Dumping current patch information
===========================================================
No patches have been applied
===========================================================
Mon Sep 30 06:08:49 2019
db_recovery_file_dest_size of 4560 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon Sep 30 06:44:13 2019
Warning: VKTM detected a time drift.
Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
集装箱内:

它的内部工作正常:

docker ps在我的机器上:

我的计算机上的端口:

当我尝试连接时:

我应该怎么做才能解决这个问题

更新:

我现在发现日志文件中的差异:

-当容器无法正常工作时:

db_recovery_file_dest_size of 4560 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Warning: VKTM detected a time drift.
Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
Stopping container.
SIGTERM received, shutting down database!
-现在,当一切看起来都很好时:

db_recovery_file_dest_size of 4560 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon Sep 30 09:19:22 2019
Closing scheduler window
Restoring Resource Manager plan DEFAULT_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_PLAN at pdb ORCLPDB1 (3) via parameter
Mon Sep 30 09:21:31 2019
XDB installed.
XDB initialized.

docker ps
看,端口似乎绑定了
127.0.0.1:1521

你如何启动容器

它不应与localhost绑定,因此应类似于:

0.0.0.0:1521->1521/tcp 
正如您提到的,它在容器中正常工作,而不是docker run命令出错

我用下面的命令进行了尝试,或者再次检查:

更新:

如果上面没有解决这个问题,那么oracle docker映像就出了问题,该映像也在本or中进行了处理

或者您可以按照@Alex的步骤操作

我创建容器时遵循了这些步骤 初始化,容器在我重新启动机器之前工作正常。然后 发生了我上面描述的事情。现在,我用 更好的wi-fi连接,工作正常


我认为这不是问题。我创建的容器在初始化后遵循这些步骤,在我重新启动机器之前,容器工作正常。然后发生了我上面描述的事情。现在我用更好的wi-fi连接重新启动了容器,它工作正常。我发现了一些东西,请看我问题的“更新”部分
SIGTERM接收,关闭数据库它只是在这个逻辑中接收到停止的信号:“警告:VKTM检测到时间漂移。时间漂移可能导致意外行为,如超时。请查看跟踪文件以了解更多详细信息。“时间差会成为问题吗?”?(我的机器和oracle容器之间的差异是3小时)您使用的是虚拟机吗?你提到现在你可以连接了?
docker run -d -p 8080:8080 -p 1521:1521 --name OracleDB oracle