oracle / adb-free

Universal Permissive License v1.0
36 stars 3 forks source link

docker run fails with PermissionError: [Errno 13] Permission denied: '/u01/data/input.json' #15

Closed jamesydb closed 7 months ago

jamesydb commented 8 months ago

Hello, I am trying to use following command to bring up atp on windows using docker but it is failing with following error.

Error:

2024-03-16 10:32:02 Archive: /u01/POD1.zip 2024-03-16 10:32:02 creating: /u01/app/oracle/oradata/ 2024-03-16 10:32:02 creating: /u01/app/oracle/oradata/POD1/ 2024-03-16 10:32:02 creating: /u01/app/oracle/oradata/POD1/0A156A2AE0DA39A7E06377234664C7E0/ 2024-03-16 10:32:02 creating: /u01/app/oracle/oradata/POD1/0A156A2AE0DA39A7E06377234664C7E0/datafile/ 2024-03-16 10:32:03 inflating: /u01/app/oracle/oradata/POD1/0A156A2AE0DA39A7E06377234664C7E0/datafile/o1_mf_templwbwv5fk.tmp
2024-03-16 10:32:03 creating: /u01/app/oracle/oradata/POD1/0A1438F87F472D38E0637723466488D2/ 2024-03-16 10:32:03 creating: /u01/app/oracle/oradata/POD1/0A1438F87F472D38E0637723466488D2/datafile/ 2024-03-16 10:32:03 inflating: /u01/app/oracle/oradata/POD1/0A1438F87F472D38E0637723466488D2/datafile/o1_mf_templwbwv4cg.tmp
2024-03-16 10:32:03 inflating: /u01/app/oracle/oradata/POD1/redo01.log
2024-03-16 10:32:03 creating: /u01/app/oracle/oradata/POD1/10E957D242B84061E0636402000AF924/ 2024-03-16 10:32:03 creating: /u01/app/oracle/oradata/POD1/10E957D242B84061E0636402000AF924/datafile/ 2024-03-16 10:32:03 inflating: /u01/app/oracle/oradata/POD1/redo02.log
2024-03-16 10:32:03 creating: /u01/app/oracle/oradata/POD1/datafile/ 2024-03-16 10:32:10 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_systemlwbwom2p.dbf
2024-03-16 10:32:10 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_templwbwv35n.tmp
2024-03-16 10:32:11 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_datalwbwom3q.dbf
2024-03-16 10:32:11 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_undotbs1lwby2o2c.dbf
2024-03-16 10:32:11 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_templwby2p63.tmp
2024-03-16 10:32:14 inflating: /u01/app/oracle/oradata/POD1/datafile/o1_mf_sysauxlwbwom36.dbf
2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/10E95E8FC1C940EAE0636402000A2637/ 2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/10E95E8FC1C940EAE0636402000A2637/datafile/ 2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/onlinelog/ 2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/controlfile/ 2024-03-16 10:32:14 inflating: /u01/app/oracle/oradata/POD1/controlfile/o1_mflwbwxc2s.ctl
2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/10E95330BACB3D59E0636402000A3C37/ 2024-03-16 10:32:14 creating: /u01/app/oracle/oradata/POD1/10E95330BACB3D59E0636402000A3C37/datafile/ 2024-03-16 10:32:14 TIME ELAPSED Unzipping /u01/POD1.zip: 0 minutes and 12 seconds elapsed 2024-03-16 10:32:14 User input JSON not found 2024-03-16 10:32:14 Traceback (most recent call last): 2024-03-16 10:32:14 File "/u01/scripts/user_input.py", line 89, in 2024-03-16 10:32:14 generate_default_input_json() 2024-03-16 10:32:14 File "/u01/scripts/user_input.py", line 73, in generate_default_input_json 2024-03-16 10:32:14 with open(MY_CONTAINER_INPUT_JSON, 'w') as fp: 2024-03-16 10:32:14 PermissionError: [Errno 13] Permission denied: '/u01/data/input.json'

Command: docker run -d -p 1521:1522 -p 1522:1522 -p 8443:8443 -p 27017:27017 -e WORKLOAD_TYPE='ATP' -e WALLET_PASSWORD='XXXXXX' -e ADMIN_PASSWORD='XXXXXX' --cap-add SYS_ADMIN --volume adb_container_volume:/u01/data --name adb-free ghcr.io/oracle/adb-free:latest

aosingh commented 8 months ago

@jamesydb

I don't have a Windows machine but I believe there is some permissions missing for container user to write to the volume location.

Could you try without the --volume option and see if the container comes up ?

--volume adb_container_volume:/u01/data

Removing the --volume should be fine and will not affect any functionality. Meanwhile, I will check if you need to grantany missing permissions for the container user to be able to write in the volume.

alexesca commented 8 months ago

@aosingh It worked! I will run it without a volume from now on. I have a mac. It has issues with podman. I get:

"Cannot connect to Podman. Please verify your connection to the Linux system using podman system connection list, or try podman machine init and podman machine start to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:55997: connect: connection refused"

I will continue to use docker!

aosingh commented 7 months ago

Thanks for confirming