I followed instruction to install Lora app server under Ubuntu, after that, I tried to run
/etc/init.d/lora-app-server start
-bash: /etc/init.d/lora-app-server: No such file or directory
not sure if my installation was successful or not?
I suspect the following commands problem…it is same as Lora server. Any thoughts?
root@ecs-3929-1:~# apt-get install lora-app-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
lora-app-server
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 0 B/7,842 kB of archives.
After this operation, 19.0 MB of additional disk space will be used.
Selecting previously unselected package lora-app-server.
(Reading database … 113091 files and directories currently installed.)
Preparing to unpack …/lora-app-server_1.0.2_amd64.deb …
Unpacking lora-app-server (1.0.2) …
Setting up lora-app-server (1.0.2) …
Failed to issue method call: No such file or directory
Restarting LoRa App Server
Failed to issue method call: Unit lora-app-server.service failed to load: No such file or directory. See system logs and ‘systemctl status lora-app-server.service’ for details.
dpkg: error processing package lora-app-server (–configure):
subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
lora-app-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
do i need download “lora-app-server_1.0.2_amd64.deb”?
root@vagrant-ubuntu-trusty-64:/home/vagrant# apt install lora-app-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
lora-app-server
0 upgraded, 1 newly installed, 0 to remove and 156 not upgraded.
Need to get 10.9 MB of archives.
After this operation, 22.7 MB of additional disk space will be used.
Get:1 https://artifacts.loraserver.io/packages/2.x/deb/ stable/main lora-app-server amd64 2.2.0 [10.9 MB]
Fetched 10.9 MB in 1s (8,697 kB/s)
Selecting previously unselected package lora-app-server.
(Reading database ... 63103 files and directories currently installed.)
Preparing to unpack .../lora-app-server_2.2.0_amd64.deb ...
Unpacking lora-app-server (2.2.0) ...
Setting up lora-app-server (2.2.0) ...
-------------------------------------------------------------------------------------
A sample configuration file has been copied to: /etc/lora-app-server/lora-app-server.toml
After setting the correct values, run the following command to start LoRa App Server:
$ sudo /etc/init.d/lora-app-server start
-------------------------------------------------------------------------------------
Generating a 4096 bit RSA private key
...................................................++
........................++
writing new private key to '/etc/lora-app-server/certs/http-key.pem'
-----
-------------------------------------------------------------------------------------------
A self-signed TLS certificate has been generated and written to: /etc/lora-app-server/certs
This is convenient for testing, but should be replaced with a proper certificate!
-------------------------------------------------------------------------------------------
Adding system startup for /etc/init.d/lora-app-server ...
/etc/rc0.d/K20lora-app-server -> ../init.d/lora-app-server
/etc/rc1.d/K20lora-app-server -> ../init.d/lora-app-server
/etc/rc6.d/K20lora-app-server -> ../init.d/lora-app-server
/etc/rc2.d/S20lora-app-server -> ../init.d/lora-app-server
/etc/rc3.d/S20lora-app-server -> ../init.d/lora-app-server
/etc/rc4.d/S20lora-app-server -> ../init.d/lora-app-server
/etc/rc5.d/S20lora-app-server -> ../init.d/lora-app-server
root@vagrant-ubuntu-trusty-64:/home/vagrant# /etc/init
init/ init.d/ initramfs-tools/
root@vagrant-ubuntu-trusty-64:/home/vagrant# /etc/init.d/lora-app-server start
* Starting LoRa App Server
Please note the following message:
-------------------------------------------------------------------------------------
A sample configuration file has been copied to: /etc/lora-app-server/lora-app-server.toml
After setting the correct values, run the following command to start LoRa App Server:
$ sudo /etc/init.d/lora-app-server start
-------------------------------------------------------------------------------------
I’m not sure if you customized anything to your Ubuntu 14.04 installation, but by default I don’t think systemd is installed by default. Please see also the post-install.sh script which is executed after installation: https://github.com/brocaar/loraserver/blob/master/packaging/scripts/post-install.sh. Maybe that gives you some clues what is going wrong.
To use systemd, I recommend to use one of the following distributions which by default are using systemd:
Ubuntu 16.04 LTS
Ubuntu 18.04 LTS
Debian 9 (Stretch)
I have tested installing the latest lora-app-server on Ubuntu 14.04 (clean install) and can not reproduce your issue.