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.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OP 2.xx
#6
(2019-10-02, 02:13 PM)SkipperEarly Wrote: even after re-installation localhost:3000 doesnt start.

this is what my cat command shows:
pi@openplotter:~ $ cat  /var/log/syslog | grep -i 'signalk-server'
Oct  2 14:15:36 openplotter signalk-server[372]: Could not parse security config
Oct  2 14:15:36 openplotter signalk-server[372]: ENOENT: no such file or directory, open '/home/pi/.signalk/security.json'
Oct  2 14:16:09 openplotter signalk-server[372]: signalk-server running at 0.0.0.0:[object Object]
Oct  2 14:16:09 openplotter signalk-server[372]: 2 Oct 14:16:09 - [info]
Oct  2 14:16:09 openplotter signalk-server[372]: Welcome to Node-RED
Oct  2 14:16:09 openplotter signalk-server[372]: ===================
.....

and indeed the /security.json file does not exist. How to get it?
any advise how to enable localhost?


Try http://localhost/ - assuming that your browser is running on the same machine as your Signal K server.

Longer explanation:
- a computer can have several network interfaces (think network cards, Ethernet or Wifi)
- all computers have a special network interface called loopback: it just loops back to the same machine, not using any external networking
- In computer networking, localhost is a hostname that means this computer. It is used to access the network services that are running on the host via the loopback network interface. https://en.wikipedia.org/wiki/Localhost
- an http service can run on one or more network interfaces
- 0.0.0.0 is a special address that refers to all network interfaces - in this context it means that the SK server can be reached on all interfaces, including the loopback interface that you get by using the hostname localhost
- the signalk server running on 0.0.0.0:[object Object] or signalk server running on 0.0.0.0:3000 tell you that the SK server has started successfully and is listening for incoming connections from your browser on port 80 OR port 3000. Port 80 is the default http port so you don't need to use that - http://localhost/  and http://localhost:80/  do the same thing. 
- [object Object] is (my) stupid logging code that is not very informative - usually it means that you have used signalk-server-setup with defaults so that the server is automatically started and managed by systemd, the process that manages background server processes on modern Linux systems.
- port numbers like 80 and 3000 here are like numbered doors of a house. If there is nobody listening for your "knock" on the particular door you are trying (a process listening for incoming connections on the port) you'll get the Connection refused error message. The root cause is usually either that the server is not on or you are trying a wrong port.

3000 is the default port for Node.js/Express based web servers, as port 80 is not available for normal user processes - like if you just type `signalk-server` on the command line.

So when you say localhost:3000 does not start a more accurate description would be the server seems to start based on the log entries but there is nothing listening on localhost:3000 - oops, maybe it is on port 80 now, let's try!  Smile

The security related messages are not related - they just tell that you have not activated security/access control on your SK server, and look needlessly like showstopper errors. You will get a security.json file if you turn security on on your server.
Reply


Messages In This Thread
OP 2.xx - by Luckbert - 2019-08-24, 12:01 PM
RE: OP 2.xx - by jim321 - 2019-08-24, 12:21 PM
RE: OP 2.xx - by MatsA - 2019-08-25, 10:57 AM
RE: OP 2.xx - by Luckbert - 2019-08-25, 01:14 PM
RE: OP 2.xx - by SkipperEarly - 2019-10-02, 02:13 PM
RE: OP 2.xx - by tkurki - 2019-10-02, 04:13 PM
RE: OP 2.xx - by SkipperEarly - 2019-10-02, 04:56 PM
RE: OP 2.xx - by Johnnysails - 2019-10-02, 08:49 PM
OP 2.xx - by tkurki - 2019-10-02, 10:06 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)