Domoticz.log location [solved]

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Backbone
Posts: 43
Joined: Thursday 22 October 2015 21:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: The Netherlands
Contact:

Domoticz.log location [solved]

Post by Backbone »

Hello,
When I check my log from the settings menu I see a constant data stream filling the log.
But that is a very low fill in. once every 20 seconds or so. No important data. Just scripts starting, weather info data and so on.
When I start a Dzvents thermostat script I created the log is filled every milisecond or so with a line.
I am now assuming that the higher data stream could fill up the store location so quickly Domoticz will lock up.But could be wrong.
So I googled to see where the domoticz.log file could be stored and I had one hit.
/var/log/domoticz.log
However I can find that file on that location when I check with WINSCP.

Any assistance would be appricated.

Paco
Last edited by Backbone on Saturday 26 October 2024 9:45, edited 1 time in total.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz.log location

Post by waltervl »

It seems you use windows as OS?
Logging to a file is by default disabled because it can become a large file. With a reinstall you can enable the logging to a file.

If you use Linux you can use the instruction in the troubleshooting wiki to switch log to a file on. https://www.domoticz.com/wiki/Troubleshooting

But also every hardware gateway (menu setup - hardware) has settings to switch off log, status and/or error logging. So this would help if one of your hardware gateways is spamming the log a lot.

Also for dvents it depends on the script how much logging you get. Perhaps switch off log statements in the script (add -- before the log line in the script).
Also you can set the log level per script (info, status, error, debug).
Check the log template example to play with this. This is butt the way implemented in 2024.7
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pgas37
Posts: 99
Joined: Wednesday 06 December 2017 19:44
Target OS: -
Domoticz version:
Contact:

Re: Domoticz.log location

Post by pgas37 »

Hi,

i looked for the domoticz.log file, but i could not find it in the /var/log location.

What is the problem:
I have several computers and all except one are able to remotely log in into domoticz. One computer give the login-error "name and/or password" are not correct, but they are correct, other computers can log in. Offcourse I cleared the browser-cache.
So i searched for a log-file in which i can see who is logged in into domoticz and which user is refused and why.
Where to look for that logfile?

Thanks.
Paul
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Domoticz.log location

Post by jvdz »

Have you looked at the linked wiki page, where it is explained how to generate the log file?
https://www.domoticz.com/wiki/Troublesh ... _log_files

It could very well be that it is not defined thus not generated.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
pgas37
Posts: 99
Joined: Wednesday 06 December 2017 19:44
Target OS: -
Domoticz version:
Contact:

Re: Domoticz.log location

Post by pgas37 »

yes, i did

cd domoticz
sudo service domoticz stop
Test if domoticz can be started by hand:
./domoticz
but starting domoticz by hand genereated a lot of error-lines not knowing how to solve.







Code: Select all

pi@raspberrypi:~ $ cd domoticz
pi@raspberrypi:~/domoticz $ ./domoticz
2024-10-20 16:01:05.968  Status: Domoticz V2024.3 (build 15878) (c)2012-2024 GizMoCuz
2024-10-20 16:01:05.969  Status: Build Hash: 29128d91b, Date: 2024-01-27 15:49:44
2024-10-20 16:01:05.969  Status: Startup Path: /home/pi/domoticz/
2024-10-20 16:01:06.002  Sunrise: 08:17:00 SunSet: 18:35:00
2024-10-20 16:01:06.003  Day length: 10:18:00 Sun at south: 13:26:00
2024-10-20 16:01:06.003  Civil twilight start: 07:42:00 Civil twilight end: 19:10:00
2024-10-20 16:01:06.003  Nautical twilight start: 07:02:00 Nautical twilight end: 19:49:00
2024-10-20 16:01:06.003  Astronomical twilight start: 06:22:00 Astronomical twilight end: 20:29:00
2024-10-20 16:01:06.125  Status: PluginSystem: Started, Python version '3.9.2', 1 plugin definitions loaded.
2024-10-20 16:01:06.134  Active notification Subsystems: email, pushover (2/13)
2024-10-20 16:01:06.152  Status: WebServer(HTTP) startup failed on address :: with port: 8080: bind: Address already in use [system:98 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind'], trying ::
2024-10-20 16:01:06.153  Status: WebServer(HTTP) startup failed on address :: with port: 8080: bind: Address already in use [system:98 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind'], trying 0.0.0.0
2024-10-20 16:01:06.154  Error: WebServer(HTTP) startup failed on address 0.0.0.0 with port: 8080: bind: Address already in use [system:98 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind']
2024-10-20 16:01:06.154  Error: WebServer(HTTP) check if no other application is using port: 8080
2024-10-20 16:01:06.161  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind'], trying ::
2024-10-20 16:01:06.164  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind'], trying 0.0.0.0
2024-10-20 16:01:06.166  Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied [system:13 at /usr/local/include/boost/asio/detail/reactive_socket_service.hpp:161 in function 'bind']
2024-10-20 16:01:06.166  Error: WebServer(SSL) check privileges for opening ports below 1024
terminate called without an active exception
2024-10-20 16:01:06.169  Error: Domoticz(pid:224929, tid:224929('domoticz')) received fatal signal 6 (Aborted)
2024-10-20 16:01:06.169  Error: siginfo address=0x3e800036ea1, address=0x7ff2fc83b8
2024-10-20 16:01:08.327  Error: Did not find stack frame for thread (LWP 224929)), printing full gdb output:

2024-10-20 16:01:08.327  Error: > [New LWP 224931]
2024-10-20 16:01:08.328  Error: > [New LWP 224932]
2024-10-20 16:01:08.328  Error: > [New LWP 224933]
2024-10-20 16:01:08.328  Error: > [New LWP 224934]
2024-10-20 16:01:08.328  Error: > [Thread debugging using libthread_db enabled]
2024-10-20 16:01:08.328  Error: > Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
2024-10-20 16:01:08.328  Error: > 0x0000007f899f083c in __GI___wait4 (pid=<optimized out>, stat_loc=0x7ff2fc6d44, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2024-10-20 16:01:08.329  Error: > 27    ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
2024-10-20 16:01:08.329  Error: >   Id   Target Id                                     Frame 
2024-10-20 16:01:08.329  Error: > * 1    Thread 0x7f88e14b40 (LWP 224929) "domoticz"   0x0000007f899f083c in __GI___wait4 (pid=<optimized out>, stat_loc=0x7ff2fc6d44, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2024-10-20 16:01:08.329  Error: >   2    Thread 0x7f88832f40 (LWP 224931) "SQLHelper"  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.329  Error: >   3    Thread 0x7f88031f40 (LWP 224932) "PluginMgr"  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.329  Error: >   4    Thread 0x7f872a4f40 (LWP 224933) "InfluxPush" syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.329  Error: >   5    Thread 0x7f86aa3f40 (LWP 224934) "MQTTPush"   syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.330  Error: > 
2024-10-20 16:01:08.330  Error: > Thread 5 (Thread 0x7f86aa3f40 (LWP 224934) "MQTTPush"):
2024-10-20 16:01:08.330  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.330  Error: > #1  0x000000556c2a64c0 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
2024-10-20 16:01:08.330  Error: > #2  0x000000556bce8e84 in CMQTTPush::Do_Work() ()
2024-10-20 16:01:08.330  Error: > #3  0x000000556c2a41dc in execute_native_thread_routine ()
2024-10-20 16:01:08.330  Error: > #4  0x0000007f89bc6648 in start_thread (arg=0x7f86aa3840) at pthread_create.c:477
2024-10-20 16:01:08.330  Error: > #5  0x0000007f89a1ec9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
2024-10-20 16:01:08.330  Error: > 
2024-10-20 16:01:08.330  Error: > Thread 4 (Thread 0x7f872a4f40 (LWP 224933) "InfluxPush"):
2024-10-20 16:01:08.330  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.330  Error: > #1  0x000000556c2a64c0 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
2024-10-20 16:01:08.331  Error: > #2  0x000000556bce3ebc in CInfluxPush::Do_Work() ()
2024-10-20 16:01:08.331  Error: > #3  0x000000556c2a41dc in execute_native_thread_routine ()
2024-10-20 16:01:08.331  Error: > #4  0x0000007f89bc6648 in start_thread (arg=0x7f872a4840) at pthread_create.c:477
2024-10-20 16:01:08.331  Error: > #5  0x0000007f89a1ec9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
2024-10-20 16:01:08.331  Error: > 
2024-10-20 16:01:08.331  Error: > Thread 3 (Thread 0x7f88031f40 (LWP 224932) "PluginMgr"):
2024-10-20 16:01:08.331  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.331  Error: > #1  0x000000556c2a64c0 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
2024-10-20 16:01:08.331  Error: > #2  0x000000556c00179c in Plugins::CPluginSystem::Do_Work() ()
2024-10-20 16:01:08.331  Error: > #3  0x000000556c2a41dc in execute_native_thread_routine ()
2024-10-20 16:01:08.331  Error: > #4  0x0000007f89bc6648 in start_thread (arg=0x7f88031840) at pthread_create.c:477
2024-10-20 16:01:08.331  Error: > #5  0x0000007f89a1ec9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
2024-10-20 16:01:08.331  Error: > 
2024-10-20 16:01:08.332  Error: > Thread 2 (Thread 0x7f88832f40 (LWP 224931) "SQLHelper"):
2024-10-20 16:01:08.332  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
2024-10-20 16:01:08.332  Error: > #1  0x000000556c2a64c0 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
2024-10-20 16:01:08.332  Error: > #2  0x000000556bc13c6c in CSQLHelper::Do_Work() ()
2024-10-20 16:01:08.332  Error: > #3  0x000000556c2a41dc in execute_native_thread_routine ()
2024-10-20 16:01:08.332  Error: > #4  0x0000007f89bc6648 in start_thread (arg=0x7f88832840) at pthread_create.c:477
2024-10-20 16:01:08.332  Error: > #5  0x0000007f89a1ec9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
2024-10-20 16:01:08.332  Error: > 
2024-10-20 16:01:08.332  Error: > Thread 1 (Thread 0x7f88e14b40 (LWP 224929) "domoticz"):
2024-10-20 16:01:08.332  Error: > #0  0x0000007f899f083c in __GI___wait4 (pid=<optimized out>, stat_loc=0x7ff2fc6d44, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2024-10-20 16:01:08.332  Error: > #1  0x000000556bbfca00 in dumpstack_gdb(bool) ()
2024-10-20 16:01:08.333  Error: > #2  0x000000556bbfcfbc in signal_handler(int, siginfo_t*, void*) ()
2024-10-20 16:01:08.333  Error: > #3  <signal handler called>
2024-10-20 16:01:08.333  Error: > #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
2024-10-20 16:01:08.333  Error: > #5  0x0000007f8996da60 in __GI_abort () at abort.c:79
2024-10-20 16:01:08.333  Error: > #6  0x000000556c2aaae0 in __gnu_cxx::__verbose_terminate_handler() ()
2024-10-20 16:01:08.333  Error: > #7  0x000000556c2248ac in __cxxabiv1::__terminate(void (*)()) ()
2024-10-20 16:01:08.333  Error: > #8  0x000000556c2248f8 in std::terminate() ()
2024-10-20 16:01:08.333  Error: > #9  0x000000556bb79d18 in std::_Sp_counted_ptr_inplace<std::thread, std::allocator<std::thread>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
2024-10-20 16:01:08.333  Error: > #10 0x000000556bb7c55c in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
2024-10-20 16:01:08.333  Error: > #11 0x000000556bbd65dc in CMQTTPush::~CMQTTPush() ()
2024-10-20 16:01:08.333  Error: > #12 0x0000007f8998376c in __run_exit_handlers (status=1, listp=0x7f89abc688 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
2024-10-20 16:01:08.333  Error: > #13 0x0000007f899838fc in __GI_exit (status=<optimized out>) at exit.c:139
2024-10-20 16:01:08.333  Error: > #14 0x0000007f8996dddc in __libc_start_main (main=0x556bb11370 <main>, argc=1, argv=0x7ff2fc88b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:342
2024-10-20 16:01:08.334  Error: > #15 0x000000556bb3c740 in _start ()
2024-10-20 16:01:08.334  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2024-10-20 16:01:08.334  Error: > 
2024-10-20 16:01:08.334  Error: > Main thread:
2024-10-20 16:01:08.334  Error: > #0  0x0000007f899f083c in __GI___wait4 (pid=<optimized out>, stat_loc=0x7ff2fc6d44, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2024-10-20 16:01:08.334  Error: > #1  0x000000556bbfca00 in dumpstack_gdb(bool) ()
2024-10-20 16:01:08.334  Error: > #2  0x000000556bbfcfbc in signal_handler(int, siginfo_t*, void*) ()
2024-10-20 16:01:08.334  Error: > #3  <signal handler called>
2024-10-20 16:01:08.334  Error: > #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
2024-10-20 16:01:08.334  Error: > #5  0x0000007f8996da60 in __GI_abort () at abort.c:79
2024-10-20 16:01:08.334  Error: > #6  0x000000556c2aaae0 in __gnu_cxx::__verbose_terminate_handler() ()
2024-10-20 16:01:08.334  Error: > #7  0x000000556c2248ac in __cxxabiv1::__terminate(void (*)()) ()
2024-10-20 16:01:08.335  Error: > #8  0x000000556c2248f8 in std::terminate() ()
2024-10-20 16:01:08.335  Error: > #9  0x000000556bb79d18 in std::_Sp_counted_ptr_inplace<std::thread, std::allocator<std::thread>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
2024-10-20 16:01:08.335  Error: > #10 0x000000556bb7c55c in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
2024-10-20 16:01:08.335  Error: > #11 0x000000556bbd65dc in CMQTTPush::~CMQTTPush() ()
2024-10-20 16:01:08.335  Error: > #12 0x0000007f8998376c in __run_exit_handlers (status=1, listp=0x7f89abc688 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
2024-10-20 16:01:08.335  Error: > #13 0x0000007f899838fc in __GI_exit (status=<optimized out>) at exit.c:139
2024-10-20 16:01:08.335  Error: > #14 0x0000007f8996dddc in __libc_start_main (main=0x556bb11370 <main>, argc=1, argv=0x7ff2fc88b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:342
2024-10-20 16:01:08.335  Error: > #15 0x000000556bb3c740 in _start ()
2024-10-20 16:01:08.335  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2024-10-20 16:01:08.335  Error: > [Inferior 1 (process 224929) detached]
Aborted
Backbone
Posts: 43
Joined: Thursday 22 October 2015 21:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: The Netherlands
Contact:

Re: Domoticz.log location

Post by Backbone »

Hi Walter,

As far as my knowledge goes I switched off all logging options as you described.
Problem of the filling of the log starts as soon as I start the DZvents script as written below and change the setting manual of a "switch".
Without changing the Switch output the logging is regular.
When I want to abort the logging I have to wait around 10 seconds as domoticz seems to be busy still with the logging.
After this 10 seconds the script screen appears and I can stop the script from running.

Code: Select all

{
    on =
    {
        devices = {'Thermostat_Control', 'Heater_Switch', 'Temp_Kamer','Setpoint_Regular' },
        timer = {'every minute'},
    },

    execute = function(dz)

        --local Vartemp = dz.variables('Vartemp') --declared as float value
        local Thermostat = dz.devices('Thermostat_Control')         -- =idx69
        local Switch = dz.devices('Heater_Switch')                  -- =idx67
        local Roomtemp = dz.devices('Temp_Kamer')                   -- =idx32
        local Setpoint_Regular = dz.devices('Setpoint_Regular')     -- =idx68
        
        -- "Uit" mode active initiated by thermostat switchselector at level 0
        if dz.devices(69).level == 0 then
            dz.devices(67).switchOff()

        end
        
        -- "Normaal" mode active initiated by thermostat switchselector at level 10
        if dz.devices(69).level == 10 then
            if  dz.time.matchesRule ('at 00:00-23:59') then
                if dz.devices(32).temperature < dz.devices(68).setPoint then
                    dz.devices(67).switchOn()
                else
                    dz.devices(67).switchOff()
                end
            end
        end
    end
 }
Any suggestion or should I put this problem in the DZvents section?

Thanks, Paco
Attachments
domoticz dzvents log.JPG
domoticz dzvents log.JPG (220.1 KiB) Viewed 397 times
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz.log location

Post by waltervl »

It seems that one of the triggered devices, probably 'Heater_switch', is updated every second so your script is triggered every second. You could remove it from the trigger device list if that is possible for your script

It could be that the dzvents script is doing the trigger itself due to the switching perhaps add a checkfirst() command option before switching.

Code: Select all

dz.devices(67).switchOff().checkFirst()
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Backbone
Posts: 43
Joined: Thursday 22 October 2015 21:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: The Netherlands
Contact:

Re: Domoticz.log location [solved]

Post by Backbone »

Got it solved.

Code: Select all

return
{
    on =
    {
        devices = {'Thermostat_Control', 'Heater_Switch', 'Temp_Kamer','Setpoint_Regular' },
        timer = {'every minute'},
    },

    execute = function(dz)

        --local Vartemp = dz.variables('Vartemp') --declared as float value
        local Thermostat = dz.devices('Thermostat_Control')         -- =idx69
        local Switch = dz.devices('Heater_Switch')                  -- =idx67
        local Roomtemp = dz.devices('Temp_Kamer')                   -- =idx32
        local Setpoint_Regular = dz.devices('Setpoint_Regular')     -- =idx68
        
        -- "Uit" mode active initiated by thermostat switchselector at level 0
        if dz.devices(69).level == 0 then
            dz.devices(67).switchOff()

        end
        
        -- "Normaal" mode active initiated by thermostat switchselector at level 10
        if dz.devices(69).level == 10 then
            if  dz.time.matchesRule ('at 00:00-23:59') then
                if dz.devices(32).temperature < dz.devices(68).setPoint then
                    dz.devices(67).switchOn().checkFirst()
                else
                    dz.devices(67).switchOff().checkFirst()
                end
            end
        end
    end
 }  
Paco
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest