This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I make signalK server load at boot?
#1
Re-installed Raspian Buster and then Openplotter settings 2.0.17. From that I installed Signalk 2.0.6

The installtion didn't so any errors, and claimed the signlk server is running on port 3000. 

This isn't the case though. A simple 'sudo netstat -tlnp | grep 3000" does not show anything. 

I tried re-installing signalk but still the server doesn't load at boot. 

I then manually ran an installation of it, but again it would not run at boot. The server runs fine if I manually load it by typing 'signalk-server' but i really need it running from boot. 

I don't know if this is a problem with OP 2.0.17 and/or Signalk 2.0.6 or even the current version of Buster, as my other sim card had slightly older versions of all the software.
  Reply
#2
try
Code:
sudo signalk-server-setup

there you can also change it to port :80 if you want
mare liberum
  Reply
#3
(12-07-2019, 12:28 PM)jim321 Wrote: try
Code:
sudo signalk-server-setup

there you can also change it to port :80 if you want

That allows me to setup the server but the server still doesn't run a boot. It's like whatever startup script is required either isn't working or isn't present

Code:
/ ___|  (_)   __ _   _ __     __ _  | |   | |/ /
\___ \  | |  / _` | | '_ \   / _` | | |   | ' /
 ___) | | | | (_| | | | | | | (_| | | |   | . \
|____/  |_|  \__, | |_| |_|  \__,_| |_|   |_|\_\
             |___/                              

YOU ARE LOGGED IN AS pi AND THE SERVER WILL BE STARTED AS THIS USER

? Enter the location to store server configuration: /home/pi/.signalk
? Do you want to update the existing configuration or start from scratch Update
? Enter your vessel name: Myboat
? Enter your mmsi if you have one:

The Signal K default port is 3000
Port 80 does not require ":3000" in the browser and app interfaces

? Do you want to use port 80? No
? Do you want to enable SSL? No
  Creating your server defaults at /home/pi/.signalk/defaults.json
  Creating your server settings at /home/pi/.signalk/settings.json
  Creating package.json
  Creating your server startup script at /home/pi/.signalk/signalk-server
  Updating file ownership and permissions
  Setting up your server to start Signal K when booting up
  Running 'systemctl daemon-reload'
  Running 'systemctl enable signalk.service'
  Running 'systemctl enable signalk.socket'
  Running 'systemctl stop signalk.service'
  Running 'systemctl restart signalk.socket'
  Running 'systemctl restart signalk.service'
pi@raspberrypi:~ $

so I then run netstat to check what is running on port 3000 and there is nothing. I ran a test on port 22 just to check netstat was reporting correctly. 

Code:
pi@raspberrypi:~ $ sudo netstat -tlnp | grep 3000
pi@raspberrypi:~ $ sudo netstat -tlnp | grep 22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      490/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      490/sshd            
pi@raspberrypi:~ $
  Reply
#4
i dont know what the problem could be then
tkurki might be able to help..
or burn the img. its already installed and starts on boot
https://mega.nz/#!LNpB1K5Q!a4QaE5WDtH0wc...pnsLHYt0Xk
mare liberum
  Reply
#5
Thanks I'll just use that image and save the hassle.

Cheers.
  Reply
#6
If something doesn’t work first take a look at syslog.

Also try

sudo systemctl status signalk.service
sudo systemctl status signalk.socket




Sent from my iPhone using Tapatalk
  Reply
#7
Some background to this issue...

Running "sudo signalk-server-setup" is the same than installing SIgnal K from the openplotter-signalk-installer app.
Signal K runs as a service. After installing you should have 2 files in /etc/systemd/system: signalk.service and signalk.socket
to start signal k run:
sudo systemctl start signalk.service
sudo systemctl start signalk.socket

and to make signal k to start at startup run:
sudo systemctl enable signalk.service
sudo systemctl enable signalk.socket

If something goes wrong you should have error entries in /var/log/syslog file
  Reply
#8
I've got a RP3+ with OP2.0. Signal K service doesn't start.

I followed the advises above:

pi@openplotter:/etc/systemd/system $ sudo systemctl start signalk.service
pi@openplotter:/etc/systemd/system $ sudo systemctl start signalk.socket
pi@openplotter:/etc/systemd/system $ sudo systemctl enable signalk.service
pi@openplotter:/etc/systemd/system $ sudo systemctl enable signalk.socket
pi@openplotter:/etc/systemd/system $ sudo systemctl status signalk.service
* signalk.service
Loaded: loaded (/etc/systemd/system/signalk.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-01-03 11:13:22 CET; 1min 44s ago
Main PID: 1459 (code=exited, status=127)

Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Service RestartSec=100ms expired, scheduling restart
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Scheduled restart job, restart counter is at 5.
Jan 03 11:13:22 openplotter systemd[1]: Stopped signalk.service.
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Start request repeated too quickly.
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Failed with result 'exit-code'.
Jan 03 11:13:22 openplotter systemd[1]: Failed to start signalk.service.
Smile Daniel, Sailing Rocinante
  Reply
#9
(01-03-2020, 06:59 AM)la0fd Wrote: I've got a RP3+ with OP2.0. Signal K service doesn't start.

I followed the advises above:

pi@openplotter:/etc/systemd/system $ sudo systemctl start signalk.service
pi@openplotter:/etc/systemd/system $ sudo systemctl start signalk.socket
pi@openplotter:/etc/systemd/system $ sudo systemctl enable signalk.service
pi@openplotter:/etc/systemd/system $ sudo systemctl enable signalk.socket
pi@openplotter:/etc/systemd/system $ sudo systemctl status signalk.service
* signalk.service
  Loaded: loaded (/etc/systemd/system/signalk.service; enabled; vendor preset: enabled)
  Active: failed (Result: exit-code) since Fri 2020-01-03 11:13:22 CET; 1min 44s ago
Main PID: 1459 (code=exited, status=127)

Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Service RestartSec=100ms expired, scheduling restart
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Scheduled restart job, restart counter is at 5.
Jan 03 11:13:22 openplotter systemd[1]: Stopped signalk.service.
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Start request repeated too quickly.
Jan 03 11:13:22 openplotter systemd[1]: signalk.service: Failed with result 'exit-code'.
Jan 03 11:13:22 openplotter systemd[1]: Failed to start signalk.service.

Are you on Raspbian?
Have you installed openplotter-signalk-installer from openplotter-settings? any error during installation?
Do you have latest versions?

If you want and out of the box system use these images: https://nx8035.your-storageshare.de/s/sL9doDML7P4CQDo
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)