OH2.2.0 unable to start via LaunchDaemon on macOS

Hi,

I’ve just upgraded from OH 2.1.0 to 2.2.0 and noticed that my LaunchDaemon is not working any longer.
The following is shown in the log file:

2017-08-30 12:50:54.536 [WARN ] [org.jline                           ] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
2017-08-30 12:52:23.786 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://10.0.55.5:9080
2017-08-30 12:52:23.792 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://10.0.55.5:9443
2017-08-30 12:52:26.190 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP PUT request at 'items/Zaehler_WP/state' for the unknown item 'Zaehler_WP'.
2017-08-30 12:52:54.413 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard

and my LaunchDaemon:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
	    <key>StandardOutPath</key>
	    <string>/Users/macadmin/Desktop/openhab2/daemon.log</string>
	    <key>StandardErrorPath</key>
	    <string>/Users/macadmin/Desktop/openhab2/daemon.log</string>  
	    <key>KeepAlive</key>
	    <false/>
	    <key>Label</key>
	    <string>org.openhab.server</string>
	    <key>EnvironmentVariables</key>
	    <dict>
	      <key>OPENHAB_HTTP_PORT</key>
	      <string>9080</string>
	      <key>OPENHAB_HTTPS_PORT</key>
	      <string>9443</string>
	    </dict>
	    <key>ProgramArguments</key>
        <array>
                <string>/Users/macadmin/Desktop/openhab2/start_debug.sh</string>
        </array>
	    <key>RunAtLoad</key>
	    <true/>    
	    <key>UserName</key>
		<string>macadmin</string>
	</dict>
</plist>

Any ideas?
Thanks, Manolo

Nobody has an idea? With OH 2.1.0 it’s working like a charm.
Thanks, Manolo

Sorry - deleted my previous reply, because I thought it is about the “org.jline” log message, but reading the log more closely, I see that it is about openHAB shutting down…
Do you have anything in your addons folder? If so, you might be stumbled over this issue.

It’s the snapshot without any modifications. I also got this error message while LaunchDaemon tried to start openhab:

Error in initialization script: /Users/macadmin/Desktop/oh-2.2.0/userdata/etc/shell.init.script: String index out of range: 0

Many thanks for your help,
Manolo

I have the same issue, Also tried it already with UserAgent to have the current user.

org.jline                           ] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

and

Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005

e[31m                         e[0m __  _____    ____      e[0m
e[31m  ____  ____  ___  ____  e[0m/ / / /   |  / __ )     e[0m
e[31m / __ \/ __ \/ _ \/ __ \e[0m/ /_/ / /| | / __  | e[0m
e[31m/ /_/ / /_/ /  __/ / / / e[0m__  / ___ |/ /_/ /      e[0m
e[31m\____/ .___/\___/_/ /_/e[0m_/ /_/_/  |_/_____/     e[0m
e[31m    /_/                       e[0m 2.2.0-SNAPSHOTe[0m
e[31m                              e[0m Build #1065   e[0m

Hit 'e[1m<tab>e[0m' for a list of available commands
and 'e[1m[cmd] --helpe[0m' for help on a specific command.
Hit 'e[1m<ctrl-d>e[0m' or type 'e[1msystem:shutdowne[0m' or 'e[1mlogoute[0m' to shutdown openHAB.

Error in initialization script: /Users/peterbanniza/Downloads/openhab-2-2/userdata/etc/shell.init.script: String index out of range: 0
openhab> 

I also already modified the system.properties file with

karaf.shell.init.script = etc/shell.init.script,etc/scripts/*.script

like mentioned here

do you found a workaround @manolo

I mentioned the problem but got no helpful feedback up until now. Seems to be there’s no solution or the software is far too beta…I switched back to stable release.
Cheers,
M

Hi all,

I tried to upgrade to the stable release of OH 2.2 and have exactly the same error:

"Unable to create a system terminal, creating a dumb terminal"

when using the LaunchDeamon on macOS.

To check if there is a problem with my configuration, I used a clean install: I unpacked the source files without any modification and started it via LaunchDaemon, but the error is the same. A direct start with “./start.sh” works like it should.

Any ideas what’s wrong here?

Cheers
Norman

maybe an update to Karaf 4.1.4 could help. it was to late for 2.2.0 like mentioned here https://github.com/openhab/openhab-distro/issues/519

Thank you for the advice. I rolled back to 2.1 and will wait until a fix is provided. :slight_smile:

I am not sure, if the “Unable to create a system terminal, creating a dumb terminal” really is a problem. I have seen it before, when launching from the shell, and openHAB started without further problems.

Nonetheless starting openHAB 2.2 via launchdaemon fails, I get the following errors:

2017-12-30 18:21:31.415 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, No such file or directory)
2017-12-30 18:22:12.236 [ERROR] [xtext.validation.CompositeEValidator] - Error executing EValidator
java.util.ConcurrentModificationException: null
...

I can not say, if it ever worked with openHAB2, I migrated in the last weeks and always started from the command line until now, but it has never been a problem with openHAB 1.x

Yes, it is a problem - at least on my server. It’s not only the warning, openHAB won’t start at all. No problems with oH 2.1.

Sure, not starting is a problem. But I do not know, if the message “Unable to create a system terminal, creating a dumb terminal” is related to that.

Can’t you install arping (via Homebrew) and try again?

Not sure, if you meant me. I already installed arpping using macports.

No solution in sight?

Any update on this? I am upgrading from 2.0 to 2.2 and get the same error, and it seems Openhab is not completing its start procedure because I keep getting notified Openhab is online when it connects to the myopenhab service.

I’ve tried to update Karaf as per that bug, but it did not solve the issue.

I have also tried the 2.3.0-SNAPSHOT and it doesn’t solve the problem.

Is there any other way to automatically start Openhab on a Mac without a Launchdaemon? I’ve rolled back to 2.1 so long.

Hi

lot of time went by but this error still exists. RC2.1.0 is working fine but 2.2.0 or 2.3.0-SNAPSHOT are still having this issue. It is not possible to start openhab2 via a launchdaemon.

Is someone able to provide a solution?
Btw I already tried a fresh install so it is not specific to my configuration.
Best regards,
Manolo

Aloha,

is someone able to provide a hint or an idea how to fix this bug or a workaround?
Many thanks,
Manolo

Hi all,

is someone still supporting openhab? I know it’s becoming spring and people spent more time outdoor but this issue persists since 8 month at least.
@Kai are you able to provide me with a hint how to solve this issue?
I already tried a fresh install fro 2.2 and 2.3 snapshot but still the LaunchDaemon doesn’t work.
Thanks a lot in advance,
Manolo