dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

docker-compose create-administrator fails

Open bjarman opened this issue 10 months ago • 1 comments

Describe the bug Following the documentation for running 7_x in docker I encountered this when trying to create the admin account:

Exception: Problem connecting to database. This indicates issue with either network or version (or possibly some other). If you are running this in docker-compose, please make sure dspace-cli was built from the same sources as running dspace container AND that they are in the same project/network. java.lang.IllegalStateException: Problem connecting to database. This indicates issue with either network or version (or possibly some other). If you are running this in docker-compose, please make sure dspace-cli was built from the same sources as running dspace container AND that they are in the same project/network. at org.dspace.administer.CreateAdministrator.(CreateAdministrator.java:124) at org.dspace.administer.CreateAdministrator.main(CreateAdministrator.java:69) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:283) at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:134) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:99)

To Reproduce I am trying this using a mac (M2). Follow this documentation: https://wiki.lyrasis.org/display/DSPACE/Try+out+DSpace+7#TryoutDSpace7-InstallviaDocker

Expected behavior Successful creation of admin account

Related work Link to any related tickets or PRs here.

bjarman avatar Apr 10 '24 14:04 bjarman

I encountered the same error on Ubuntu 22.04.4 LTS, Docker 26.0.1, docker-compose 1.29.2.

hystricidae avatar Apr 15 '24 08:04 hystricidae

Closing, as this is unreproducible on my end (at least with the latest code). I suspect the issue might be that the database image is not starting up properly, or has somehow failed. I'd recommend checking the Docker logs to see the details of why it is saying "Problem connecting to database.".

You should be able to run docker compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml logs -f to see the logs, or view the logs by clicking on the container in Docker Desktop.

I'd recommend bringing this discussion to one of the support channels, as it doesn't sound like a bug at this time.

tdonohue avatar Jul 26 '24 15:07 tdonohue