Error Keeping VRS running by cron

Bug reports and questions about running Virtual Radar Server on Linux
Post Reply
Hardy
Posts: 8
Joined: Thu Jun 14, 2012 11:44 am

Error Keeping VRS running by cron

Post by Hardy » Wed Oct 17, 2018 11:04 am

Hello to all,
I am referring to: Re: Keep VRS running after closing telnet session
Post by argz » 27. Dec 2016, 12:38

Prior the cron "installation" VRS works just perfect, Silhouettes and Flags are loading almost instantly.
I followed the instructions to starts VRS during Boot.
But... The VRS Main page loads very, very slow the Silhouettes and Flags.
The WebAdmin Plugin keeps asking for the Username and Password.
Erasing (crontab -e) the entry @reboot /home/pi/vrs.sh,
Rebooting and starting VRS manualy by "mono /home/pi/vrs/VirtualRadar.exe -nogui" and everything works perfect as before.
(Maybe the VRS loads during Boot to quickly and RPI is not yet ready).

I am using RaspianStrechLight-4.14.50-v7 and the latest VRS & Plugins.
And I am an absolute beginner.
Any Ideas?
Best Regards – Hardy

Hardy
Posts: 8
Joined: Thu Jun 14, 2012 11:44 am

Re: Error Keeping VRS running by cron

Post by Hardy » Thu Oct 18, 2018 2:09 pm

I have to correct :
Starting VRS via crontab or rc.local makes no change.
VRS does not display Silhouettes or Flags.
VRS WebAdmin keeps asking for Password.
If I start VRS manually (Putty) then VRS works normal.

Hardy
Posts: 8
Joined: Thu Jun 14, 2012 11:44 am

Re: Error Keeping VRS running by cron

Post by Hardy » Fri Oct 19, 2018 11:51 am

Update:

I have been playing around and noticed the following:
I have a script called vrs.sh :
#!/bin/sh
echo "Hallo, Starting mono VRS"
echo "Hallo Hardy starting mono & VRS" > /tmp/vrs.txt
mono /home/pi/vrs/VirtualRadar.exe –nogui

If I invoke the script as following from PuTTY: bash vrs.sh
everything looks & works normal.

If I invoke the script as following from PuTTY: sudo bash vrs.sh
then the Silhouettes & Flags are not displayed and the WebAdmin Plugin is not working.

I think I have screwed something up with some privileges, but I don’t know where to look and how to fix it up.

Best regards
Hardy

Datamix
Posts: 65
Joined: Thu Aug 10, 2017 7:36 pm

Re: Error Keeping VRS running by cron

Post by Datamix » Fri Oct 19, 2018 6:47 pm

try:

Code: Select all

chmod +x vrs.sh
and then run it again
VRS: v3 (30-SEP-2018)

Hardy
Posts: 8
Joined: Thu Jun 14, 2012 11:44 am

Re: Error Keeping VRS running by cron

Post by Hardy » Sat Oct 20, 2018 8:09 am

thanks for your sugestion,
sudo chmod +x vrs.sh
makes no change.

Datamix
Posts: 65
Joined: Thu Aug 10, 2017 7:36 pm

Re: Error Keeping VRS running by cron

Post by Datamix » Sat Oct 20, 2018 9:03 am

do not use "sudo" in this case. user "pi" should be able to execute it.
VRS: v3 (30-SEP-2018)

Hardy
Posts: 8
Joined: Thu Jun 14, 2012 11:44 am

Re: Error Keeping VRS running by cron

Post by Hardy » Sat Oct 20, 2018 10:14 am

i am geting:
pi@raspberrypi:~ $ chmod +x vrs.sh
chmod: changing permissions of 'vrs.sh': Operation not permitted
pi@raspberrypi:~ $

agw
Posts: 2213
Joined: Fri Feb 17, 2012 3:20 am

Re: Error Keeping VRS running by cron

Post by agw » Fri Nov 09, 2018 4:30 pm

Sorry for the delay in replying. If you do

Code: Select all

ls -l vrs.sh
who owns the file? I imagine it's probably not the pi user. If you

Code: Select all

sudo chown pi vrs.sh
and then try chmod +x vrs.sh then that should give you execute permission on the file.

Raffles
Posts: 8
Joined: Thu Nov 16, 2017 3:34 pm

Re: Error Keeping VRS running by cron

Post by Raffles » Thu Mar 14, 2019 7:34 pm

Hardy wrote:
Sat Oct 20, 2018 10:14 am
i am geting:
pi@raspberrypi:~ $ chmod +x vrs.sh
chmod: changing permissions of 'vrs.sh': Operation not permitted
pi@raspberrypi:~ $

enter

Code: Select all

sudo -i  
first
as pi privs are very strange on raspian

Post Reply