Errors and solutions

The first actions you should do !

Dammit, my Domogik system is not working, how can I solve my issue ?

—From you, who are reading this page

First don’t forget to :

  • check the log files for errors
  • check the process status
  • check if services are available
  • check if xPL is working fine

Check the log files

Log files are available in :

  • /var/log/domogik/ for Domogik
  • /var/log/xplhub/ for the python xPL hub

You an find all the errors with this command:

$ grep ERROR /var/log/domogik/*

Example:

/var/log/domogik/manager.log:2013-12-06 14:35:24,371 domogik-manager ERROR Package plugin-onewire : invalid json file
/var/log/domogik/manager.log:2013-12-06 14:35:24,371 domogik-manager ERROR Package plugin-onewire : Error validating the json: key 'xpl' not found in a param for device_type onewire.serial_number

Check the process status

Assuming the Domogik user is domogik, do the following checks:

  • check all main components are up:

    $ ps -fu domogik | grep dmg_
    

    You must have one process for the MQ broker and one for the MQ forwarder:

    domogik    32562     1  1 14:12 ?        00:00:23 /usr/bin/python /usr/local/bin/dmg_broker
    domogik    32583     1  0 14:12 ?        00:00:00 /usr/bin/python /usr/local/bin/dmg_forwarder
    

    You must have one process for the python hub:

    domogik    32605     1  0 14:12 ?        00:00:06 /usr/bin/python /usr/local/bin/dmg_hub
    

    You must have 2 processes for the administration web interface:

    domogik      329     1  0 14:12 ?        00:00:00 /usr/bin/python /usr/local/bin/dmg_admin
    domogik      336   329  0 14:12 ?        00:00:06 /usr/bin/python /usr/local/bin/dmg_admin
    

    You must have 2 processes for the manager:

    domogik    32635     1  0 14:12 ?        00:00:00 /usr/bin/python /usr/local/bin/dmg_manager -d -r -x -s
    domogik    32642 32635  0 14:12 ?        00:00:09 /usr/bin/python /usr/local/bin/dmg_manager -d -r -x -s
    

    Check if dbmgr is up:

    $ ps -fu domogik | grep dbmgr
    domogik    32669     1  0 14:12 ?        00:00:00 /usr/bin/python /media/stock/domotique/git/domogik/src/domogik/bin/dbmgr.py
    domogik    32678 32669  0 14:12 ?        00:00:13 /usr/bin/python /media/stock/domotique/git/domogik/src/domogik/bin/dbmgr.py
    

    Check if xplgw is up:

    $ ps -fu domogik | grep xplgw
    domogik    32726     1  0 14:12 ?        00:00:00 /usr/bin/python /media/stock/domotique/git/domogik/src/domogik/bin/xplgw.py
    domogik    32735 32726  0 14:12 ?        00:00:13 /usr/bin/python /media/stock/domotique/git/domogik/src/domogik/bin/xplgw.py
    

    If one component is not up, check its log files. If the component is rest, dbmgr or xplgw and you find no logs, check in the manager logs.

Check if services are available

You can use the following command on your server to check all ports where a service is listening. Notice that Domogik uses by default ports in 404xx range.

$ netstat -tnpl | grep 404

If the administration web interface is up, you will see (depending on your network configuration):

tcp        0      0 192.168.1.10:40406      0.0.0.0:*               LISTEN      336/python
tcp        0      0 127.0.0.1:40406         0.0.0.0:*               LISTEN      336/python

If message queue broket and forwarder are up, you will see:

tcp        0      0 192.168.1.10:40410      0.0.0.0:*               LISTEN      32562/python
tcp        0      0 192.168.1.10:40411      0.0.0.0:*               LISTEN      32583/python
tcp        0      0 192.168.1.10:40412      0.0.0.0:*               LISTEN      32583/python

You can find more informations about the used ports in the technical documentation.

Check if xPL is working fine

If you think xPL is not working, do:

$ grep "HUB discovery" /var/log/domogik/xplgw.log

You should have the following lines:

2013-12-06 14:12:23,435 domogik-xplgw INFO HUB discovery > starting
2013-12-06 14:12:23,436 domogik-xplgw INFO HUB discovery > looking for the hub. I hope there is one hub, Domogik won't work without the hub!
2013-12-06 14:12:23,438 domogik-xplgw INFO HUB discovery > Received HBEAT echo, HUB detected
2013-12-06 14:12:23,438 domogik-xplgw INFO HUB discovery > hub found, configuration in progress

If the following lines appears always, it means that the xPL hub is not found. So you should check your configuration or network access (firewall, ...):

2013-12-06 14:12:23,435 domogik-xplgw INFO HUB discovery > starting
2013-12-06 14:13:33,436 domogik-xplgw INFO HUB discovery > looking for the hub. I hope there is one hub, Domogik won't work without the hub!
2013-12-06 14:13:35,436 domogik-xplgw INFO HUB discovery > looking for the hub. I hope there is one hub, Domogik won't work without the hub!
2013-12-06 14:13:37,436 domogik-xplgw INFO HUB discovery > looking for the hub. I hope there is one hub, Domogik won't work without the hub!
2013-12-06 14:13:39,436 domogik-xplgw INFO HUB discovery > looking for the hub. I hope there is one hub, Domogik won't work without the hub!

The python xPL hub configuration is set in /etc/domogik/xplhub.cfg. The logs are in /var/log/xplhub/

Domogik 0.1/0.2/0.3 errors (that may still happen in 0.4)

libmysqlclient issue on Ubuntu 12.04

Error

ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory

Solution

Ubuntu install the libmysqlclient in release 18. Just create a symlink:

ln -v /usr/lib/i386-linux-gnu/libmysqlclient_r.so.18 /usr/lib/i386-linux-gnu/libmysqlclient_r.so.16

xPL Hub doesn’t start (C version)

Error

When manually launching the xPL Hub, you get:

$ ./xPL_Hub
bash: ./xPL_Hub: Aucun fichier ou dossier de ce type

Cause

You may be on a 64bits system with no 32bits glibc library

Solution

Install the 32bits glibc. Example for Archlinux:

pacman -S lib32-glibc

REST is slow

Error

For example, the config page of plugins takes more than 5 seconds to be displayed

Cause

Definitely due to DNS issue. Check rest.log times, especially the time between : * domogik-rest DEBUG Send HTTP header for OK, and * domogik-rest DEBUG Send HTTP data : {...} If the difference is something like 5s, your DNS setup may be bad.

Solution

If you have ‘’avahi’’ running (at least on a Ubuntu Desktop install), it could be stopped unless you know that you need it. That should solve your problem. If you don’t have such software, check your DNS setup, one quick way to check (without using domogik) is to run the command

time getent hosts the.ip.of.client

If it takes long time without any answer, your setup is wrong.

Solution with a karotz on the LAN

You must assign a host name to your Karotz on your local network.