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

Docker container not running - stuck in init? #168

Open
tobidemski opened this issue Jan 23, 2022 · 5 comments
Open

Docker container not running - stuck in init? #168

tobidemski opened this issue Jan 23, 2022 · 5 comments

Comments

@tobidemski
Copy link

tobidemski commented Jan 23, 2022

Hey guys,

im trying to get running roundcube in docker.
But im facing issues while the container tries to start.
Docker Host: Synology DS916+
Tried already with Tags: latest, latest-fpm-alpine, 1.5.2-fpm-alpine

Docker compose file: (Also i tried the "simple" in example to get it work)

`version: '2'

services:
roundcubedb:
image: mysql:5.7
container_name: roundcubedb
restart: unless-stopped
volumes:
- "/volume1/docker/roundcube/mysql:/var/lib/mysql"
environment:
- MYSQL_ROOT_PASSWORD=QWkw5W3iJwvHBkvKF
- MYSQL_DATABASE=roundcubemail

roundcubemail:
image: roundcube/roundcubemail:1.5.2-fpm-alpine
container_name: roundcubemail
restart: unless-stopped
depends_on:
- roundcubedb
links:
- roundcubedb
volumes:
- "/volume1/docker/roundcube/web:/var/www/html"
ports:
- 37080:80
environment:
- ROUNDCUBEMAIL_DB_TYPE=mysql
- ROUNDCUBEMAIL_DB_HOST=roundcubedb
- ROUNDCUBEMAIL_DB_PASSWORD=QWkw5W3iJwvHBkvKF
- ROUNDCUBEMAIL_SKIN=elastic
- ROUNDCUBEMAIL_DEFAULT_HOST=mail.domain.com
- ROUNDCUBEMAIL_SMTP_SERVER=mail.domain.com`

Error message from the roundcube container:

For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Write Docker config to /var/www/html/config/config.docker.inc.php
Installing dependencies from lock file
Nothing to install, update or remove
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
5 packages you are using are looking for funding.
Use the composer fund command to find out more!
wait-for-it.sh: waiting 30 seconds for roundcubedb:3306
wait-for-it.sh: roundcubedb:3306 is available after 0 seconds
ERROR: [1050] Table 'session' already exists (SQL Query: CREATE TABLE session (
sess_id varchar(128) NOT NULL,
changed datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
ip varchar(40) NOT NULL,
vars mediumtext NOT NULL,
PRIMARY KEY(sess_id),
INDEX changed_index (changed)
) ROW_FORMAT=DYNAMIC ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci)
ERROR: [1050] Table 'session' already exists
Creating database schema... [FAILED]
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
[Sun Jan 23 23:51:56.214382 2022] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator
roundcubemail found in /var/www/html - installing update...
Target installation already in version 1.5.2. Do you want to update again? (y/N)
Copying files to target location...done.

Running update script at target...
Executing database schema update.
NOTICE: Update dependencies by running php composer.phar update --no-dev
This instance of Roundcube is up-to-date.

!

.
For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file
Nothing to install, update or remove
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
5 packages you are using are looking for funding.
Use the composer fund command to find out more!
wait-for-it.sh: waiting 30 seconds for roundcubedb:3306
wait-for-it.sh: roundcubedb:3306 is available after 0 seconds
Write Docker config to /var/www/html/config/config.docker.inc.php
Creating database schema... [FAILED]
ERROR: [1050] Table 'session' already exists (SQL Query: CREATE TABLE session (
sess_id varchar(128) NOT NULL,
changed datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
ip varchar(40) NOT NULL,
vars mediumtext NOT NULL,
PRIMARY KEY(sess_id),
INDEX changed_index (changed)
) ROW_FORMAT=DYNAMIC ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci)
ERROR: [1050] Table 'session' already exists
Generating locales (this might take a while)...

This errors messages appears all day long. Not sure what im missing here. Thought it should be easy to set this up :/

Maybe someone knows the issue and can help me out?

@tobidemski tobidemski changed the title Docker container not running correctly Docker container not running - stuck in init? Jan 23, 2022
@thomascube
Copy link
Member

Looks like a similar issue as #168 with the error "Table 'session' already exists".

@D4rkiii please note that the ´fpm-alpine´ variant you're using will not serve HTTP requests as your might expect and thus you cannot connect with your browser directly. You'd need a webserver like apache or nginx to use the PHP PFM service provided by this container as a CGI processor. See the docker-compose-fpm-alpine.yaml file or use the apache variant

@tobidemski
Copy link
Author

Hey @thomascube ,

thanks for the hint / help about the fpm variants! Im not familiar with this (living in the .net world) so i just tried to use it and i thought, because im running already an nginx proxy manager i could just remove the nginx part in the docker-compose and run it.

So i should use the "1.5.2-apache"variant and point my proxy to this instance. I will try this image and give a feedback about the container state after the initial setup.

@tobidemski
Copy link
Author

tobidemski commented Jan 25, 2022

Still not working with the following docker-compose:

docker-compose content:
`version: '2'

services:
roundcubedb:
image: mysql:5.7.37
container_name: roundcubedb
restart: unless-stopped
volumes:
- "/volume1/docker/roundcube/mysql:/var/lib/mysql"
environment:
- MYSQL_ROOT_PASSWORD=mysecretpw
- MYSQL_DATABASE=roundcubemail
roundcubemail:
image: roundcube/roundcubemail:1.5.2-apache
container_name: roundcubemail
restart: unless-stopped
depends_on:
- roundcubedb
links:
- roundcubedb
volumes:
- "/volume1/docker/roundcube/web:/var/www/html"
ports:
- 37080:80
environment:
- ROUNDCUBEMAIL_DB_TYPE=mysql
- ROUNDCUBEMAIL_DB_HOST=roundcubedb
- ROUNDCUBEMAIL_DB_USER=root
- ROUNDCUBEMAIL_DB_PORT=3306
- ROUNDCUBEMAIL_DB_PASSWORD=mysecretpw
- ROUNDCUBEMAIL_SKIN=elastic
- ROUNDCUBEMAIL_DEFAULT_HOST=mail.domain.com
- ROUNDCUBEMAIL_SMTP_SERVER=mail.domain.com
- ROUNDCUBEMAIL_PLUGINS=archive,zipdownload
- ROUNDCUBEMAIL_DB_NAME=roundcubemail
`

Logs from the mail container:

roundcubemail found in /var/www/html - installing update...
Target installation already in version 1.5.2. Do you want to update again? (y/N)
Copying files to target location...done.
Running update script at target...
Executing database schema update.
Updating database schema (2013011000)... [OK]
Updating database schema (2013042700)... [OK]
Updating database schema (2013052500)... [OK]
ERROR: Error in DDL upgrade 2013061000: [1146] Table 'roundcubemail.cache' doesn't exist
Updating database schema (2013061000)... [FAILED]

.
For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file
Nothing to install, update or remove
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
5 packages you are using are looking for funding.
Use the composer fund command to find out more!
wait-for-it.sh: waiting 30 seconds for roundcubedb:3306
wait-for-it.sh: roundcubedb:3306 is available after 0 seconds
Write Docker config to /var/www/html/config/config.docker.inc.php
Creating database schema... [FAILED]
ERROR: [1050] Table 'cache_shared' already exists (SQL Query: CREATE TABLE cache_shared (
cache_key varchar(255) BINARY NOT NULL,
expires datetime DEFAULT NULL,
data longtext NOT NULL,
PRIMARY KEY (cache_key),
INDEX expires_index (expires)
) ROW_FORMAT=DYNAMIC ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci)
ERROR: [1050] Table 'cache_shared' already exists
Updating database schema (2013061000)... [FAILED]
ERROR: Error in DDL upgrade 2013061000: [1060] Duplicate column name 'expires'
Failed to initialize database. Please run /var/www/html/bin/initdb.sh and /var/www/html/bin/updatedb.sh manually.
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
[Tue Jan 25 20:37:43.543518 2022] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator
roundcubemail found in /var/www/html - installing update...
Target installation already in version 1.5.2. Do you want to update again? (y/N)
Copying files to target location...done.
Running update script at target...
Executing database schema update.
Updating database schema (2013061000)... [FAILED]
ERROR: Error in DDL upgrade 2013061000: [1060] Duplicate column name 'expires'

.
For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file
Nothing to install, update or remove
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
5 packages you are using are looking for funding.
Use the composer fund command to find out more!
wait-for-it.sh: waiting 30 seconds for roundcubedb:3306
wait-for-it.sh: roundcubedb:3306 is available after 0 seconds
Write Docker config to /var/www/html/config/config.docker.inc.php
ERROR: [1050] Table 'session' already exists (SQL Query: CREATE TABLE session (
sess_id varchar(128) NOT NULL,
changed datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
ip varchar(40) NOT NULL,
vars mediumtext NOT NULL,
PRIMARY KEY(sess_id),
INDEX changed_index (changed)
) ROW_FORMAT=DYNAMIC ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci)
ERROR: [1050] Table 'session' already exists
Creating database schema... [FAILED]
Updating database schema (2013061000)... [FAILED]
ERROR: Error in DDL upgrade 2013061000: [1060] Duplicate column name 'expires'
Failed to initialize database. Please run /var/www/html/bin/initdb.sh and /var/www/html/bin/updatedb.sh manually.
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
[Tue Jan 25 20:38:02.702288 2022] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator
roundcubemail found in /var/www/html - installing update...
Target installation already in version 1.5.2. Do you want to update again? (y/N)
Copying files to target location...done.
Running update script at target...
Executing database schema update.
Updating database schema (2013061000)... [FAILED]
ERROR: Error in DDL upgrade 2013061000: [1060] Duplicate column name 'expires'

@tobidemski
Copy link
Author

Is there any way to install a fresh clean 1.5.X roundcube instance in docker?
Or what is the way to get it work? Install first 1.4.X then upgrade? Would be nice to know a way :)

@Qhilm
Copy link

Qhilm commented Sep 14, 2023

I also get this error:

ERROR: Error in DDL upgrade 2013061000: [1146] Table 'roundcubemail.cache' doesn't exist

with the following docker compose:

version: '3.8'
services:
  roundcubedb:
    container_name: roundcubedb
    image: mysql:latest

    user: "1034:100" # 100 = group "users", 1034 = user "roundcube"
    cap_add:
      - SYS_NICE
    restart: no


    environment:
      - MYSQL_DATABASE=roundcubemail
      - MYSQL_ROOT_PASSWORD=redacted
    ports:
      - 3865:3306
    volumes:
      - /volume1/Data/user1/RoundCube/mysql/:/var/lib/mysql
      
  roundcubemail:
    container_name: roundcubemail
    image: roundcube/roundcubemail:latest
    restart: no
    depends_on:
      - roundcubedb
    links:
      - roundcubedb
    volumes:
      - /volume1/Data/user1/RoundCube/www:/var/www/html
      - /volume1/Data/user1/RoundCube/mysql:/var/roundcube/db
    ports:
      - 9001:80
    environment:
      - ROUNDCUBEMAIL_DB_TYPE=mysql
      - ROUNDCUBEMAIL_DB_HOST=roundcubedb
      - ROUNDCUBEMAIL_DB_PASSWORD=redacted
      - ROUNDCUBEMAIL_SKIN=elastic
      - ROUNDCUBEMAIL_DEFAULT_HOST=syno.homedomain.com
      #- ROUNDCUBEMAIL_DEFAULT_PORT=1143
      - ROUNDCUBEMAIL_SMTP_SERVER=syno.homedomain.com
      - ROUNDCUBEMAIL_SMTP_PORT=1025
      - APP_UID=1034
      - APP_GID=100
volumes:
  db:
    driver: local

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

3 participants