From users-return-22-archive-asf-public=cust-asf.ponee.io@unomi.apache.org Sun Oct 14 06:35:29 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9DD4A18065B for ; Sun, 14 Oct 2018 06:35:28 +0200 (CEST) Received: (qmail 48111 invoked by uid 500); 14 Oct 2018 04:35:27 -0000 Mailing-List: contact users-help@unomi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@unomi.apache.org Delivered-To: mailing list users@unomi.apache.org Received: (qmail 48101 invoked by uid 99); 14 Oct 2018 04:35:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2018 04:35:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7090E180B69 for ; Sun, 14 Oct 2018 04:35:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.28 X-Spam-Level: X-Spam-Status: No, score=0.28 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id z0-bYOmQtAR1 for ; Sun, 14 Oct 2018 04:35:24 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 303835F2F0 for ; Sun, 14 Oct 2018 04:35:23 +0000 (UTC) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.109] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 7CA19E0002 for ; Sun, 14 Oct 2018 04:35:17 +0000 (UTC) Subject: Re: Running Unomi, Systemd To: users@unomi.apache.org References: From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: <858dc3cb-1386-19ee-d5a4-1dbc1f43e191@nanthrax.net> Date: Sun, 14 Oct 2018 06:35:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Hi, You can use the Karaf service wrapper: feature:install wrapper wrapper:install It will detect your OS and register Karaf Unomi as service. You can take a look on: http://karaf.apache.org/manual/latest/#_service_wrapper Regards JB On 13/10/2018 21:24, Michael Ghen wrote: > Does anyone have any instructions for running Unomi as a service on a VM? > > I tried running it as a service using systemd but was getting an error: > > Oct 13 19:09:52 unomi karaf[11710]: Error in initialization script: > /opt/unomi/etc/shell.init.script: String indexOct 13 19:09:52 unomi > karaf[11710]: karaf@root()> Error executing command: > java.lang.NullPointerException > > I'm just trying to get it running in my development environment, right > now I can only keep it running by opening a terminal and running > ./bin/karaf from there. > > Here's the systemd config file I made that doesn't seem to be working: > > [Unit] > Description=Unomi Server > After=network.target > > [Service] > WorkingDirectory=/opt/unomi > User=root > Group=root > Type=simple > ExecStart=/opt/unomi/bin/karaf > Restart=on-failure > RestartSec=5s > PrivateTmp=true > > [Install] > WantedBy=multi-user.target > -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com