Hi,
I’ve updated to OH2 2.2.0 stable. Currently no logs are updated anymore.
Neither ophenab.log, nor events.log or audit.log.
Any idea how to solve it.
Thanks.
Hi,
I’ve updated to OH2 2.2.0 stable. Currently no logs are updated anymore.
Neither ophenab.log, nor events.log or audit.log.
Any idea how to solve it.
Thanks.
Maybe this helps:
Do these steps :
sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.old
sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg
Thanks for the remarks.
Unfortunately it does not solve the issue. I’ve copied the logging.cfg from a fresh OH 2.2 installation. The status of the service is the following:
openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
Active: active (running) since Thu 2018-01-04 00:40:44 CET; 3s ago
Docs: http://docs.openhab.org
https://community.openhab.org
Process: 734 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
Main PID: 901 (java)
CGroup: /system.slice/openhab2.service
└─901 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/con...
Jan 04 00:40:44 raspberrypi systemd[1]: Started openHAB 2 - empowering the smart home.
Is there an option to reinstall OH 2.2 so that the runtime and .cfg files are replaced?
Thanks.
Did you restart openhab ?
sudo systemctl restart openhab2.service
Yes several times but I’ve used command:
Sudo service openhab2 restart
Shouldn’t make a diffference I assume.
Best regards
Still having trouble to start openhab2
Jan 01 01:00:05 raspberrypi systemd[1]: Starting The openHAB 2 Home Automation Bus Solution...
Jan 01 01:00:05 raspberrypi systemd[1]: Started The openHAB 2 Home Automation Bus Solution.
Jan 01 01:00:05 raspberrypi start.sh[504]: Launching the openHAB runtime...
Jan 01 01:00:12 raspberrypi start.sh[504]: null
Jan 01 01:00:12 raspberrypi start.sh[504]: Error occurred shutting down framework: java.lang.NumberFormatException: null
Jan 01 01:00:12 raspberrypi start.sh[504]: java.lang.NumberFormatException: null
Jan 01 01:00:12 raspberrypi start.sh[504]: at java.lang.Integer.parseInt(Integer.java:542)
Jan 01 01:00:12 raspberrypi start.sh[504]: at java.lang.Integer.parseInt(Integer.java:615)
Jan 01 01:00:12 raspberrypi start.sh[504]: at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:214)
Jan 01 01:00:12 raspberrypi start.sh[504]: at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:228)
Jan 01 01:00:12 raspberrypi start.sh[504]: at org.apache.karaf.main.Main.main(Main.java:193)
Jan 01 01:00:12 raspberrypi systemd[1]: openhab2.service: main process exited, code=exited, status=254/n/a
Jan 01 01:00:12 raspberrypi kill[1400]: kill: invalid argument S
Jan 01 01:00:12 raspberrypi kill[1400]: Usage:
Jan 01 01:00:12 raspberrypi kill[1400]: kill [options] <pid> [...]
Jan 01 01:00:12 raspberrypi kill[1400]: Options:
Jan 01 01:00:12 raspberrypi kill[1400]: <pid> [...] send signal to every <pid> listed
Jan 01 01:00:12 raspberrypi kill[1400]: -<signal>, -s, --signal <signal>
Jan 01 01:00:12 raspberrypi kill[1400]: specify the <signal> to be sent
Jan 01 01:00:12 raspberrypi kill[1400]: -l, --list=[<signal>] list all signal names, or convert one to a name
Jan 01 01:00:12 raspberrypi kill[1400]: -L, --table list all signal names in a nice table
Jan 01 01:00:12 raspberrypi kill[1400]: -h, --help display this help and exit
Jan 01 01:00:12 raspberrypi kill[1400]: -V, --version output version information and exit
Jan 01 01:00:12 raspberrypi kill[1400]: For more details see kill(1).
Jan 01 01:00:12 raspberrypi systemd[1]: openhab2.service: control process exited, code=exited status=1
Jan 01 01:00:12 raspberrypi systemd[1]: Unit openhab2.service entered failed state.
Jan 01 01:00:13 raspberrypi systemd[1]: openhab2.service holdoff time over, scheduling restart.
Jan 01 01:00:13 raspberrypi systemd[1]: Stopping The openHAB 2 Home Automation Bus Solution...
Jan 01 01:00:13 raspberrypi systemd[1]: Starting The openHAB 2 Home Automation Bus Solution...
Jan 01 01:00:13 raspberrypi systemd[1]: Started The openHAB 2 Home Automation Bus Solution.
Jan 01 01:00:13 raspberrypi start.sh[1419]: Launching the openHAB runtime...
What is the full output of
sudo systemctl status openhab2
Which service file is it using?
Hi Benjy,
this is the full output:
openhab2.service - The openHAB 2 Home Automation Bus Solution
Loaded: loaded (/lib/systemd/system/openhab2.service; enabled)
Active: failed (Result: start-limit) since Mon 2018-01-08 00:07:18 CET; 23h ago
Docs: http://docs.openhab.org
Process: 11090 ExecStop=/bin/kill -SIGINT $MAINPID (code=exited, status=1/FAILURE)
Process: 10962 ExecStart=/usr/share/openhab2/start.sh server (code=exited, status=254)
Main PID: 10962 (code=exited, status=254)
Jan 08 00:07:18 raspberrypi kill[11090]: -V, --version output version information and exit
Jan 08 00:07:18 raspberrypi kill[11090]: For more details see kill(1).
Jan 08 00:07:18 raspberrypi systemd[1]: openhab2.service: control process exited, code=exited status=1
Jan 08 00:07:18 raspberrypi systemd[1]: Unit openhab2.service entered failed state.
Jan 08 00:07:18 raspberrypi systemd[1]: openhab2.service holdoff time over, scheduling restart.
Jan 08 00:07:18 raspberrypi systemd[1]: Stopping The openHAB 2 Home Automation Bus Solution...
Jan 08 00:07:18 raspberrypi systemd[1]: Starting The openHAB 2 Home Automation Bus Solution...
Jan 08 00:07:18 raspberrypi systemd[1]: openhab2.service start request repeated too quickly, refusing to start.
Jan 08 00:07:18 raspberrypi systemd[1]: Failed to start The openHAB 2 Home Automation Bus Solution.
Jan 08 00:07:18 raspberrypi systemd[1]: Unit openhab2.service entered failed state.
The service file is: /lib/systems/system/openhab2.service
[Unit]
Description=The openHAB 2 Home Automation Bus Solution
Documentation=http://docs.openhab.org
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=openhab
Group=openhab
GuessMainPID=yes
WorkingDirectory=/usr/share/openhab2
#EnvironmentFile=/etc/default/openhab2
ExecStart=/usr/share/openhab2/start.sh server
ExecStop=/bin/kill -SIGINT $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
The result from openhab cli:
openhab-cli info
Version: 2.2.0 (Build)
User: openhab (Environment Variable Set)
User Groups: openhab
Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhab
OPENHAB_CONF | /etc/openhab2 | openhab:openhab
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhab
OPENHAB_BACKUPS | /var/lib/openhab2/backups | openhab:openhab
The service file that should be used is /usr/lib/systemd/system/openhab2.service
Remove the old service file and then update the service config:
sudo systemctl disable openhab2
sudo rm /lib/systemd/system/openhab2.service
sudo systemctl daemon-reload
sudo systemctl enable openhab2.service
sudo systemctl start openhab2.service