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

Running quickstart.sh in WSL2 ends with errors #57

Open
Ali-MRDN47 opened this issue Mar 1, 2022 · 6 comments
Open

Running quickstart.sh in WSL2 ends with errors #57

Ali-MRDN47 opened this issue Mar 1, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Ali-MRDN47
Copy link

Hi there,
I'm trying to run the project on my windows 10 machine using wsl2 with ubuntu distribution.
I'm using wsl2 terminal to run the script quickstart.sh. I've already downloaded and copied jre-8u321-linux-x64.tar.gz into the folder files and adjusted the settings.env file as follow:

FILES_DIR=files
ORACLE_SID=XE
ORACLE_PDB=XEPDB1
ORACLE_PWD=Oracle21
APEX_ADMIN_EMAIL=mrdn-47@gmx.net
APEX_ADMIN_PWD=Oracle__21
APEX_PUBLIC_USER_PWD=Oracle21_1
APEX_LISTENER_PWD=Oracle21_2
APEX_REST_PUBLIC_USER_PWD=Oracle21_3
ORDS_PUBLIC_USER_PWD=Oracle21_4
INSTALL_FILE_APEX=apex-latest.zip
INSTALL_FILE_ORDS=ords-latest.zip
INSTALL_FILE_JAVA=jre-8u321-linux-x64.tar.gz
DOCKER_ORDS_PORT=50080
DOCKER_EM_PORT=55500
DOCKER_DB_PORT=51521
DB_VERSION=18.4.0
DB_EDITION=xe
DOCKER_NETWORK_NAME=das_network
ALLOW_DB_PATCHING=N
OML4R_SUPPORT=N
REST_ENABLED_SQL=Y
RTU_ENABLED=N
SQLDEVWEB=Y
DATABASEAPI=Y
XE_USE_LOCAL_COPY=N

I got the following error at the end of the execution after installing a lot of stuffs:

The Oracle base remains unchanged with value /opt/oracle
#########################
DATABASE IS READY TO USE!
#########################

Executing user defined scripts
/opt/oracle/runUserScripts.sh: running /opt/oracle/scripts/startup/01-run.sh
##### Install dependencies if required #####
tar (child): /tmp/files/java17: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar (child): /tmp/files/java17: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
##### Extracting files if required ####
##### Starting ORDS #####
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/scripts/startup/package/runOrds.sh: line 15: java: command not found
/opt/oracle/scripts/startup/package/runOrds.sh: line 17: java: command not found

/opt/oracle/runUserScripts.sh: ignoring /opt/oracle/scripts/startup/package

DONE: Executing user defined scripts

The following output is now a tail of the alert.log:
XEPDB1(3):Resize operation completed for file# 10, fname /opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf, old size 573440K, new size 593920K
2022-03-01T13:20:43.946332+00:00
Thread 1 cannot allocate new log, sequence 6
Private strand flush not complete
  Current log# 2 seq# 5 mem# 0: /opt/oracle/oradata/XE/redo02.log
2022-03-01T13:20:46.953894+00:00
Thread 1 advanced to log sequence 6 (LGWR switch),  current SCN: 2736350
  Current log# 3 seq# 6 mem# 0: /opt/oracle/oradata/XE/redo03.log
2022-03-01T13:20:52.597313+00:00
XEPDB1(3):Resize operation completed for file# 11, fname /opt/oracle/oradata/XE/XEPDB1/undotbs01.dbf, old size 194560K, new size 199680K
2022-03-01T13:25:11.336862+00:00
Resize operation completed for file# 4, fname /opt/oracle/oradata/XE/undotbs01.dbf, old size 117760K, new size 122880K
2022-03-01T13:30:20.970638+00:00
XEPDB1(3):Resize operation completed for file# 10, fname /opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf, old size 593920K, new size 614400K

what I can understand is, that Java istn't installed in on the container.
Here are the files:
01-build.log
02-run.log
)

Can anyone tell me, what's the problem is?

@martindsouza
Copy link

@Ali-MRDN47 in your settings.env file can you remove the reference to FILES_DIR=files (first line) and try again?

@fuzziebrain any other thoughts?

@fuzziebrain
Copy link
Owner

Running ./quickstart.sh shouldn't have required creating a different .env file, it would have been created for you.

The error singled out here:

##### Install dependencies if required #####
tar (child): /tmp/files/java17: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar (child): /tmp/files/java17: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

... is a bug and I'll fix it soon. It shouldn't affect a first build. It will break if the <CONTAINER_NAME>-oradata directory exists from a previous deployment.

The problem is captured in the build log:

##### Install dependencies if required #####
Loaded plugins: ovl
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/Dirnames'
You need to be root to perform this command.

I'd recommend that you perform the following steps:

  1. Delete the failed container using the command docker rm -vf <CONTAINER_NAME>.
  2. Remove the <CONTAINER_NAME>-oradata directory using the command sudo rm -rf <CONTAINER_NAME>-oradata.
  3. Run the command: sudo -K.
  4. Run the quickstart script: ./quickstart.sh

@fuzziebrain
Copy link
Owner

@Ali-MRDN47

Not too sure if you had sent a reply, but you had this error:

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:55500: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

This is an issue with Windows restricting the use of certain ports, likely because you have Hyper-V enabled.

@Ali-MRDN47
Copy link
Author

@Ali-MRDN47

Not too sure if you had sent a reply, but you had this error:

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:55500: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

This is an issue with Windows restricting the use of certain ports, likely because you have Hyper-V enabled.

Yes, I've replayed but I've removed it later because it was irrelevant, sorry. I solved this problem by adjusting the ports

@fuzziebrain fuzziebrain self-assigned this Mar 12, 2022
@fuzziebrain fuzziebrain added the bug Something isn't working label Mar 12, 2022
fuzziebrain added a commit that referenced this issue Mar 12, 2022
fuzziebrain added a commit that referenced this issue Mar 12, 2022
fuzziebrain added a commit that referenced this issue Mar 13, 2022
@alef201
Copy link

alef201 commented May 6, 2022

Hi,

I had the same issue when I tried to install apex 22.1 on wsl-2 in docker today.
I solved (as workaround) the issue by adding su -c commnand for installing of java in scripts, now env seems to be working (workspace & test app created).

The source of the issue is default user for docker container, you are not root but oracle, in previous installation for version 21.2 few months ago I was root when I called ( docker exec -it xx bash), It seems to be that scripts are not running under root in docker container but under oracle user, for some tasks (I identified only java installation) they are not sufficient priviliges assigned.

Ales

@felipe-piovezan
Copy link

Changing permission on "files" folder before running the quickstart.sh also worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants