Giter Site home page Giter Site logo

Comments (13)

dvanherbergen avatar dvanherbergen commented on May 23, 2024

Which OS are you using? Are you running on an ARMv6/v7 machine?

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

Running on raspberry pi2 with raspbian jessie

from openhab-distro.

dvanherbergen avatar dvanherbergen commented on May 23, 2024

Can you execute the command arch and post the result?

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

armv7l

from openhab-distro.

dvanherbergen avatar dvanherbergen commented on May 23, 2024

Strange. We know there is an issue with the service on armv6, but on v7 it should work.
I don't have a pi2 myself, so I can't really test. The openHAB service is using the karaf service installation underneath. Could you try downloading karaf and installing that as a service by executing the command 'wrapper:install' in the shell?

@kaikreuzer did you test starting the service on your pi2?

from openhab-distro.

kaikreuzer avatar kaikreuzer commented on May 23, 2024

@kaikreuzer did you test starting the service on your pi2?

No, not yet.

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

same problem when creating a service:

pi@autohome /tmp/apache-karaf-4.0.3/bin $ ./shell 
shell: JAVA_HOME not set; results may vary
        __ __                  ____      
       / //_/____ __________ _/ __/      
      / ,<  / __ `/ ___/ __ `/ /_        
     / /| |/ /_/ / /  / /_/ / __/        
    /_/ |_|\__,_/_/   \__,_/_/         

  Apache Karaf (4.0.3)

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 Karaf.

karaf@root()> wrapper:install
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/bin/karaf-wrapper
Creating file: /tmp/apache-karaf-4.0.3/bin/karaf-wrapper
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/bin/karaf-service
Creating file: /tmp/apache-karaf-4.0.3/bin/karaf-service
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/bin/karaf.service
Creating file: /tmp/apache-karaf-4.0.3/bin/karaf.service
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/etc/karaf-wrapper.conf
Creating file: /tmp/apache-karaf-4.0.3/etc/karaf-wrapper.conf
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating missing directory: /tmp/apache-karaf-4.0.3/lib/wrapper
Creating missing directory: /tmp/apache-karaf-4.0.3/lib/wrapper
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/libwrapper.so
Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/libwrapper.so
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/karaf-wrapper.jar
Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/karaf-wrapper.jar
[org.apache.karaf.wrapper.internal.WrapperServiceImpl] : Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/karaf-wrapper-main.jar
Creating file: /tmp/apache-karaf-4.0.3/lib/wrapper/karaf-wrapper-main.jar

Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
    /tmp/apache-karaf-4.0.3/etc/karaf-wrapper.conf
before installing and starting the service.


Ubuntu/Debian Linux system detected (SystemV):
  To install the service:
    $ ln -s /tmp/apache-karaf-4.0.3/bin/karaf-service /etc/init.d/

  To start the service when the machine is rebooted:
    $ update-rc.d karaf-service defaults

  To disable starting the service when the machine is rebooted:
    $ update-rc.d -f karaf-service remove

  To start the service:
    $ /etc/init.d/karaf-service start

  To stop the service:
    $ /etc/init.d/karaf-service stop

  To uninstall the service :
    $ rm /etc/init.d/karaf-service

For systemd compliant Linux: 
  To install the service (and enable at system boot):
   $ systemctl enable /tmp/apache-karaf-4.0.3/bin/karaf.service

  To start the service:
   $ systemctl start karaf

  To stop the service:
   $ systemctl stop karaf

  To check the current service status:
   $ systemctl status karaf

  To see service activity journal:
   $ journalctl -u karaf

  To uninstall the service (and disable at system boot):
   $ systemctl disable karaf
karaf@root()> ^Dkaraf@root()> 
pi@autohome /tmp/apache-karaf-4.0.3/bin $ less /tmp/apache-karaf-4.0.3/bin/karaf.service
pi@autohome /tmp/apache-karaf-4.0.3/bin $ /tmp/apache-karaf-4.0.3/bin/karaf-service start
Starting karaf...
/tmp/apache-karaf-4.0.3/bin/karaf-wrapper: 1: /tmp/apache-karaf-4.0.3/bin/karaf-wrapper: Syntax error: "(" unexpected
pi@autohome /tmp/apache-karaf-4.0.3/bin $ 

from openhab-distro.

dvanherbergen avatar dvanherbergen commented on May 23, 2024

That's bad news. That means that the Java Service Wrapper which is included in Karaf doesn't work. And because of a license change, it won't be upgraded anymore.
So we'll have to rework the whole service installation part 😞
This will take some time...

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

an alternative might be, to work around problem and do not use the karaf native service. in openhab 1.x (pre "there are some deb packages,too"-phase) I had a hacky solution.
starting openhab:

sudo -u ${OHUSER} tmux new-session -s openHAB -d  "sh ./start.sh"

stopping openhab:

sudo -u ${OHUSER} tmux send-keys -t openHAB "exit" Enter "y" Enter "exit" Enter

not very beautyful, but it worked. Creds for this solution to "I don't know where i digged this up"

from openhab-distro.

kaikreuzer avatar kaikreuzer commented on May 23, 2024

Hm, this is really unfortunate, I was so happy that Karaf offered this service and no it is irrepairably broken :-(

So maybe we need to implement our own logic to generated the required files (at least on the platform, where the Karaf solution does not work). Maybe this would be a start for it: https://community.openhab.org/t/start-script-for-oh2/5883/7?u=kai

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

https://issues.apache.org/jira/browse/KARAF-2734 unresolved :(

from openhab-distro.

dakky avatar dakky commented on May 23, 2024

have a look here: https://community.openhab.org/t/start-script-for-oh2/5883/15

starting the start.sh via systemd works fine. so there is no need for the karaf service wrapper on any systemd enabled distributions.

from openhab-distro.

kaikreuzer avatar kaikreuzer commented on May 23, 2024

Since the service wrapper does not work for RaspPi, this has been solved through documentation now: https://github.com/openhab/openhab-distro/pull/74/files

from openhab-distro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.