I upgraded to 2.2 SNAPSHOT today (Mac OS) using the ‘upgrade’ script and now openhab won’t start. When I start it from the command line, I get dumped into the Karaf console, but no command is recognized:
~/Code/openhab-2 $ sudo ./start_debug.sh
Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005
__ _____ ____
____ ____ ___ ____ / / / / | / __ )
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
/_/ 2.2.0-SNAPSHOT
Build #1051
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> log:tail
Command not found: log:tail
openhab> logout
And the upgrade script claimed to have updated successfully? Is there anything in /tmp/openhab2, as if there is it would suggest that it didn’t.
Quite honestly, I’ve never seen this before and don’t understand what’s happening in Karaf for it to start partially… @Kai, you’ve used the upgrade script with success on a Mac right? Have you seen this issue before?
Are ALL commands not running or only log:xxx? With build #1009 and newer the logging was changed. From log4j to log4j2. From which build did you perform an update? I had to overwrite the org.ops4j.pax.logging.cfg with the new one!
I’ve seen similar behaviour with a recent snapshot (tested builds 1044-1052) starting on a RPi2 using systemd, which then works if started manually from the console AND you wait 2-3mins.
After starting via systemd as a daemon failed, using start_debug.sh gave a console which did not recognise any commands, but presumably the on-line version then downloaded extra modules and started working - but only from the command line via start_debug.sh.
So, I’d suggest trying start_debug.sh with patience (seems to take ~2mins for log:tail to start working).
Starting a recent 2.2 snapshot via systemd gives the following error for me:
sudo systemctl status openhab2.service
Sep 30 09:10:14 hostname start.sh[15088]: / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
Sep 30 09:10:14 hostname start.sh[15088]: / /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
Sep 30 09:10:14 hostname start.sh[15088]: \____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
Sep 30 09:10:14 hostname start.sh[15088]: /_/ 2.2.0-SNAPSHOT
Sep 30 09:10:14 hostname start.sh[15088]: Build #1052
Sep 30 09:10:14 hostname start.sh[15088]: Hit '<tab>' for a list of available commands
Sep 30 09:10:14 hostname start.sh[15088]: and '[cmd] --help' for help on a specific command.
Sep 30 09:10:14 hostname start.sh[15088]: Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
Sep 30 09:10:14 hostname start.sh[15088]: Error in initialization script: /opt/openhab/userdata/etc/shell.init.script: String index out of range: 0
Sep 30 09:10:16 hostname start.sh[15088]: openhab>
Searching for the error message found an issue with docker apparently related to the console - could it be that there is a bug that requires Karaf to start in the foreground connected to a console?
nothing in /tmp
Here are the results of the upgrade command:
~/Code/openhab-2 $ sudo runtime/bin/update 2.2.0-SNAPSHOT
Password:
#########################################
openHAB 2.x.x update script
#########################################
Making Temporary Directory
Downloading openHAB 2.2.0-SNAPSHOT...
######################################################################## 100.0%
Update script in .zip archive found, using that instead.
#########################################
openHAB 2.x.x update script
#########################################
Making Temporary Directory
The script will attempt to update openHAB to version 2.2.0-SNAPSHOT
Is this okay? [y/N]: y
Removing openHAB System Files...
Clearing cache...
Updating openHAB...
Deleting temporary files...
Restoring previous file ownership (johnsturgeon:staff)
SUCCESS: openHAB updated from 2.2.0-SNAPSHOT to 2.2.0-SNAPSHOT
I did update to 2.2 before updating to the snapshot, could that have caused problems?
No such luck
~/Code/openhab-2 $ sudo ./start_debug.sh
Password:
Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005
__ _____ ____
____ ____ ___ ____ / / / / | / __ )
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
/_/ 2.2.0-SNAPSHOT
Build #1051
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> log:tail
Command not found: log:tail
openhab> system:shutdown
Command not found: system:shutdown
openhab> help
Command not found: more
openhab>