akridge / oracle-apex-docker-stack

Deploy a complete Oracle Database XE, ORDS, & APEX stack on Docker using Docker Compose
10 stars 7 forks source link

Error connecting to the database #1

Closed omarsawalhah closed 1 year ago

omarsawalhah commented 1 year ago

I am having this error. auto-ords-reg | ERROR: CONN_STRING_FILE has not added, create a file with CONN_STRING variable and added as docker volume: auto-ords-reg | mkdir volume ; echo 'CONN_STRING=user/password@hostname:port/service_name' > volume/conn_string.txt

earlier in the logs I had this. auto-ords-reg | INFO : Database connection established. auto-ords-reg | INFO : Apex is not installed on your database. auto-ords-reg | INFO : Installing APEX on your DB please be patient. auto-ords-reg | INFO : You can check the logs by running the command below in a new terminal window: auto-ords-reg | docker exec -it aa8a4811a754 tail -f /tmp/install_container.log auto-ords-reg | WARN : APEX can be installed remotely on PDBs, If you want to install it on a CDB, auto-ords-reg | install it directly on the Database and not remotely. auto-ords-reg | ERROR: APEX installation failed auto-ords-reg exited with code 1

akridge commented 1 year ago

Hey there, Sorry for late reply. Been busy with work. Are you still having trouble with the setup?

If so, could you tell me what version of the stack are you using?

I noticed not too longer ago I was also having trouble with official ORDS container from Oracle and had to use an older version:

Not sure if that is the case or not. If not, is there any error when you run the following:

Just let me know. Cheers, Michael

omarsawalhah commented 1 year ago

Hi, I am using the "latest" for bost ORDS and XE. I am having this auto-ords-reg | 2023-03-26T12:23:32.915Z INFO Configuration properties for: |default|lo| auto-ords-reg | db.servicename=XEPDB1 auto-ords-reg | awt.toolkit=sun.awt.X11.XToolkit auto-ords-reg | db.invalidPoolTimeout=5s auto-ords-reg | java.specification.version=11 auto-ords-reg | conf.use.wallet=true auto-ords-reg | sun.cpu.isalist= auto-ords-reg | sun.jnu.encoding=ANSI_X3.4-1968 auto-ords-reg | java.class.path=/opt/oracle/ords/ords.war auto-ords-reg | java.vm.vendor=Oracle Corporation auto-ords-reg | sun.arch.data.model=64 auto-ords-reg | nashorn.args=--no-deprecation-warning auto-ords-reg | java.vendor.url=https://openjdk.java.net/ auto-ords-reg | resource.templates.enabled=false auto-ords-reg | user.timezone=UTC auto-ords-reg | db.port=1521 auto-ords-reg | debug.printDebugToScreen=true auto-ords-reg | java.vm.specification.version=11 auto-ords-reg | os.name=Linux auto-ords-reg | sun.java.launcher=SUN_STANDARD auto-ords-reg | user.country=US auto-ords-reg | sun.boot.library.path=/usr/java/jdk-11.0.15/lib auto-ords-reg | sun.java.command=/opt/oracle/ords/ords.war --config /etc/ords/config serve --port 8181 --apex-images /opt/oracle/apex/images/22.2.0 auto-ords-reg | jdk.debug=release auto-ords-reg | sun.cpu.endian=little auto-ords-reg | user.home=/root auto-ords-reg | oracle.dbtools.launcher.executable.jar.path=/opt/oracle/ords/ords.war auto-ords-reg | user.language=en auto-ords-reg | java.specification.vendor=Oracle Corporation auto-ords-reg | java.version.date=2022-04-19 auto-ords-reg | database.api.enabled=true auto-ords-reg | java.home=/usr/java/jdk-11.0.15 auto-ords-reg | db.username=ORDS_PUBLIC_USER auto-ords-reg | file.separator=/ auto-ords-reg | java.vm.compressedOopsMode=32-bit auto-ords-reg | line.separator= auto-ords-reg | auto-ords-reg | restEnabledSql.active=true auto-ords-reg | java.specification.name=Java Platform API Specification auto-ords-reg | java.vm.specification.vendor=Oracle Corporation auto-ords-reg | java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment auto-ords-reg | feature.sdw=true auto-ords-reg | java.awt.headless=true auto-ords-reg | db.hostname=database auto-ords-reg | db.password=** auto-ords-reg | sun.management.compiler=HotSpot 64-Bit Tiered Compilers auto-ords-reg | security.requestValidationFunction=ords_util.authorize_plsql_gateway auto-ords-reg | java.runtime.version=11.0.15+8-LTS-149 auto-ords-reg | user.name=root auto-ords-reg | path.separator=: auto-ords-reg | os.version=5.10.109-0-virt auto-ords-reg | java.runtime.name=Java(TM) SE Runtime Environment auto-ords-reg | file.encoding=ANSI_X3.4-1968 auto-ords-reg | java.vm.name=Java HotSpot(TM) 64-Bit Server VM auto-ords-reg | java.vendor.version=18.9 auto-ords-reg | java.vendor.url.bug=https://bugreport.java.com/bugreport/ auto-ords-reg | java.io.tmpdir=/tmp auto-ords-reg | oracle.dbtools.cmdline.ShellCommand=ords auto-ords-reg | java.version=11.0.15 auto-ords-reg | user.dir=/opt/oracle/ords auto-ords-reg | os.arch=amd64 auto-ords-reg | java.vm.specification.name=Java Virtual Machine Specification auto-ords-reg | jdbc.MaxLimit=30 auto-ords-reg | java.awt.printerjob=sun.print.PSPrinterJob auto-ords-reg | oracle.dbtools.cmdline.home=/opt/oracle/ords auto-ords-reg | sun.os.patch.level=unknown auto-ords-reg | java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib auto-ords-reg | java.vendor=Oracle Corporation auto-ords-reg | java.vm.info=mixed mode auto-ords-reg | java.vm.version=11.0.15+8-LTS-149 auto-ords-reg | sun.io.unicode.encoding=UnicodeLittle auto-ords-reg | jdbc.InitialLimit=10 auto-ords-reg | db.connectionType=basic auto-ords-reg | java.class.version=55.0 auto-ords-reg | auto-ords-reg | /usr/local/bin/ords: line 221: 56 Killed ${JAVA} "${APP_VM_OPTS[@]}" ${ORDS_DEBUG} -jar "${ORDS_HOME}"/${ORDS_WAR} ${ORDS_VERBOSE} "$@" auto-xe-reg | 2023-03-26T12:24:07.708401+00:00 auto-xe-reg | Warning: VKTM detected a forward time drift. auto-xe-reg | Please see the VKTM trace file for more details: auto-xe-reg | /opt/oracle/diag/rdbms/xe/XE/trace/XE_vktm_43.trc auto-ords-reg exited with code 137 auto-ords-reg | INFO : This container will start a service running ORDS 22.4.4 and APEX 22.2.0. auto-ords-reg | WARN : A conn_string file has not been provided, but a mounted configuration has been detected in /etc/ords/config. auto-ords-reg | WARN : The container will start with the detected configuration. auto-ords-reg | INFO : Starting the ORDS services with the following database details: auto-ords-reg | INFO : database:1521/XEPDB1.

omarsawalhah commented 1 year ago

I am using Mac M1 machine, does this make any difference?

akridge commented 1 year ago

Hmm might be a permission issue. But M1 does make a difference as they act a bit different now. Here are a couple links that may help:

if those don’t help just let me know. I can probably get a hold of my wife’s M1 Mac and can help troubleshoot as well.

omarsawalhah commented 1 year ago

Thanks, The database is running OK, I can run an XE image standalone and I am able to connect outside the container, but the compose and running the stack, it fails, could you try it on your wife's M1 and let me know what are the steps exactly to get it run?

akridge commented 1 year ago

hmm, looking closer at your log I see "auto-ords-reg exited with code 137" . That means the container was killed by the operating system due to excessive memory usage. In your docker desktop settings, have you tried changing the memory allocation to something higher? Usually its set low to 2Gb, and you may need at least 4GB or more for the full stack. That setting is under:

Let me know if adjusting the memory helps or not. Its also possible the install failed which may also be the reason for a similar error. I will also see about updating my docker compose file to also specify/set resources.

akridge commented 1 year ago

closing due to inactivity of response