Projects tigase _server tigase-server Issues #22
Docker image has broken permissions: wait-for-it.sh: Permission denied (#22)
Closed
wojciech.kapcia@tigase.net opened 4 months ago

Running docker image after switching to jib yields following error:

wojtek@atlantiscity.local ~/dev/tmps/tig-docker-tmp $ docker compose up
[+] Running 2/0
 ✔ Container tig-docker-tmp-db-1    Created                                                                                                                                                                      0.0s
 ✔ Container tig-docker-tmp-xmpp-1  Created                                                                                                                                                                      0.0s
Attaching to db-1, xmpp-1
db-1    | 2024-05-13 15:09:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.1.0-1.el8 started.
db-1    | 2024-05-13 15:09:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1    | 2024-05-13 15:09:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.1.0-1.el8 started.
xmpp-1  | Checking if database is already available: db:3306
xmpp-1  | /start.sh: line 13: /home/tigase/tigase-server/scripts/wait-for-it.sh: Permission denied
xmpp-1  | Upgrading database schema...
db-1    | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
db-1    | 2024-05-13T15:09:08.279478Z 0 [System] [MY-015015] [Server] MySQL Server - start.
db-1    | 2024-05-13T15:09:08.419652Z 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.
db-1    | 2024-05-13T15:09:08.421087Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.1.0) starting as process 1
db-1    | 2024-05-13T15:09:08.422960Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive

Which may break tigase-server startup as checking for database readiness doesn't work.

wojciech.kapcia@tigase.net added "Related" tigase/_server/tigase-xmpp-server-docker#22 4 months ago
wojciech.kapcia@tigase.net changed state to 'In Progress' 4 months ago
Previous Value Current Value
Open
In Progress
wojciech.kapcia@tigase.net added "Related" #16 4 months ago
Referenced from commit 4 months ago
wojciech.kapcia@tigase.net changed state to 'In QA' 4 months ago
Previous Value Current Value
In Progress
In QA
wojciech.kapcia@tigase.net commented 4 months ago

Issue was caused by missing executable permission on /home/tigase/tigase-server/scripts/wait-for-it.sh file. I tried setting it recursively for all shell scripts as outlined in jib documentation like:

<permission>
    <file>/home/tigase/tigase-server/scripts/**/*.sh</file>
    <mode>755</mode>
</permission>

but it didn't take thus I opted for setting it for individual, single file only.

wojciech.kapcia@tigase.net batch edited 4 months ago
Name Previous Value Current Value
Iterations
empty
tigase-server-8.4.0
Referenced from commit 4 months ago
wojciech.kapcia@tigase.net changed state to 'Closed' 3 months ago
Previous Value Current Value
In QA
Closed
Referenced from commit 3 months ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.4.0
Target Release
1.0
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (2)
Reference
tigase/_server/tigase-server#22
Please wait...
Page is in error, reload to recover