Rocrail and Raspbian Stretch, Problem with start/sop server

Moderator: Moderators

Rocrail and Raspbian Stretch, Problem with start/sop server

Postby Antogar » 21.12.2017, 08:36

Hi,
I installed Raspbian Lite (with update/upgrade) and then Rocrail 13250 just for test on another SD card. The server runs normally at start-up, Rocview is ok, but if I try to stop ans start the server the typical commands sudo service rocrail start/stop seem not work properly: the server stops with the stop command but if i try to restart, Rocview doesn't connect saying that the server is unavailable (even if the command sudo service rocrail status shows the server running).
If i try several time to start/stop... at the end the server restart normally and Rocview can connect showing the demo layout.
Everything runs normally with full Raspbian Stretch.

There is something missing with Lite installation of Raspbian needed by Rocrail ?

Thank in advance

Regards!
Last edited by Antogar on 02.02.2018, 18:32, edited 3 times in total.
Antogar
 

Re: Rocrail and Raspbian Stretch Lite

Postby Pirat-Kapitan » 21.12.2017, 10:08

Moin,
why do You not use the full version stretch with pixel desktop?
I see no reason to use the light version.

best regards
Johannes
Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 

Re: Rocrail and Raspbian Stretch Lite

Postby Liviu M » 21.12.2017, 11:04

Hi Johannes,

ich fand die Lite Variante ausreichend für ein Rocrail Headless Server auf einem Raspberry Pi (B). Bis auf libusb-1.0-dev hat es alles, dass man für den Server Kompilierung braucht, beinhaltet.
Mosquitto, den ich extra installiert habe, zählt hier natürlich nicht.
Warum Lite? Weil ich kein X brauche und alle (Download, Installation - Update/Upgrade) schneller erledigt waren. Und noch eine Liste, die aber langweilig ist.
Ob eine schlankere Installation in Betrieb Vorteile hat, kann nicht sagen, aber ich hoffe es (habe ein Raspi 1, ist nicht sehr schnell, jede Dienst weniger ist mehr).

Liviu

LE Schon wieder falsche Sprache. Übersetzung folgt.

Sorry, I've used the wrong language. (Short) Translation:
I installed the Lite version because I don't need a GUI (I use it as a headless server) and the downloading and installation (+ update) is faster.
To compile the Rocrail server I have hat to install only the libusb-1.0-dev.
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocrail and Raspbian Stretch Lite

Postby Pirat-Kapitan » 21.12.2017, 12:11

Moin Liviu,
Does the raspbian stretch nightlybuild run on a stretch light os?
The normal rocrail user needs no access to the source and has to use prebuild installation packages.
To buy a raspi mark 1 could be a little difficult, mark 3 is the version of today.

I think, Antongars setting up the daemon might have a mistake.
Setting a caemon changed from wheezy to stretch.

Best regards
Johannes
Ps i do not use stretch lite, i can not provide help to Antongar
Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 

Re: Rocrail and Raspbian Stretch Lite

Postby Liviu M » 21.12.2017, 12:40

Hi Johannes,

No I haven't tried to install prebuild packages, I've just gave you some reasons foe using the Raspbian Lite. :beer:
I even don't know if installing only the server is possible. If yes (*), I can give it a try.
I'll look on it, but after Christmas holidays (I'll be away from home, without testing possibilities).

(*) If not, maybe is an aspect Rob can consider - nightly builds for server only.

Cheers,
Liviu
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocrail and Raspbian Stretch Lite

Postby Liviu M » 21.12.2017, 12:45

Me again (and I suppose off-topic): I don't see any reason for a Raspbian Desktop + Rocview on Raspberry PI (not matter which version).
I find a headless server (without GUI) + a "real PC/Notebook" for Rocview (for setup) + mobile clients (AndRoc or RocWeb) a much better configuration.

:beer:
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocrail and Raspbian Stretch Lite

Postby Pirat-Kapitan » 21.12.2017, 14:59

Liviu M wrote:Me again (and I suppose off-topic): I don't see any reason for a Raspbian Desktop + Rocview on Raspberry PI (not matter which version).

Moin Liviu,
combat garden railroading with mobile command station is my reason. I do not like to carry a separate PC too. Rocview runs on the RasPi with 5" Display.

But I am still waiting of Antogars answer why.

best reagrds
Johannes
Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 

Re: Rocrail and Raspbian Stretch Lite

Postby Antogar » 21.12.2017, 16:54

Hi to all and thanks for your replies.

I am going to use Raspi to run just the server, it will be fixed to the track layout (it is a table in the living room) without a monitor, so I don't need GUI. A laptop will be used to run Rocview, also a tablet and/or other mobile stuff.

I already have a stable configuration with full Raspbian installation. The system runs at start-up with command line interface, GUI is used just for debug/configuration through VNC with a remote laptop. I made two simple python script that start/stop the rocrail server with two buttons and display the status with three leds (Power ON/OFF, Auto mode ON/OFF, Server running ON/OFF). In the photo you can see the system under test...
So... In order to obtain a system tailored just for this scope (it is just a deepening, I already have a working system), I tried to install Raspbian Lite but I noted that the commands sudo service rocrail ... do not work properly, infact the buttons don't have always success, and I would just to understand why.

Raspi.JPG


Bye :D
You do not have the required permissions to view the files attached to this post.
Antogar
 

Re: Rocrail and Raspbian Stretch - problem with update

Postby Antogar » 12.01.2018, 19:23

Hi to all

I come back to this topic because I updated the system to the last version of Raspian Scretch (full, not lite) and Rocrail (13390) and I noted again that the commands sudo service rocrail start/stop seem not work properly: the server stops with the stop command but if i try to restart, Rocview doesn't connect showing the error that the server is unavailable (even if the command sudo service rocrail status shows the server running).

Are the command sudo service rocrail stop/start the correct way to stop and restart the server ? are there any precautions to adopt ?

thank you in advance

BR
antogar
Antogar
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby Antogar » 02.02.2018, 18:38

Hi
I changed the title of the post because I still having problems with stop and restart the server running on Raspberry.

I have updated the repository and Rocrail, but still the commands sudo service rocrail start/stop seem not work properly: the server stops with the stop command but if i try to restart, Rocview doesn't connect showing the error that the server is unavailable (even if the command sudo service rocrail status shows the server running).
I have to try several times with the sequence sudo service rocrail stop/start before having the server running again and Rocview correctly connected from a laptop.

Can someone hep to understand ?

thank you in advance

BR
antogar
Antogar
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby rjversluis » 02.02.2018, 19:08

I have updated the repository and Rocrail,

which repository?

Running the Rocrail Server as service is not for novice users but for those with Unix/Linux know how.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby Antogar » 02.02.2018, 19:36

rjversluis wrote:which repository?


update raspian system


Running the Rocrail Server as service is not for novice users but for those with Unix/Linux know how.


...and for this reason I do not deserve an answer ?
I thought that a forum goal is to help people, not take funny
Antogar
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby rjversluis » 02.02.2018, 19:45

I'm not making fun; Just pointed out that what you want to do is not for novice Linux users.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby Pirat-Kapitan » 02.02.2018, 20:43

Antogar wrote:I thought that a forum goal is to help people, not take funny

Moin,
the forum is rocrail minded, not a user help desk for linux ! Running rocrail server as a service needs to call the service itself and not rocrail.
Please reference Your sequence "sudo service rocrail stop/start" with a specified link to the wiki, otherwise I suggest it is misspelled.

best regards
Johannes
Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 

Re: Rocrail and Raspbian Stretch, Problem with start/sop se

Postby LDG » 02.02.2018, 22:27

Hi Antogar,

you are getting into a trap with open socket handling in linux kernel.

Avoid stopping a network server/service if there are still some open/active connections. The server socket will stay "on hold" for some timeout (up to about 2 minutes!) and will not be able to get (re)opened before the "half open" connections completely timed out in the kernel tables.
Starting the rocrail server too early will lead to a server trace that will contain a line like this:
Code: Select all
20180202.221356.255 r9999E cconmngr OSocket  0563 bind() failed [98] [Address already in use]


Hint: First close all rocview/androc/rocweb connections then stop the rocrail server.
If all client connections were closed you will be able to start rocrail server again immediately with the ability to open the server port successfully and the you can restart/reconnect the clients like rocview.

Regards,
Lothar
LDG
Site Admin
 

Next

Return to Installation