Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Docker unable to link mysql #17

Open
D4rkC0d3 opened this issue Jul 17, 2018 · 12 comments
Open

Docker unable to link mysql #17

D4rkC0d3 opened this issue Jul 17, 2018 · 12 comments

Comments

@D4rkC0d3
Copy link

tried
docker run --name Ma -d -e MYSQL_ROOT_PASSWORD="cic00" -e MYSQL_DATABASE="koha_koha" -e MYSQL_USER="koha" -e MYSQL_PASSWORD="Koha00" -p 3306:3306 mariadb

everything fine until i try to run koha
docker run -d --name Ko --cap-add=DAC_READ_SEARCH --cap-add=SYS_NICE --cap-add=MKNOD -p 6001:6001 -p 8080:8080 -p 8081:8081 -e KOHA_INSTANCE=koha -e KOHA_ADMINUSER=koha -e KOHA_ADMINPASS=cic48 -e SIP_WORKERS=3 --link Ma:koha_mysql -t digibib/koha:de6db3c5bee38241c55bf5cde588583858c77e16 0796a3450e4e0b2ac5f3e8d2b5432dc68b9c5d9b524ca01dff7c90989d8007a7

the log i got
Global config ... Setting up local cronjobs ... Setting up supervisord ... Mysql server setup ... Using linked mysql container Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] [-W timeout] [hop1 ...] destination ERROR: Could not connect to remote mysql

also tried with mysql:5.6.20

@bensinober
Copy link
Member

Hi, you miss a var in the koha container, KOHA_DBHOST . Also the passords need to match.

Probably you'll miss a few other vars. I suggest you look in the docker-compose setup. And better use docker network than linked containers. Good luck!

@D4rkC0d3
Copy link
Author

Thanks for the info, tried:
docker run -d --name Ko --cap-add=DAC_READ_SEARCH --cap-add=SYS_NICE --cap-add=MKNOD -p 6001:6001 -p 8080:8080 -p 8081:8081 -e KOHA_INSTANCE=koha -e KOHA_ADMINUSER=koha -e KOHA_ADMINPASS=cic48 -e KOHA_DBHOST=koha_mysql -e MYSQL_DATABASE=koha_koha -e MYSQL_PASSWORD="Koha00" -e MYSQL_USER=koha -e SIP_WORKERS=3 --link Ma:koha_mysql -t digibib/koha:de6db3c5bee38241c55bf5cde588583858c77e16

and it solved the issue, the problem now is that i get

Restarting apache to activate local changes...
[FAIL] Restarting web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
AH00526: Syntax error on line 4 of /etc/apache2/sites-enabled/koha.conf:
Timeout takes one argument, Timeout duration (sec)
Action 'configtest' failed.
The Apache error log may have more information.

When i try to start the container i get

Using linked mysql container koha_mysql
PING koha_mysql (172.17.0.2) 56(84) bytes of data.
64 bytes from koha_mysql (172.17.0.2): icmp_seq=1 ttl=64 time=0.082 ms

--- koha_mysql ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.082/0.082/0.082/0.000 ms
Initializing local instance ...

Koha requires mpm_itk to be enabled within Apache in order to run.
Typically this can be enabled with:

    sudo a2enmod mpm_itk


Koha requires mpm_itk to be enabled within Apache in order to run.
Typically this can be enabled with:

    sudo a2enmod mpm_itk

i looked up the environment variables in https://github.com/digibib/koha-docker/wiki/Environment-and-Configuration

but couldn't find anyone for MySQL besides KOHA_DBHOST, ENABLE_MYSQL_TRIGGERS and ENABLE_MYSQL_SCHEMA

sorry for all the trouble.

@bensinober
Copy link
Member

@D4rkC0d3
Copy link
Author

Tried with "APACHE_TIMEOUT" with no luck, how can i pass the next error?

Koha requires mpm_itk to be enabled within Apache in order to run.
Typically this can be enabled with:

    sudo a2enmod mpm_itk

i believe this is the last one i would be bothering you with.

Thanks for your support.

@bensinober
Copy link
Member

bensinober commented Jul 20, 2018 via email

@D4rkC0d3
Copy link
Author

passed the apache problem, i used :

docker run -d --name Ko --cap-add=DAC_READ_SEARCH --cap-add=SYS_NICE --cap-add=MKNOD -p 6001:6001 -p 8080:8080 -p 8081:8081 -e KOHA_HOME="/usr/share/koha/" -e KOHA_ADMINPASS=Ko4838.003 -e KOHA_ADMINUSER=koha -e KOHA_INSTANCE=koha -e KOHA_DBHOST=koha_mysql -e EMAIL_ENABLES="False" -e NLENABLE=0 -e APACHE_MINSERVERS=2 -e APACHE_TIMEOUT=200 -e APACHE_SERVER_STATUS_NET="127.0.0.1/24" -e APACHE_REMOTE_INTERNAL_PROXY="127.0.0.0/16" -e PLACK_MAX_REQUESTS=100 -e PLACK_WORKERS=2 --link Ma:koha_mysql -t digibib/koha:de6db3c5bee38241c55bf5cde588583858c77e16

but now if i try to see the koha version via web i get Internal Server Error, and in the logs i got:
Global symbol "$items" requires explicit package name at /usr/share/koha/intranet/cgi-bin/about.pl line 335.

Could you please share some of your knowledge on this?

Cheers.

@bensinober
Copy link
Member

bensinober commented Jul 20, 2018 via email

@D4rkC0d3
Copy link
Author

is there a tag revision that you would recommend to me? it's for a production environment.

Cheers

@bensinober
Copy link
Member

bensinober commented Jul 31, 2018 via email

@bensinober
Copy link
Member

bensinober commented Jul 31, 2018 via email

@D4rkC0d3
Copy link
Author

D4rkC0d3 commented Aug 2, 2018

is there a 18.05 tag that you would recommend?

Thanks.

@bensinober
Copy link
Member

bensinober commented Aug 3, 2018 via email

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

No branches or pull requests

2 participants