Debug logging?
Moderators: leecollings, remb0
-
- Posts: 10
- Joined: Saturday 10 January 2015 19:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Debug logging?
Hi,
I'm trying to debug a script I'm running to update Domoticz.
I have -loglevel 0 -log /path/to/log (also tried -verbose 1)
but my logs still just say - "2015-11-12 08:34:06.979 Incoming connection from: 192.168.1.xxx"
even though some calls are working, and some are getting 400 Bad Request.
Is there any further detail I can get from Domoticz?
Thanks,
Tom
I'm trying to debug a script I'm running to update Domoticz.
I have -loglevel 0 -log /path/to/log (also tried -verbose 1)
but my logs still just say - "2015-11-12 08:34:06.979 Incoming connection from: 192.168.1.xxx"
even though some calls are working, and some are getting 400 Bad Request.
Is there any further detail I can get from Domoticz?
Thanks,
Tom
- bewo
- Posts: 74
- Joined: Monday 13 July 2015 12:27
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Bavaria - Germany
- Contact:
Re: Debug logging?
Works perfectly for me.dannybloe wrote:You can start the domoticz service with extra options to generate and fill a file log. Normally the log only exist in memory (that is what you see in the browser).
If you edit /etc/init.d/domoticz.sh you can do this:
And then restart the service. It will create the log file in /home/pi/log (I think you have to create the folder first). But beware, after a couple of days the file can be quite large. I usually enable logging when I added some new script or when I have to debug stuff.Code: Select all
DAEMON_ARGS="-daemon -www 8080 -log /home/pi/log/domoticz.log -loglevel 0"
The wiki somewhere shows all these parameters.
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
-
- Posts: 10
- Joined: Saturday 10 January 2015 19:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Debug logging?
Yep,
Tried, -verbose 1 too.
This is loglevel 0? I'm making 20 API calls, half of which are failing, and all it's telling me is "Incoming connection", am I missing something?
Code: Select all
DAEMON_ARGS="-daemon -www 88 -log /home/domoticz/domo.log -loglevel 0"
This is loglevel 0? I'm making 20 API calls, half of which are failing, and all it's telling me is "Incoming connection", am I missing something?
Code: Select all
2015-11-12 18:20:52.147 Domoticz V2.3552 (c)2012-2015 GizMoCuz
2015-11-12 18:20:52.147 Build Hash: 3b2547c, Date: 2015-11-06 16:55:05
2015-11-12 18:20:52.147 Startup Path: /home/domoticz/domoticz/
2015-11-12 18:20:52.177 Sunrise: 07:46:00 SunSet:16:31:00
2015-11-12 18:20:52.177 EventSystem: reset all events...
2015-11-12 18:20:52.179 Active notification subsystems: kodi (1/10)
2015-11-12 18:20:52.180 Webserver started on port: 88
2015-11-12 18:20:52.181 Started shared server on: 0.0.0.0
2015-11-12 18:20:54.181 Kodi: Started
2015-11-12 18:20:54.182 EventSystem: reset all events...
2015-11-12 18:20:54.182 EventSystem: reset all device statuses...
2015-11-12 18:20:54.183 EventSystem: Started
2015-11-12 18:20:54.282 Kodi: (Sitting Room Kodi) Starting thread.
2015-11-12 18:20:54.282 Kodi: (Kitchen Kodi) Starting thread.
2015-11-12 18:20:54.283 Kodi: (Master Bedroom Kodi) Starting thread.
2015-11-12 18:20:54.283 Kodi: (Living Room Kodi) Starting thread.
2015-11-12 18:20:54.283 Kodi: (Master Bedroom Kodi) Connected to '192.168.1.9:9090'.
2015-11-12 18:20:54.383 Kodi: Starting I/O service thread.
2015-11-12 18:20:55.182 RFXCOM: Using serial port: /dev/ttyUSB0
subtype = Interface Response
Sequence nbr = 2
response on cmnd = Get Status
Transceiver type = 433.92MHz
Firmware version = 235
Hardware version = 2.0
Undec off
X10 disabled
ARC disabled
AC disabled
HomeEasy EU disabled
Meiantech/Atlantic disabled
Oregon Scientific disabled
ATI disabled
Visonic disabled
Mertik disabled
AD enabled
Hideki disabled
La Crosse disabled
FS20/Legrand disabled
ProGuard disabled
BlindsT0 disabled
BlindsT1 disabled
AE disabled
RUBiCSON disabled
FineOffset disabled
Lighting4 disabled
Conrad RSL disabled
ByronSX disabled
IMAGINTRONIX disabled
KEELOQ enabled
Home Confort disabled
2015-11-12 18:20:57.377 Incoming connection from: 192.168.1.113
2015-11-12 18:21:05.454 (RFXtrx433) Lighting 5 (Unknown)
2015-11-12 18:21:07.666 (RFXtrx433) Lighting 5 (Unknown)
2015-11-12 18:21:21.618 Incoming connection from: 192.168.1.220
-
- Posts: 2
- Joined: Wednesday 14 December 2016 10:17
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Debug logging?
Excuse me for the bump, but this thread ranks high in Google for "domoticz debug log". This is how you enable debug/trace log:
(it is very verbose, so watch your log size)
Code: Select all
-loglevel 3 -debug -verbose -log /tmp/domoticz.log
-
- Posts: 26
- Joined: Thursday 13 October 2016 11:43
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Debug logging?
Thanks for the bump.
I am also trying to get a more detailed debugging without success.
This is what is written in my domoticz.sh
But it does not give me more details when i tail the new file.
Is there another way to see more debugging details?
I am also trying to get a more detailed debugging without success.
This is what is written in my domoticz.sh
Code: Select all
DAEMON=/home/$USERNAME/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8181"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
DAEMON_ARGS="-loglevel 0 -debug -verbose -log /home/ed/domoticz/domoticz.log"
Is there another way to see more debugging details?
-
- Posts: 1
- Joined: Wednesday 20 December 2017 12:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Debug logging?
Hi.
Domoticz v 3.8794 rPi
I receive this error when I activate the script and press save after making the simplest script in python (or even using the default template):
2017-12-20 12:52:34.508 EventSystem: reset all events...
2017-12-20 12:53:00.292 Error: Domoticz received fatal signal 11 !...
2017-12-20 12:53:00.295 Error: /home/pi/domoticz/domoticz() [0x236604]
2017-12-20 12:53:00.295 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x2366bc]
2017-12-20 12:53:00.295 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x76c816b0]
There is a gap of 26 sec. before it crashes in this case.
Most of the time it stops responding after 1-5 seconds.
I noticed the one time it didn't crash was when playing with dzvents. When saving the script (web-editor) it acctuallt wrote in the log that the script was saved. That script worked.
I've not seen in the log that there was any script saving activity when it crashes.
I need to stop the service and remove the database to get domoticz to start again.
BTW. I have 2 blocky scripts that are working (and active). Nothing else. Also tried deactivating them before saving and activating the 'new' scripts.
Domoticz v 3.8794 rPi
I receive this error when I activate the script and press save after making the simplest script in python (or even using the default template):
2017-12-20 12:52:34.508 EventSystem: reset all events...
2017-12-20 12:53:00.292 Error: Domoticz received fatal signal 11 !...
2017-12-20 12:53:00.295 Error: /home/pi/domoticz/domoticz() [0x236604]
2017-12-20 12:53:00.295 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x2366bc]
2017-12-20 12:53:00.295 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x76c816b0]
There is a gap of 26 sec. before it crashes in this case.
Most of the time it stops responding after 1-5 seconds.
I noticed the one time it didn't crash was when playing with dzvents. When saving the script (web-editor) it acctuallt wrote in the log that the script was saved. That script worked.
I've not seen in the log that there was any script saving activity when it crashes.
I need to stop the service and remove the database to get domoticz to start again.
BTW. I have 2 blocky scripts that are working (and active). Nothing else. Also tried deactivating them before saving and activating the 'new' scripts.
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Debug logging?
If you look closely, all but the first lines with DAEMON_ARGS= starts with $DAEMON_ARGS .... By adding $DAEMON_ARGS in the front of the added parameters you append what's after it to what's already there. Yours is missing the $DAEMON_ARGS, so you've removed all the parameters that were set before. Your added line in the bottom should read:EDsteve wrote: ↑Monday 10 July 2017 11:33 Thanks for the bump.
I am also trying to get a more detailed debugging without success.
This is what is written in my domoticz.sh
But it does not give me more details when i tail the new file.Code: Select all
DAEMON=/home/$USERNAME/domoticz/$NAME DAEMON_ARGS="-daemon" #DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE" DAEMON_ARGS="$DAEMON_ARGS -www 8181" DAEMON_ARGS="$DAEMON_ARGS -sslwww 443" #DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt" #DAEMON_ARGS="$DAEMON_ARGS -syslog" DAEMON_ARGS="-loglevel 0 -debug -verbose -log /home/ed/domoticz/domoticz.log"
Is there another way to see more debugging details?
Code: Select all
DAEMON_ARGS="$DAEMON_ARGS -loglevel 0 -debug -verbose -log /home/ed/domoticz/domoticz.log"
-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Debug logging?
Sorry to bump this old topic, but adding the necessary line to domoticz.sh I am nog seeing the logfile being created in the folder.
Something that is strange to me is that the path which is mentioned above is Home/ed/domoticz/ but I have not seen the mentioning of the folder ed before. Is this correct?
I do have a domoticz_crash.log file in the domoticz Main folder, but I do not understand anything what is being mentioned in that file .
Something that is strange to me is that the path which is mentioned above is Home/ed/domoticz/ but I have not seen the mentioning of the folder ed before. Is this correct?
I do have a domoticz_crash.log file in the domoticz Main folder, but I do not understand anything what is being mentioned in that file .
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Debug logging?
Don't copy anything you find in the internet without first understanding it first...
The path with "ed" in it was for one spefic user only. You should replace the path withe path to where you want the logfile created in your machine.
The path with "ed" in it was for one spefic user only. You should replace the path withe path to where you want the logfile created in your machine.
-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Debug logging?
You are so right, I did not do my homework properly. Although I knew I had made a "fresh" back-up so whatever the change could have done, it was easy to undo.
But thanks for the tip!
Who is online
Users browsing this forum: No registered users and 1 guest