No Domoticz running afther restart

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

Moderators: leecollings, remb0

Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

No Domoticz running afther restart

Post by Dreamcatcher2007 »

Hello all,

Maybe a stupid question, for more than 7 months Domoticz 4834 was running smootly, suddely dead, okey i think SD card dead, new image and DB backup on it and it's up again !! yes..... until i do a reboot, i'm using RPI3, nothing, i can connect to de RPI with Putty, but no domoticz webpage is showing on the phone's or app, only offline !!! tried several cards and other RPI3 but can't find the problem, also manual starting with putty does nothing...... what goes wrong ? i dont know anymore, i'm not very good with Linux and so... read a lot but still i cant solve this !!

Please help

Thanks in advance
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

What does the logfile say?
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

euuhh... maybe stupid question, where can i find the log file in winscp ? i'm looking for it .... :oops:
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

login with ssh
cat /etc/init.d/domoticz to see the start/stop script. There you should see the location of the logfile.
Think it's /var/log/domoticz.log by default on a Pi.

What happens if you enter this:
/home/pi/domoticz/domoticz ?
Domoticz should run in a mode that it outputs everything on screen then.
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

Pfffttt looked everywhere but could not find this log file, do you know what the name of the file is ? i can make a search then through the SD card

Thanks again still not working, even with another PI, powersupply SD cards, Clean install and so on pffttt
Sneezydevil
Posts: 111
Joined: Monday 18 January 2016 9:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No Domoticz running afther restart

Post by Sneezydevil »

I think by default logging is off, you can enable it by doing this:

Code: Select all

sudo nano /etc/init.d/domoticz.sh
Then remove the # in front of the line that contains -log

Are the rights correct for the folder?

Oh and what does the following tell you?

Code: Select all

sudo /etc/init.d/domoticz.sh restart
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

@ sneezydevil, i don't know not a wizzkid, i can tweak a little so what you tell me i understand, but this is an standard domoticz instalation, so debianwheezy lite, and then Domotic, or i use an older img from Domoticz doesnt matter, same problem.

For now.... i must make a new image for the 1000st time hahahaha, i won't give up, the frustrating part is that this configuration has working for about more than 6 months no changes made so i'm confussed for now.

Thanks i will come back after testing you're suggestion.

Thanks al lot all again.

New...lol
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

@sneezy and others :

pi@domoticz-server:~ $ sudo /etc/init.d/domoticz.sh restart
[ ok ] Restarting domoticz.sh (via systemctl): domoticz.service.
pi@domoticz-server:~ $
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

Nov 25 17:56:27 raspberrypi systemd-logind[441]: New seat seat0.
Dec 7 16:03:42 raspberrypi login[714]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=pi
Dec 7 16:03:46 raspberrypi login[714]: FAILED LOGIN (1) on '/dev/tty1' FOR 'pi', Authentication failure
Dec 7 16:03:53 raspberrypi login[714]: pam_unix(login:session): session opened for user pi by LOGIN(uid=0)
Dec 7 16:03:53 raspberrypi sudo: pi : TTY=tty1 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -E ^pi: /etc/shadow
Dec 7 16:03:53 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 16:03:53 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Dec 7 16:04:01 raspberrypi sudo: pi : TTY=tty1 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/raspi-config
Dec 7 16:04:01 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 16:04:25 raspberrypi passwd[951]: pam_unix(passwd:chauthtok): password changed for pi
Dec 7 16:04:42 raspberrypi sshd[1040]: Server listening on 0.0.0.0 port 22.
Dec 7 16:04:42 raspberrypi sshd[1040]: Server listening on :: port 22.
Dec 7 17:05:07 domoticz-server systemd-logind[429]: New seat seat0.
Dec 7 17:05:14 domoticz-server sshd[693]: Server listening on 0.0.0.0 port 22.
Dec 7 17:05:14 domoticz-server sshd[693]: Server listening on :: port 22.
Dec 7 17:05:21 domoticz-server login[720]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=pi
Dec 7 17:05:44 domoticz-server login[720]: FAILED LOGIN (1) on '/dev/tty1' FOR 'pi', Authentication failure
Dec 7 17:05:50 domoticz-server login[720]: pam_unix(login:session): session opened for user pi by LOGIN(uid=0)
Dec 7 17:05:50 domoticz-server sudo: pi : TTY=tty1 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -E ^pi: /etc/shadow
Dec 7 17:05:50 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:05:50 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:06:22 domoticz-server sshd[867]: Accepted password for pi from 192.168.0.4 port 50282 ssh2
Dec 7 17:06:22 domoticz-server sshd[867]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Dec 7 17:06:22 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -E ^pi: /etc/shadow
Dec 7 17:06:22 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:06:22 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:08:04 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/curl -L install.domoticz.com
Dec 7 17:08:04 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:08:04 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:08:04 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/bash
Dec 7 17:08:04 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:10:49 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:11:44 domoticz-server sudo: root : TTY=unknown ; PWD=/home/pi/domoticz ; USER=root ; COMMAND=/sbin/shutdown -r now
Dec 7 17:11:44 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 7 17:12:17 domoticz-server systemd-logind[434]: New seat seat0.
Dec 7 17:12:23 domoticz-server sshd[688]: Server listening on 0.0.0.0 port 22.
Dec 7 17:12:23 domoticz-server sshd[688]: Server listening on :: port 22.
Dec 7 17:13:38 domoticz-server sshd[838]: Accepted password for pi from 192.168.0.4 port 50411 ssh2
Dec 7 17:13:38 domoticz-server sshd[838]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Dec 7 17:13:38 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -E ^pi: /etc/shadow
Dec 7 17:13:38 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:13:38 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:13:51 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/nano /etc/init.d/domoticz.sh
Dec 7 17:13:51 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:14:40 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:14:46 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/reboot
Dec 7 17:14:46 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:14:46 domoticz-server sshd[688]: Received signal 15; terminating.
Dec 7 17:14:51 domoticz-server systemd-logind[433]: New seat seat0.
Dec 7 17:14:57 domoticz-server sshd[699]: Server listening on 0.0.0.0 port 22.
Dec 7 17:14:57 domoticz-server sshd[699]: Server listening on :: port 22.
Dec 7 17:15:46 domoticz-server sshd[840]: Accepted password for pi from 192.168.0.4 port 50435 ssh2
Dec 7 17:15:46 domoticz-server sshd[840]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Dec 7 17:15:46 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -E ^pi: /etc/shadow
Dec 7 17:15:46 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:15:46 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:16:05 domoticz-server sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/etc/init.d/domoticz.sh restart
Dec 7 17:16:05 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dec 7 17:16:07 domoticz-server sudo: pam_unix(sudo:session): session closed for user root
Dec 7 17:17:01 domoticz-server CRON[942]: pam_unix(cron:session): session opened for user root by (uid=0)
Dec 7 17:17:01 domoticz-server CRON[942]: pam_unix(cron:session): session closed for user root
Dec 7 17:18:14 domoticz-server sudo: root : TTY=unknown ; PWD=/home/pi/domoticz ; USER=root ; COMMAND=/sbin/shutdown -r now
Dec 7 17:18:14 domoticz-server sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 7 17:18:14 domoticz-server sshd[699]: Received signal 15; terminating.
Dec 7 17:18:47 domoticz-server systemd-logind[423]: New seat seat0.
Dec 7 17:18:53 domoticz-server sshd[698]: Server listening on 0.0.0.0 port 22.
Dec 7 17:18:53 domoticz-server sshd[698]: Server listening on :: port 22.
Dec 7 17:20:24 domoticz-server sshd[832]: Accepted password for pi from 192.168.0.4 port 50483 ssh2
Dec 7 17:20:24 domoticz-server sshd[832]: pam_unix(sshd:session): session opened for user pi by (uid=0)
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: No Domoticz running afther restart

Post by stlaha2007 »

Last log seems like from /var/log/. This isn't a domoticz.log.

Anyway, couldn't find when you restored domoticz.db, directly after new image or thru the domi-website.

I suggest start over, and make sure domoticz is running after initial boot/reboot.

Check with: sudo service domoticz status
Then after that restore database thru the domo-website [as in http://your-pi-ipaddress:8080]
Then it needs to reboot !
Check again if its running... see above.
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

pi@domoticz-pi:~ $ sudo service domoticz status -l
● domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh)
Active: active (running) since Thu 2016-12-08 13:56:04 CET; 3min 34s ago
Process: 631 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/domoticz.service
└─657 /home/pi/domoticz/domoticz -daemon -www 8080 -sslwww 0 -log ...

Dec 08 13:56:04 domoticz-pi domoticz.sh[631]: 2016-12-08 13:56:04.288 Domot...z
Dec 08 13:56:04 domoticz-pi domoticz.sh[631]: 2016-12-08 13:56:04.300 Build...3
Dec 08 13:56:04 domoticz-pi domoticz[643]: Domoticz is starting up....
Dec 08 13:56:04 domoticz-pi domoticz.sh[631]: 2016-12-08 13:56:04.301 Syste...i
Dec 08 13:56:04 domoticz-pi domoticz.sh[631]: 2016-12-08 13:56:04.301 Start.../
Dec 08 13:56:04 domoticz-pi domoticz.sh[631]: domoticz: Domoticz is starting....
Dec 08 13:56:04 domoticz-pi domoticz[657]: Domoticz running...
Dec 08 13:56:04 domoticz-pi systemd[1]: Started LSB: Home Automation System.

This is the log, sorry for the other one, it's the clean install, now without the db inside, updates and upgrades oke, fixed ip and so on.
I put the db in domoticz through the webinterface, never a problem with it.
So this config i can reboot and reboot and reboot it will run, but when i put the db in it, it wont start again, i will do so and post the log again, there is a critical error i saw the last time but don't know how to fix it.
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

2016-12-08 14:09:46.229 Domoticz V3.5877 (c)2012-2016 GizMoCuz
2016-12-08 14:09:46.240 Build Hash: 15b013c, Date: 2016-11-10 16:44:33
2016-12-08 14:09:46.240 System: Raspberry Pi
2016-12-08 14:09:46.240 Startup Path: /home/pi/domoticz/
2016-12-08 14:09:46.435 Sunrise: 08:34:00 SunSet:16:24:00
2016-12-08 14:09:46.435 EventSystem: reset all events...
2016-12-08 14:09:46.456 Error: Domoticz received fatal signal 6 !...
2016-12-08 14:09:46.457 Error: /home/pi/domoticz/domoticz() [0x1a4420]
2016-12-08 14:09:46.458 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x1a44cc]
2016-12-08 14:09:46.458 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76aa4180]
2016-12-08 14:09:46.458 Error: /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x76aa2f70]

And this is after a db restore... i see error but i don't know why
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

How did you backup/restore?
How big is your database?
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

hello egreguis,

i did backup with the webinterface and same to restore, did this always ! so never problems before.

The db is : 3,76 MB (3.949.568 bytes)

Thanks..

Erwin
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

So it's not to big. What if you replace the .db file directly?
Last resort: transfer data table by table with a sql3lite explorer...
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: No Domoticz running afther restart

Post by stlaha2007 »

Its probebly a record in one of the tables.

Best option, use a sqlbrowser and delete that record.

Perhaps investigate/repair it with some sort of sqllite tool.

Im used to use phpmyadmin and M$, not specific sqllite. So cant help you that way.

@Egregius: Do you know how to do this?
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

I use Adminer 4.2.4 to access the domoticz db
Don't know how you can find the corrupt value if it isn't in the logfile.
But, maybe with some luck, it's obvious when browsing thru the tables.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: No Domoticz running afther restart

Post by stlaha2007 »

[quote="Dreamcatcher2007"][/quote]

ok message from gordonb3 is nice to know. Maybe handy to copy 'empty' tables from clean domoticz.db into failing backup-copy.

Use a tool, i here good words about Adminer, to browse your faulty db.
Check first schedules (if you have them)
Check other tables (eg with temp-sensor) as maybe a write at corruptiontime. Some weird record with a few values missing/oversized extreme value.

I'll hope you manage to find the error this way.
User avatar
Egregius
Posts: 2590
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: No Domoticz running afther restart

Post by Egregius »

If you mean 'timers' with schedules, isn't it on option to set them non active in the database?
Dreamcatcher2007
Posts: 12
Joined: Friday 13 February 2015 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Barneveld the Netherlands
Contact:

Re: No Domoticz running afther restart

Post by Dreamcatcher2007 »

Yes thanks gordon, this is it, in first i could not delete this timer for my smokeguard, i have 12 of them, when i tried to remove my montly timer i got an error that it was not possible to do so, i decided to delete the smokeguards and saved the whole thing, and it works again !! so you're correct that it is an software problem i think, so i will run this version now for a few days and come back to tell or it still works, for now its fine thanks guys !!! have a nice weekend.
Post Reply

Who is online

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