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

Installation failure #10

Open
milossramek opened this issue Nov 27, 2024 · 6 comments
Open

Installation failure #10

milossramek opened this issue Nov 27, 2024 · 6 comments
Assignees

Comments

@milossramek
Copy link

Hello,
I've tried today to install omekas (on Debian Bookworm). The process went without problems, but omeka.local does not work (the others are OK):
When I open omeka.local, I get a page with message

Install Omeka S
Some installation requirements were not satisfied.
An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory

I've checked output from docker compose logs -f, but no file is mentioned there.

What can be the reason?

Thanks in advance
Milos

@mcoonen
Copy link
Contributor

mcoonen commented Nov 28, 2024

Hi Milos,

Thanks for trying our Dockerized Omeka S stack.

The error you mention could mean that the mySQL database is not ready. To troubleshoot, you could take the following steps:

  1. Can you confirm that the Docker container with service name db is running? Please post the output of docker ps -a here.
  2. If the container is running, use your browser to access phpMyAdmin at http://db.local and confirm that the database omekas exists and contains tables with data.
  3. Look for specific errors in the mySQL container by running docker compose logs db

Looking forward to your reply.
Best regards,
Maarten Coonen

@mcoonen mcoonen self-assigned this Nov 28, 2024
@milossramek
Copy link
Author

Hi Maarten,
first, thank you for providing the configured Omeka S stack!

My answers:
1: docker ps -a outputs:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
224e4f896480 phpmyadmin:5.2.0-apache "/docker-entrypoint.…" 6 minutes ago Up 2 minutes 80/tcp omekas_phpmyadmin
fa369df470d6 omekas-docker-omekas "/docker-entrypoint.…" 6 minutes ago Up 2 minutes 80/tcp, 9000/tcp omekas
aa9001674328 mysql:8.0 "docker-entrypoint.s…" 6 minutes ago Up 2 minutes 3306/tcp, 33060/tcp omekas_db
b8aa67277962 omekas-docker-solr "/opt/docker-entrypo…" 6 minutes ago Up 2 minutes 8983/tcp omekas_solr
9397d62c1865 jwilder/nginx-proxy "/app/docker-entrypo…" 6 minutes ago Up 2 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp proxy
3c161c55b08d omekas-docker-mirador "/docker-entrypoint.…" 13 hours ago Up 2 minutes 4444/tcp mirador
ba22af3a2607 camicroscope/iipimage:version-3.11.0 "/bin/sh -c 'apachec…" 13 hours ago Up 2 minutes 80/tcp iipsrv
95a4f3cd5a99 uclalibrary/cantaloupe:5.0.6-3 "docker-entrypoint.s…" 13 hours ago Up 2 minutes 0.0.0.0:8182->8182/tcp, :::8182->8182/tcp cantaloupe

2: Yes, the omeka database exists and has tables. Theit content seems to be the same as in the db/init-omekas-db.sql file
3: I restarted the machine and then I started the services by

docker compose up -d
docker compose -f docker-compose-iiif-external.yml up -d

Then, docker compose logs db outputs:

omekas_db | 2024-11-28 10:26:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.40-1.el9 started.
omekas_db | 2024-11-28 10:26:15+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
omekas_db | 2024-11-28 10:26:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.40-1.el9 started.
omekas_db | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
omekas_db | 2024-11-28T10:26:17.390154Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
omekas_db | 2024-11-28T10:26:17.390170Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 2147483648 adjusted to 1073741824.
omekas_db | 2024-11-28T10:26:17.392090Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.40) starting as process 1
omekas_db | 2024-11-28T10:26:17.410271Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
omekas_db | 2024-11-28T10:26:21.160702Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
omekas_db | 2024-11-28T10:26:23.172364Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
omekas_db | 2024-11-28T10:26:23.172505Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
omekas_db | 2024-11-28T10:26:23.209442Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
omekas_db | 2024-11-28T10:26:23.265878Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
omekas_db | 2024-11-28T10:26:23.266353Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.40' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.

thanks!
Milos

@mcoonen
Copy link
Contributor

mcoonen commented Nov 28, 2024

Thanks for sharing that info.

I've been looking into it and at first I noticed that your mySQL container is running MySQL Server 8.0.40-1.el9 whereas mine was using version 8.0.36-1.el8.
I've pulled the latest mySQL image from Docker Hub in order to reproduce your situation. However, it just builds and runs at my end, also with version 8.0.40-1.el9.

For some reason I suspect caching to be a problem.

Could you try to delete all running containers and volumes and create a fresh environment with:

docker compose down && docker volume rm omekas-docker_db omekas-docker_omeka omekas-docker_solrdata

git checkout master
git pull

docker compose build

docker compose up -d

Then, clear the cache in your browser and try to access http://omeka.local or http://omeka.local/admin again.
Alternatively, you could also try in an incognito tab or in a different browser to rule out any caching side-effects.

Let me know the outcome.

Best regards,
Maarten

@milossramek
Copy link
Author

milossramek commented Nov 28, 2024

Hi Maarten,
thank you for the instructions but, unfortunately, no success. I've tried all your suggestions. Only the error message has changed, now I get:

An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused.

I've tried to install everything from scratch on a different machine (Mint 22), but with the same result. Docker was, however, the same (version 27.3.1). Which is the version of your docker?

Isn't there somewhere a log file where one could get more information?
best regards
Milos

@mcoonen
Copy link
Contributor

mcoonen commented Nov 29, 2024

Hi Milos,

I'm glad to read that a fresh build of the Docker environment at least had some effect: a different error.

I sometimes see this "SQLSTATE[HY000] [2002] Connection refused." error as well, but in those cases I just need to wait a bit longer (30 seconds) for the database tables to be populated and the database ready to accept connections. Usually, when I wait a few more seconds and refresh the page the Connection refused error is gone and everything works as it should do.
I guess that you already tried refreshing the page, so there must be something else going on on your side.

Which is the version of your docker?

I'm running:

  • Ubuntu 24.04
  • Docker version 27.3.1, build ce12230
  • Docker Compose version v2.29.7

Isn't there somewhere a log file where one could get more information?

All relevant log files should normally be sent to the Docker logs by this tail command in docker-entrypoint.sh so you could read them using docker compose logs -f omekas
However, if you want to manually check the log files, you could do:

docker exec -it omekas bash
cat /var/www/html/logs/application.log

(or any other log file listed in the tail command linked above).

The Connection refused error you're currently getting indicates there is something wrong with the omekas->database connection. In order to troubleshoot this further I would like to know some more:

  1. Did you change anything in the database credentials in docker-compose.yml (the values at these lines https://github.com/MaastrichtU-Library/omekas-docker/blob/master/docker-compose.yml#L62-L65)
  2. Did you create the omeka-s/config/database.ini file and if so, can you double check that the values for user, password and dbname correspond to the values set in docker-compose.yml? The value for host should be simply db.
  3. Can you double check that the contents of the database.ini file inside the container are correct? You can check this with
docker exec -it omekas bash
cat /var/www/html/config/database.ini
  1. Can you verify that the omekas container is able to reach the database container on port 3306?
docker exec -it omekas bash
apt-get update
apt-get install telnet

telnet db 3306

This should give output like:

root@3199f74074fc:/var/www/html/config# telnet db 3306
Trying 172.18.0.3...
Connected to db.
Escape character is '^]'.

Best regards,
Maarten

@milossramek
Copy link
Author

Thank you, Maarten, it works now.
The problem was in the host setting (I've entered there localhost instead of db).
I've learned a lot about docker :)

Now I am going to study the setup.

Thank you once more

Best regards
Milos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants