docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

"missing or invalid path prefix" error while impdp using

Open Waldemarius opened this issue 1 year ago • 5 comments

Hi All!

Steps to reproduce:

1. Pull container from registry.

docker pull container-registry.oracle.com/database/enterprise:19.3.0.0

2. Create a volume for oradata mount .

docker volume create db-vol

3. Run container.

docker run --rm -d --name db -e ORACLE_EDITION=standard -e ORACLE_SID=ora -e ORACLE_PDB=pdb -e ORACLE_PWD=pwd \
--ulimit nofile=122880:122880 -m 3G -v db-vol:/opt/oracle/oradata container-registry.oracle.com/database/enterprise:19.3.0.0
Output of docker log:
[user@fedora ~]$ docker logs db
[2023:03:10 07:20:07]: Acquiring lock .ORA.create_lck with heartbeat 30 secs
[2023:03:10 07:20:07]: Lock acquired
[2023:03:10 07:20:07]: Starting heartbeat
[2023:03:10 07:20:07]: Lock held .ORA.create_lck
Relinking oracle binary for edition: standard
make -f /opt/oracle/product/19c/dbhome_1/rdbms/lib/ins_rdbms.mk edition_standard ioracle
Deploying Oracle Database Standard Edition
mv -f /opt/oracle/product/19c/dbhome_1/lib/libedtn19.a /opt/oracle/product/19c/dbhome_1/lib/libedtn19_backup.a
cp /opt/oracle/product/19c/dbhome_1/lib/libedtn19_std.a /opt/oracle/product/19c/dbhome_1/lib/libedtn19.a
chmod 755 /opt/oracle/product/19c/dbhome_1/bin

 - Linking Oracle 
rm -f /opt/oracle/product/19c/dbhome_1/rdbms/lib/oracle
/opt/oracle/product/19c/dbhome_1/bin/orald  -o /opt/oracle/product/19c/dbhome_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/opt/oracle/product/19c/dbhome_1/rdbms/lib/ -L/opt/oracle/product/19c/dbhome_1/lib/ -L/opt/oracle/product/19c/dbhome_1/lib/stubs/   -Wl,-E /opt/oracle/product/19c/dbhome_1/rdbms/lib/opimai.o /opt/oracle/product/19c/dbhome_1/rdbms/lib/ssoraed.o /opt/oracle/product/19c/dbhome_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv19 -Wl,--no-whole-archive /opt/oracle/product/19c/dbhome_1/lib/nautab.o /opt/oracle/product/19c/dbhome_1/lib/naeet.o /opt/oracle/product/19c/dbhome_1/lib/naect.o /opt/oracle/product/19c/dbhome_1/lib/naedhs.o /opt/oracle/product/19c/dbhome_1/rdbms/lib/config.o  -ldmext -lserver19 -lodm19 -lofs -lcell19 -lnnet19 -lskgxp19 -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 -lknlopt -loraolap19 -lskjcx19 -lslax19 -lpls19  -lrt -lplp19 -ldmext -lserver19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 `if [ -f /opt/oracle/product/19c/dbhome_1/lib/libavserver19.a ] ; then echo "-lavserver19" ; else echo "-lavstub19"; fi` `if [ -f /opt/oracle/product/19c/dbhome_1/lib/libavclient19.a ] ; then echo "-lavclient19" ; fi` -lknlopt -lslax19 -lpls19  -lrt -lplp19 -ljavavm19 -lserver19  -lwwg  `cat /opt/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /opt/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19 -lmm -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lztkg19 `cat /opt/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /opt/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19   -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 `if /usr/bin/ar tv /opt/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo19 -lserver19"; fi` -L/opt/oracle/product/19c/dbhome_1/ctx/lib/ -lctxc19 -lctx19 -lzx19 -lgx19 -lctx19 -lzx19 -lgx19 -lclscest19 -loevm -lclsra19 -ldbcfg19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19 -locr19 -locrb19 -locrutl19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19  -lgeneric19 -lorazip -loraz -llzopro5 -lorabz2 -lorazstd -loralz4 -lipp_z -lipp_bz2 -lippdc -lipps -lippcore  -lippcp -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lsnls19 -lunls19  -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lasmclnt19 -lcommon19 -lcore19  -ledtn19 -laio -lons  -lmql1 -lipc1 -lfthread19    `cat /opt/oracle/product/19c/dbhome_1/lib/sysliblist` -Wl,-rpath,/opt/oracle/product/19c/dbhome_1/lib -lm    `cat /opt/oracle/product/19c/dbhome_1/lib/sysliblist` -ldl -lm   -L/opt/oracle/product/19c/dbhome_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /opt/oracle/product/19c/dbhome_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
rm -f /opt/oracle/product/19c/dbhome_1/bin/oracle 
mv /opt/oracle/product/19c/dbhome_1/rdbms/lib/oracle /opt/oracle/product/19c/dbhome_1/bin/oracle
chmod 6751 /opt/oracle/product/19c/dbhome_1/bin/oracle
(if [ ! -f /opt/oracle/product/19c/dbhome_1/bin/crsd.bin ]; then \
    getcrshome="/opt/oracle/product/19c/dbhome_1/srvm/admin/getcrshome" ; \
    if [ -f "$getcrshome" ]; then \
        crshome="`$getcrshome`"; \
        if [ -n "$crshome" ]; then \
            if [ $crshome != /opt/oracle/product/19c/dbhome_1 ]; then \
                oracle="/opt/oracle/product/19c/dbhome_1/bin/oracle"; \
                $crshome/bin/setasmgidwrap oracle_binary_path=$oracle; \
            fi \
        fi \
    fi \
fi\
);
ORACLE EDITION: STANDARD

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-MAR-2023 07:20:44

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

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

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/7582f133df92/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 19.0.0.0.0 - Production
Start Date                10-MAR-2023 07:20:45
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/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/7582f133df92/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
[WARNING] [DBT-11209] Current available memory is less than the required available memory (3,072MB) for creating the database.
   CAUSE: Following nodes do not have required available memory :
 Node:7582f133df92		Available memory:1.7267GB (1810552.0KB)

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/ORA.
Database Information:
Global Database Name:ORA
System Identifier(SID):ORA
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORA/ORA.log" for further details.

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Mar 10 07:42:30 2023
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> 
System altered.

SQL> 
System altered.

SQL> 
Pluggable database altered.

SQL> 
PL/SQL procedure successfully completed.

SQL> SQL> 
Session altered.

SQL> 
User created.

SQL> 
Grant succeeded.

SQL> 
Grant succeeded.

SQL> 
Grant succeeded.

SQL> 
User altered.

SQL> SQL> Disconnected from Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
The Oracle base remains unchanged with value /opt/oracle

Executing user defined scripts
/opt/oracle/runUserScripts.sh: running /opt/oracle/scripts/extensions/setup/swapLocks.sh
[2023:03:10 07:42:33]: Releasing lock .ORA.create_lck
[2023:03:10 07:42:33]: Lock released .ORA.create_lck
[2023:03:10 07:42:33]: Acquiring lock .ORA.exist_lck with heartbeat 30 secs
[2023:03:10 07:42:33]: Lock acquired
[2023:03:10 07:42:33]: Starting heartbeat
[2023:03:10 07:42:33]: Lock held .ORA.exist_lck

DONE: Executing user defined scripts

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:
PDB(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"
PDB(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"
2023-03-10T07:42:30.337457+00:00
ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORA/control01.ctl' SCOPE=SPFILE;
2023-03-10T07:42:30.369653+00:00
ALTER SYSTEM SET local_listener='' SCOPE=BOTH;
   ALTER PLUGGABLE DATABASE PDB SAVE STATE
Completed:    ALTER PLUGGABLE DATABASE PDB SAVE STATE

XDB initialized.

4. Enter to container.

[user@fedora ~]$ docker exec -it db bash

5. Run impdp with existing data_pump_dir

bash-4.2$ impdp system/pwd@pdb full=Y directory=data_pump_dir dumpfile=dumpfile.dmp logfile=logfile.log
Output of impdp:
Import: Release 19.0.0.0.0 - Production on Fri Mar 10 08:05:24 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-65100: missing or invalid path prefix - /opt/oracle/admin/ORA/dpdump/F687E5FC41560B7AE053020011AC6D33
ORA-06512: at "SYS.KUPF$FILE", line 4809
ORA-06512: at "SYS.KUPF$FILE", line 4783
ORA-06512: at "SYS.KUPF$FILE", line 4771
ORA-06512: at "SYS.KUPM$MCP", line 4422

ORA-39097: Data Pump job encountered unexpected error -65100

6. The same error with another directory.

bash-4.2$ sqlplus sys/pwd@pdb as sysdba
SQL> CREATE OR REPLACE DIRECTORY pump_dir AS '/pump_dir';
Directory created.
bash-4.2$ impdp system/pwd@pdb full=Y directory=pump_dir dumpfile=dumpfile.dmp logfile=logfile.log

Other details:

[user@fedora ~]$ uname -a
Linux fedora 6.1.14-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 26 00:13:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[user@fedora ~]$ docker --version
Docker version 23.0.1, build a5ee5b1
[user@fedora ~]$ docker images
container-registry.oracle.com/database/enterprise   19.3.0.0   26f422a3e69f   5 months ago   7.75GB
[user@fedora ~]$ docker ps
CONTAINER ID   IMAGE                                                        COMMAND                  CREATED             STATUS                       PORTS     NAMES
7582f133df92   container-registry.oracle.com/database/enterprise:19.3.0.0   "/bin/sh -c 'exec $O…"   About an hour ago   Up About an hour (healthy)             db

Waldemarius avatar Mar 10 '23 08:03 Waldemarius

It this the same as https://github.com/oracle/docker-images/issues/2506?

oraclesean avatar Mar 10 '23 12:03 oraclesean

Yes, looks like similar to #2506 There is also ORA-65100: missing or invalid path prefix error in my case:

SQL> select * from dba_directories;
select * from dba_directories
              *
ERROR at line 1:
ORA-65100: missing or invalid path prefix -
/opt/oracle/admin/ORA/dpdump/F687E5FC41560B7AE053020011AC6D33

But executing the query twice does not remove the error.

Waldemarius avatar Mar 10 '23 12:03 Waldemarius

But executing the query twice does not remove the error.

I read the original author's post as saying the error happened on the second execution. This may be an issue because you're using Fedora. I'm thinking out loud (no time to test right now), but perhaps mounting the /opt/oracle/admin directory as a volume might bypass the error?

Create a volume for the admin directory:

docker volume create db-admin

Or add a bind-mounted volume, allowing access to the database's admin directory from the host filesystem:

mkdir -p /some_directory/db-admin
# Set directory ownership on Linux if the Docker user isn't oracle/oinstall:
sudo chown -R oracle:oinstall /some_directory/db-admin
docker volume create --opt type=none \
                     --opt o=bind \
                     --opt device=/some_directory/db-admin \
                     db-admin

Then run the image:

docker run --rm -d --name db \
           -e ORACLE_EDITION=standard \
           -e ORACLE_SID=ora \
           -e ORACLE_PDB=pdb \
           -e ORACLE_PWD=pwd \
           --ulimit nofile=122880:122880 \
           -m 3G \
           -v db-vol:/opt/oracle/oradata \
           -v db-admin:/opt/oracle/admin \
           container-registry.oracle.com/database/enterprise:19.3.0.0

oraclesean avatar Mar 10 '23 13:03 oraclesean

Just for info, I had the exact same error on a dockerized oracle 19, after moving the docker to another server. Turned out that another path, referenced as directory had bad permissions. Changing the owner and permissions fixed the error. The dir referenced by DATA_PUMP_DIR was fine in the meantime.

len-ro avatar Oct 10 '23 13:10 len-ro

I spent days with this problem and the final (only) solution for me was to drop the directory DATA_PUMP_DIR. Afterwards the import from another directory (which I created with the system user inside the PDB) worked.

frankbe avatar Jul 01 '24 12:07 frankbe