fuzziebrain / docker-apex-stack

Utility scripts for creating an Oracle Application Express stack as a Docker container.
MIT License
97 stars 34 forks source link

ORDS 404 could not assign to any database in windows WSL #44

Closed yevon closed 3 years ago

yevon commented 3 years ago

I'm getting 404 messages from ords when trying to access to just http://localhost:50080/ords. "Could not assing request to any database".

I've tried to execute ords validation process and it says that ORDS schema objects are not installed in PDB XEPDB1, any ideas what could it be?

Thanks.

yevon commented 3 years ago

I think that is is due to that the SYS password is not changed properly and now I don't know what the password is, and the installer failed silently

yevon commented 3 years ago

I tried the quickstart and also fails, it just can't connect as SYS when installing ords and fails. Installing in windows with WSL2

image

yevon commented 3 years ago

The problem is with windows file mounts and symlinks. All db config files are symlinked and it doesn't work well with windows, as you cannot change ownership of the files and all of them remain owned by root user. For fixing SYS access in windows I had to do the following:

rm /opt/oracle/product/18c/dbhomeXE/dbs/orapwXE cp /opt/oracle/oradata/dbconfig/XE/orapwXE /opt/oracle/product/18c/dbhomeXE/dbs/orapwXE chown oracle:oinstall /opt/oracle/product/18c/dbhomeXE/dbs/orapwXE

Just remove the symlink of the passwords file, copy it, and change the ownership.

Maybe it should also be done with listener.ora oratab spfileXE.ora and tnsnames.ora

I just added this to de 01-install.sh script just after apex and ords unzip process.

yevon commented 3 years ago

I just found a better solution, and is to not mount the oradata on the windows filesystem and just mount it as a volume. Then file permissions can be persisted without problems. I will post this to oracle docker github as they must fix this.

fuzziebrain commented 3 years ago

You can opt not to map the container's /opt/oracle/oradata to a host directory. Just remove/comment out line 49 in the file ./02-run.sh.

FWIW, the last build I did to test the database 21c support, it was done in WSL2 with no issues.