Commands not found while starting image #5
Comments
Ah damn windows as a host maybe we need to add dos2unix |
Maybe it will be helpfull, but I've pulled the git repo, created the image and working with it from the Cygwin. |
I have converted |
nice we can add this to the docker file |
Yes, also add the directory with Oracle tools (like sqlplus) to the PATH please |
Also, please set the correct ORACLE_HOME |
does '. oraenv' with the right SID works? |
Looks like listener not fully started or some misconfiguration.
And could not connect via
Even after
|
ok will also test it with 12.1.0.2 |
Tried to setup 12.1.0.1 (EE), the problem with port exists too. [root@d057cc4bd68f /]# ./startup.sh
Change hostname in the listener.ora
Start the listener and database
Processing Database instance "orcl": log file /oracle/product/12.1/db/startup.log
just to be sure, start the listener again
The Oracle base has been set to /oracle
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 30-JUL-2015 16:10:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
Done
Show all ora processes, should see listener and ora db processes
oracle 64 1 0 16:08 ? 00:00:00 /oracle/product/12.1/db/bin/tnslsnr LISTENER -inherit
oracle 155 1 0 16:08 ? 00:00:00 ora_pmon_orcl
oracle 157 1 0 16:08 ? 00:00:00 ora_psp0_orcl
oracle 159 1 0 16:08 ? 00:00:00 ora_vktm_orcl
oracle 163 1 0 16:08 ? 00:00:00 ora_gen0_orcl
oracle 165 1 0 16:08 ? 00:00:00 ora_mman_orcl
oracle 169 1 0 16:08 ? 00:00:00 ora_diag_orcl
oracle 171 1 0 16:08 ? 00:00:00 ora_dbrm_orcl
oracle 173 1 0 16:08 ? 00:00:00 ora_dia0_orcl
oracle 175 1 0 16:08 ? 00:00:00 ora_dbw0_orcl
oracle 177 1 0 16:08 ? 00:00:00 ora_lgwr_orcl
oracle 179 1 0 16:08 ? 00:00:00 ora_ckpt_orcl
oracle 181 1 0 16:08 ? 00:00:00 ora_lg00_orcl
oracle 183 1 0 16:08 ? 00:00:00 ora_smon_orcl
oracle 185 1 0 16:08 ? 00:00:00 ora_lg01_orcl
oracle 187 1 0 16:08 ? 00:00:00 ora_reco_orcl
oracle 189 1 0 16:08 ? 00:00:00 ora_lreg_orcl
oracle 191 1 1 16:08 ? 00:00:01 ora_mmon_orcl
oracle 193 1 0 16:08 ? 00:00:00 ora_mmnl_orcl
oracle 195 1 0 16:08 ? 00:00:00 ora_d000_orcl
oracle 197 1 0 16:08 ? 00:00:00 ora_s000_orcl
oracle 209 1 0 16:10 ? 00:00:00 ora_p000_orcl
oracle 211 1 0 16:10 ? 00:00:00 ora_p001_orcl
oracle 213 1 0 16:10 ? 00:00:00 ora_p002_orcl
oracle 215 1 0 16:10 ? 00:00:00 ora_tmon_orcl
oracle 217 1 0 16:10 ? 00:00:00 ora_tt00_orcl
oracle 219 1 0 16:10 ? 00:00:00 ora_smco_orcl
oracle 221 1 0 16:10 ? 00:00:00 ora_fbda_orcl
oracle 223 1 0 16:10 ? 00:00:00 ora_w000_orcl
oracle 225 1 0 16:10 ? 00:00:00 ora_aqpc_orcl
oracle 229 1 0 16:10 ? 00:00:00 ora_p003_orcl
oracle 231 1 0 16:10 ? 00:00:00 ora_p004_orcl
oracle 233 1 0 16:10 ? 00:00:00 ora_p005_orcl
oracle 235 1 0 16:10 ? 00:00:00 ora_p006_orcl
oracle 237 1 0 16:10 ? 00:00:00 ora_p007_orcl
oracle 239 1 0 16:10 ? 00:00:00 ora_p008_orcl
oracle 241 1 0 16:10 ? 00:00:00 ora_p009_orcl
oracle 243 1 0 16:10 ? 00:00:00 ora_p00a_orcl
oracle 245 1 0 16:10 ? 00:00:00 ora_p00b_orcl
oracle 247 1 0 16:10 ? 00:00:00 ora_p00c_orcl
oracle 249 1 0 16:10 ? 00:00:00 ora_p00d_orcl
oracle 251 1 0 16:10 ? 00:00:00 ora_p00e_orcl
oracle 253 1 0 16:10 ? 00:00:00 ora_p00f_orcl
oracle 255 1 4 16:10 ? 00:00:00 ora_cjq0_orcl
oracle 333 1 4 16:10 ? 00:00:00 ora_m000_orcl
oracle 340 1 3 16:10 ? 00:00:00 ora_m001_orcl
oracle 344 1 3 16:10 ? 00:00:00 ora_m002_orcl
oracle 346 1 7 16:10 ? 00:00:00 ora_m003_orcl
oracle 350 1 0 16:10 ? 00:00:00 ora_qm02_orcl
oracle 352 1 9 16:10 ? 00:00:00 ora_m005_orcl
oracle 354 1 0 16:10 ? 00:00:00 ora_qm03_orcl
oracle 356 1 3 16:10 ? 00:00:00 ora_m006_orcl
oracle 360 1 4 16:10 ? 00:00:00 ora_q002_orcl
oracle 362 1 1 16:10 ? 00:00:00 ora_q003_orcl
oracle 366 1 2 16:10 ? 00:00:00 ora_m004_orcl
oracle 368 1 13 16:10 ? 00:00:00 ora_m007_orcl
root 370 46 0 16:10 ? 00:00:00 grep ora
[root@d057cc4bd68f /]# netstat -a | grep 1521
unix 2 [ ACC ] STREAM LISTENING 112903 /var/tmp/.oracle/sEXTPROC1521 |
And with connection via [root@782d32fab664 /]# export ORACLE_HOME=/oracle/product/12.1/db/
[root@782d32fab664 /]# . oraenv
ORACLE_SID = [] ? orcl
The Oracle base has been set to /oracle
[root@782d32fab664 /]# /oracle/product/12.1/db/bin/sqlplus sys/Welcome01@orcl as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 30 17:01:40 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist |
by the way after login you should do sudo su - oracle else you are root |
Thanks for that info, maybe it is good idea to include this to instruction. But from [root@782d32fab664 /]# su - oracle
[oracle@782d32fab664 ~]$ netstat -a | grep 1521
unix 2 [ ACC ] STREAM LISTENING 120037 /var/tmp/.oracle/sEXTPROC1521
[oracle@782d32fab664 ~]$ netstat -a | grep -i ora
unix 2 [ ACC ] STREAM LISTENING 120037 /var/tmp/.oracle/sEXTPROC1521
unix 2 [ ACC ] STREAM LISTENING 120036 /var/tmp/.oracle/s#137.1
unix 2 [ ACC ] STREAM LISTENING 120038 /var/tmp/.oracle/s#137.2
[oracle@782d32fab664 ~]$ sqlplus -V
-bash: sqlplus: command not found
[oracle@782d32fab664 ~]$ /oracle/product/12.1/db/bin/sqlplus -V
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[oracle@782d32fab664 ~]$ . oraenv
ORACLE_SID = [oracle] ?
ORACLE_HOME = [/home/oracle] ?
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base has been set to /home/oracle
[oracle@782d32fab664 ~]$ /oracle/product/12.1/db/bin/sqlplus sys/Welcome01@oracle as sysdba
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[oracle@782d32fab664 ~]$ export ORACLE_HOME=/oracle/product/12.1/db/
[oracle@782d32fab664 ~]$ /oracle/product/12.1/db/bin/sqlplus sys/Welcome01@oracle as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 30 18:07:50 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified |
thanks I will also check this |
So listener is working I tested it all from a ubuntu vagrant image
|
Yes, now I see too. [oracle@782d32fab664 ~]$ tnsping orcl
TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 30-JUL-2015 20:56:19
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/oracle/product/12.1/db/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cef1db7c4dbd)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.example.com)))
TNS-12545: Connect failed because target host or object does not exist Though it works from outside of container. I've succesfully connected to it through JDBC, for example. Many thanks for your advice and project once more. |
Perfect, tnsnames and listener is a bit tricky because every container has its own hostname, ip etc and you cannot use a fix one ( and not allowed in docker ). So I am updating the listener.ora and probably also need to do this for the tnsnames.ora. But the need for using tnsnames inside the box is not really necessary. have fun |
After successfull building, I've started container by command
And got the next log:
Even I tried to use
startup.sh
and got the next:What do I need to fix in that case ?
The text was updated successfully, but these errors were encountered: