sipcapture / homer5-docker

HOMER 5 Docker Containers (OBSOLETE)
http://sipcapture.org
40 stars 61 forks source link

running-with-an-external-mysql #67

Open gudge25 opened 6 years ago

gudge25 commented 6 years ago

https://github.com/sipcapture/homer-docker#running-with-an-external-mysql

NOT WORKING PARAMETER --dbhost -h no matter what is setup in host logs are :laughing:

23T13:55:22.235226765Z  1(42) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on '127.0.0.1' (111)

23T13:55:22.235267351Z 3(44) ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to database [mysql://homer_user:homer_password@127.0.0.1/homer_data] from capture_mode param.

lmangani commented 6 years ago

What is the actual syntax you are using? --dbhost 1.2.3.4 ? Unless you see a message DB_HOST set to: 1.2.3.4 the parameter is not being passed to the container

gudge25 commented 6 years ago

ok my example docker run -tid --name homer5 -p 80:80 -p 9060:9060/udp sipcapture/homer-docker --dbhost 176.111.58.100 --dbuser homer_user -dbpass homer_password

LOGS:

`24T11:10:29.225919433Z DB_HOST set to: 176.111.58.100

24T11:10:29.225968885Z DB_USER set to: homer_user

24T11:10:29.260276307Z loading modules under config path: //usr/lib/x86_64-linux-gnu/kamailio/modules/

24T11:10:29.275366465Z 0(24) WARNING: [core/socket_info.c:1314]: fix_hostname(): could not rev. resolve 0.0.0.0

24T11:10:29.275382591Z Listening on

24T11:10:29.275386110Z udp: 0.0.0.0:9060

24T11:10:29.275389120Z Aliases:

24T11:10:29.275391699Z

24T11:10:29.275393990Z config file ok, exiting...

24T11:10:29.296708595Z Module php5 already enabled

24T11:10:29.317891714Z Enabling module rewrite.

24T11:10:29.320430388Z To activate the new configuration, you need to run:

24T11:10:29.320439596Z service apache2 restart

24T11:10:29.350297173Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message

24T11:10:29.363307407Z loading modules under config path: //usr/lib/x86_64-linux-gnu/kamailio/modules/

24T11:10:29.382317655Z  0(42) WARNING: [core/socket_info.c:1314]: fix_hostname(): could not rev. resolve 0.0.0.0

24T11:10:29.382348778Z Listening on

24T11:10:29.382355661Z udp: 0.0.0.0:9060

24T11:10:29.382361022Z Aliases:

24T11:10:29.382364960Z

24T11:10:29.383488474Z  2(45) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on '127.0.0.1' (111)

24T11:10:29.383513983Z  2(45) ERROR: [db.c:318]: db_do_init2(): could not add connection to the pool 2(45) ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to database [mysql://homer_user:homer_password@127.0.0.1/homer_data] from capture_mode param.

24T11:10:29.383529052Z  2(45) ERROR: [core/sr_module.c:923]: init_mod_child(): Error while initializing module sipcapture (//usr/lib/x86_64-linux-gnu/kamailio/modules/sipcapture.so)

24T11:10:29.383535004Z  2(45) ERROR: [core/pt.c:334]: fork_process(): init_child failed for process 2, pid 45, "udp receiver child=1 sock=0.0.0.0:9060"

24T11:10:29.383540292Z  2(45) CRITICAL: [main.c:1611]: main_loop(): Cannot fork

24T11:10:29.383544698Z  0(42) ALERT: [main.c:740]: handle_sigs(): child process 45 exited normally, status=255

24T11:10:29.384687158Z  5(50) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on '127.0.0.1' (111)

24T11:10:29.384726563Z  5(50) ERROR: [db.c:318]: db_do_init2(): could not add connection to the pool 5(50) ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to database [mysql://homer_user:homer_password@127.0.0.1/homer_data] from capture_mode param.

24T11:10:29.384732342Z  5(50) ERROR: [core/sr_module.c:923]: init_mod_child(): Error while initializing module sipcapture (//usr/lib/x86_64-linux-gnu/kamailio/modules/sipcapture.so)

24T11:10:29.384736525Z  5(50) ERROR: [core/pt.c:334]: fork_process(): init_child failed for process 5, pid 50, "udp receiver child=4 sock=0.0.0.0:9060"

24T11:10:29.384740580Z  5(50) CRITICAL: [main.c:1611]: main_loop(): Cannot fork

24T11:10:29.384744441Z  3(46) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on '127.0.0.1' (111)

24T11:10:29.384748213Z  3(46) ERROR: [db.c:318]: db_do_init2(): could not add connection to the pool 3(46) ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to database [mysql://homer_user:homer_password@127.0.0.1/homer_data] from capture_mode param.

24T11:10:29.384752386Z  3(46) ERROR: [core/sr_module.c:923]: init_mod_child(): Error while initializing module sipcapture (//usr/lib/x86_64-linux-gnu/kamailio/modules/sipcapture.so)

24T11:10:29.384756362Z  3(46) ERROR: [core/pt.c:334]: fork_process(): init_child failed for process 3, pid 46, "udp receiver child=2 sock=0.0.0.0:9060"

24T11:10:29.384760211Z  3(46) CRITICAL: [main.c:1611]: main_loop(): Cannot fork

24T11:10:29.423947008Z `