Fix “ORA-03114: not connected to ORACLE” error

I utilize docker-oracle12c to run Oracle in docker, and bind specified CPU and memory:

docker run -d -it --cpuset-cpus=xx-xx,xx-xxx  --cpuset-mems=x,x ... 

All containers run OK but one Oracle database is always created failed, and the error log is:

ORA-03114: not connected to ORACLE

After tough debugging, the reason is the memory on specified NUMA node is not enough:

# numactl -H
......
node 2 size: 786432 MB
node 2 free: xxxxx MB

node 3 size: 786432 MB
node 3 free: xxxxx MB

The solution is disable HugePages temporarily:

# cat /etc/sysctl.conf
......
vm.nr_hugepages=0
......
# sysctl -p

After creating database, enable HugePages again:

# cat /etc/sysctl.conf
......
vm.nr_hugepages=xxxxxx
......
# sysctl -p

 

Fix “TNS-01106: Listener using listener name LISTENER has already been started” error

I utilize docker-oracle12c to run Oracle in docker. When starting listener, it outputs following:

$ lsnrctl start

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-FEB-2016 00:38:38

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

TNS-01106: Listener using listener name LISTENER has already been started

I first meet TNS-01106 error, so try to use “lsnrctl status” to check the listener status:

$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-FEB-2016 00:38:52

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory

No listener is running, so what is wrong? After checking the configuration file, I find the file name is spelled wrongly as listerner.ora, not listener.ora! After modifying name, the “lsnrctl start” run successfully:

$ lsnrctl start

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-FEB-2016 00:41:25

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

Starting /app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...
......

P.S. If there are some configuration errors in listerner.ora, such as port number, host address, it also induce this error.