Upgrade to 2.2 SNAPSHOT won't start

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

I have no clue where to go from here.

Is there anything in userdata/logs/ that contains an error? Have you used the upgrade script before?

Nope… log files are empty, No. I’ve never used the upgrade script before.

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?

1 Like

Yes, I used it and no, I haven’t seen this before either :frowning: And no time to help on investigations right now, sorry…

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!

Hi,

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>

No commands work

A couple questions:

  1. is it possible to manually update (not using the upgrade script)?
    or…
  2. is it possible to back up my current config and just install 2.2 snapshot fresh?

Please read at the bottom of this doc the backup/restore section:

http://docs.openhab.org/installation/macosx.html

An exactly way how to save the correct files and which to restore after a fresh installation for MacOS I don’t know. Sorry.

I ended up copying my config files manually, then re-installing 2.1 and I’m currently in the process of re-installing bindings, and configurations …

I’m thinking I’ll just pull the SNAPSHOT version of the network binding manually and add it to 2.1.

Hi All,

I am having a similar issue, but slightly different:

most commands seem to work, but it looks like the karaf runtime doens’t have the “more” command:

openhab> help
Command note found: more

But log:tail and other commands seems to work fine. I am on 2.2.0-SNAPSHOT, build 1094. Any suggestions?