Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loads of permission issues when trying to start the image #7

Open
Impakt opened this issue May 9, 2024 · 4 comments
Open

Loads of permission issues when trying to start the image #7

Impakt opened this issue May 9, 2024 · 4 comments

Comments

@Impakt
Copy link

Impakt commented May 9, 2024

Hello,
I followed the documentation and was able to build 19.19 on my macbook, but I can't get it to start regardless whether i use compose or not

compose:

services:
  oracle-arm:
    container_name: oracle-arm
    build:
      context: .
      dockerfile: dockerfiles/oracle-arm.Dockerfile # this just has a FROM line that points to the image i built
    ports:
      - 1521:1521 # oracle
      - 8080:8080 # web ui
    volumes:
      - ./data/oracle/oradata:/u02/app/oracle/oradata \
      - ./data/oracle/diag:/u01/app/oracle/diag \
      - ./data/oracle/audit:/u01/app/oracle/admin \
      - ./data/oracle/reco:/u03/app/oracle \
      - ./data/oracle/scripts:/scripts \

All of the directories are empty and even have 777 pernissions. Startup logs:

2024-05-09 15:10:27 [FATAL] [DBT-06006] Unable to create directory: (/u02/app/oracle/oradata/test/).
2024-05-09 15:10:27    CAUSE: Proper permissions are not granted to create the directory or there is no space left in the volume.
2024-05-09 15:10:27 [FATAL] [DBT-06006] Unable to create directory: (/u03/app/oracle).
2024-05-09 15:10:27    CAUSE: Proper permissions are not granted to create the directory or there is no space left in the volume.
2024-05-09 15:10:28 alter pluggable database all open
2024-05-09 15:10:28 *
2024-05-09 15:10:28 ERROR at line 1:
2024-05-09 15:10:28 ORA-01034: ORACLE not available
2024-05-09 15:10:28 Process ID: 0
2024-05-09 15:10:28 Session ID: 0 Serial number: 0
2024-05-09 15:10:28 
2024-05-09 15:10:28 
2024-05-09 15:10:28 alter pluggable database all save state
2024-05-09 15:10:28 *
2024-05-09 15:10:28 ERROR at line 1:
2024-05-09 15:10:28 ORA-01034: ORACLE not available
2024-05-09 15:10:28 Process ID: 0
2024-05-09 15:10:28 Session ID: 0 Serial number: 0
2024-05-09 15:10:28 
2024-05-09 15:10:28 
2024-05-09 15:10:28 
2024-05-09 15:10:28 # ----------------------------------------------------------------------------------------------- #
2024-05-09 15:10:28   runDBCA: DBCA complete at 2024-05-09 05:10:28
2024-05-09 15:10:28 # ----------------------------------------------------------------------------------------------- #
2024-05-09 15:10:29 ERROR: Cannot locate /home/oracle/bin/sqlplus
2024-05-09 15:10:29 Exiting...
2024-05-09 15:10:29 WARNING: Database setup for test was unsuccessful.
2024-05-09 15:10:29 WARNING: Check log output for additional information.
2024-05-09 15:10:29 
2024-05-09 15:10:29 # ----------------------------------------------------------------------------------------------- #
2024-05-09 15:10:29   Tailing alert_test.log: 
2024-05-09 15:10:26 mkdir: cannot create directory '/u03/app/oracle/fast_recovery_area': Permission denied
2024-05-09 15:10:27 cat: /u01/app/oracle/cfgtoollogs/dbca/test/test.log: No such file or directory
2024-05-09 15:10:27 cat: /u01/app/oracle/cfgtoollogs/dbca/test.log: No such file or directory
2024-05-09 15:10:27 cat: /u01/app/oracle/cfgtoollogs/dbca/test/testPDB1/test.log: No such file or directory
2024-05-09 15:10:28 mkdir: cannot create directory '/u02/app/oracle/oradata/dbconfig': Permission denied
2024-05-09 15:10:29 /opt/scripts/manageOracle.sh: line 934: /home/oracle/bin/sqlplus: No such file or directory
2024-05-09 15:10:29 tail: cannot open '/u01/app/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
2024-05-09 15:10:29 tail: no files remaining

Any help would be greatly appreciated, and happy to help test to get it working.

@oraclesean
Copy link
Owner

Try using absolute paths for the volumes.

@Impakt
Copy link
Author

Impakt commented May 9, 2024

same issue i'm afraid.

I changed the manageOracle.sh script where the fast_recovery_area dir is created to this:

            ls -l /u03/app/
            ls -l ${RECO}
            mkdir -p "${RECO}/fast_recovery_area/${ORACLE_SID}" || error "Could not create the FRA directory for ${ORACLE_SID}"

And when that part of the script is executed, this is the output:

oracle-arm  | drwxr-xr-x 2 root root 4096 May  9 06:09 oracle
oracle-arm  | drwxr-xr-x 2 root root   64 May  9 06:10 oracle \
oracle-arm  | total 0
oracle-arm  | mkdir: cannot create directory '/u03/app/oracle/fast_recovery_area': Permission denied
oracle-arm  | ERROR: Could not create the FRA directory for ORCLCDB

@oraclesean
Copy link
Owner

That error is saying that the path in the container can't be created. Since it's referencing a volume on the host, it needs (first) an absolute path (container ecosystems don't do relative paths) and correct permissions on the local volume.

./data/oracle/oradata is not an acceptable path for mapping to the local host. Relative paths could change based on the user's current directory at runtime, and multiple calls to docker [run|compose] from different directories would produce inconsistent results. Dot notation and tilde references are not allowed.

Change the local path used for mounting the volumes to something like:

/home/myuser/data/oracle/oradata

@Impakt
Copy link
Author

Impakt commented May 9, 2024

rookie error on my part. I had the trailing slash in my compose file (look at the volumes) because i copied/pasted your docker command in the readme and pasted it to my compose file but forgot to remove them. Now im trying to get the image to run my scripts to populate the database like this one. Sorry for wasting your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants