Domotica beginners problem

Forum about Domotica Home Automation for dummies, is only for the real beginner questions.

Moderator: TANE

Domotica beginners problem

Postby p.bierhuizen » Mon Apr 11, 2016 3:35 pm

Everytime my Raspberry is started up, it comes with following errormessages in the logfile :

[MySQL] Database on host 'localhost'.
[Main] Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] ERROR: Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] ERROR: Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] Connecting to database ...

Can someone here tell me what is happening and how I can avoid these error messages ?
Thanks in advance,
Paul Bierhuizen
DomotiGa on Raspberripi 2B
p.bierhuizen
Starting Member
Starting Member
 
Posts: 3
Joined: March 2016
Location: BREDA

Re: Domotica beginners problem

Postby raymonvdm » Tue Apr 12, 2016 8:16 am

Maybe Domotiga is starting before MySQL is running? Does the following command tells you that it is running?

Code: Select all
/etc/init.d/mysql status


Maybe you can add a sleep to the startup script or domotiga. Or the init file may need a sleept (/etc/init.d/domotiga?)
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
raymonvdm
Senior Member
Senior Member
 
Posts: 1124
Joined: December 2011

Re: Domotica beginners problem

Postby p.bierhuizen » Tue Apr 12, 2016 9:43 am

The mysql server is definitely running. I can access the db from another computer.
But adding a sleep in the startup script is a very good idea ! I am going to try that one.
Thanks for your help.
DomotiGa on Raspberripi 2B
p.bierhuizen
Starting Member
Starting Member
 
Posts: 3
Joined: March 2016
Location: BREDA

Re: Domotica beginners problem

Postby p.bierhuizen » Tue Apr 12, 2016 2:00 pm

Hello Raymon,
The mysql server is running. I can connect to it from another PC.
But the sleep was a very good idea. I have now added 'mysql' behind the Required-Start and Stop in domotigaserver3,
which will make sure that starting the domotigaserver will only take place after starting the mysql server.
I just tested it and it works fine now.
Thanks for your help,
Paul Bierhuizen
DomotiGa on Raspberripi 2B
p.bierhuizen
Starting Member
Starting Member
 
Posts: 3
Joined: March 2016
Location: BREDA


Return to Domotica for Dummies Forum

Who is online

Users browsing this forum: No registered users and 1 guest