Pi problems

Questions about joining this site
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Pi problems

Post by modesfan »

Hi andrewn,
You are running version 4. Though there was no improvement regarding the problem reported by you, I recommend to update to actual version 11.

Code: Select all

sudo service modes.sh stop
cd /home/pi/modesfiltered
curl https://www.live-military-mode-s.eu/Rpi/modesfiltered.zip > modesfiltered.zip
unzip modesfiltered -x variables.txt
sudo service modes.sh start
MW0JNI
Posts: 5
Joined: Sat Jan 10, 2015 2:54 pm

Re: Pi problems

Post by MW0JNI »

Hi modesfan,
i have checked that $prog_path s defined as /home/pi/modesfiltered, I then tried your second suggestion of running it directly from the folder and that works fine.

Please find below the startup script:
pi@piaware:~$ head /etc/init.d/modes.sh -n 30
#!/bin/bash
### BEGIN INIT INFO
# Provides: modes
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: modes initscript
### END INIT INFO


PROG="modesfiltered.jar"
PROG_PATH="/home/pi/modesfiltered"
PIDFILE="/var/run/modes.pid"
LOGFILE="/var/log/modes.log"

start() {
if [ -e $PIDFILE ]; then
## Program is running, exit with error.
echo "Error! $PROG is already running!" 1>&2
exit 1
else
## Change from /dev/null to something like /var/log/$PROG if you want to save output.
cd $PROG_PATH
touch $LOGFILE
java -jar $PROG > $LOGFILE 2>$LOGFILE &
echo "$PROG started"
touch $PIDFILE
fi
}
pi@piaware:~$

Thanks
Colin
MW0JNI
Posts: 5
Joined: Sat Jan 10, 2015 2:54 pm

Re: Pi problems

Post by MW0JNI »

Hi,
I appear to have fixed it by deleting and re-copying the script to /etc/init.d , I did try that before and it didn't work though.

Thanks
Colin
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Pi problems

Post by modesfan »

Hi Colin,
thanks for reporting the solution! There are a couple of new locations/participants with a wrong time setting. Please check again the local time of your RPi by typing: date.
If it is set wrong, correct by: sudo raspi-config. You can find more help here: https://www.raspberrypi.org/documentati ... -config.md.

Good hunting!
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

modesfan wrote:Hi andrewn,
You are running version 4. Though there was no improvement regarding the problem reported by you, I recommend to update to actual version 11.

Code: Select all

sudo service modes.sh stop
cd /home/pi/modesfiltered
curl https://www.live-military-mode-s.eu/Rpi/modesfiltered.zip > modesfiltered.zip
unzip modesfiltered -x variables.txt
sudo service modes.sh start
Thanks Albert - I did this and am now running v11.

Restarted pi last night and reporting in, however appears to have dropped out again sometime after 05:27 GMT this morning. I've looked in my /var/log/modes.log and I cannot see any errors so am not sure what is happening??

Last entry from my location, Tarporley, UK:

RCH301 2017-07-24 06:27:06 C-17A
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Pi problems

Post by modesfan »

Hello Nick,
I am not Albert. With Release 11 the reporting was changed. Simple errors as opposed to exceptions are reported only if the program was started with the optional parameter -loginfo. So if you want to see errors in the logfile you have to edit the start script:

sudo nano /etc/init.d/modes.sh

add -loginfo (inside "") to the line PROG="modesfiltered.jar" so that it looks like PROG="modesfiltered.jar -loginfo"
ctrl+o to save, followed by return
ctrl+x to exit

sudo service modes.sh restart

I have no idea why modesfiltered should stop working. We already checked disk space, and know that data is still coming. Maybe someone else can help.
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

Hi modesfan,

I think I traced the error at the point my location drops off line and stops sending messages.

Aug 03, 2017 3:06:45 PM modesproject.MSGsender run
INFO: sq was: 5432 db: 5432
Exception in thread "Thread-2" java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.substring(String.java:1963)
at modesproject.MSGsender.run(MSGsender.java:128)
at java.lang.Thread.run(Thread.java:745)
Aug 03, 2017 3:06:48 PM modesproject.Logging_ModeS main

Does this help diagnose the problem at all?

Thanks

Nick
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Pi problems

Post by modesfan »

Hi Nick,
Thank you very much! This precise error report helped. There was an unchecked access to a string. I have prepared a new Version 12. Please try it out!
Cheers!
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

modesfan wrote:Hi Nick,
Thank you very much! This precise error report helped. There was an unchecked access to a string. I have prepared a new Version 12. Please try it out!
Cheers!
Thanks modesfan - will let you know how I get on.

Nick
swiss_radar
Posts: 7
Joined: Sat Feb 13, 2016 6:33 am

Re: Pi problems

Post by swiss_radar »

Hi modesfan

I recently updated my PI with Release 11. I had two or three times nothing logged anymore on the live mode s site and the location wasn't online anymore. Then I restarted it and thing are working well.

Now I enabled the logging and saw some errors.

Restart at Aug 03, 2017 7:55:23 PM

First error at 2017/08/03, 20:15:27.174

Code: Select all

# Exception: Exc H6 StatusPI. Try to requeue.com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'modes.statusPI' doesn't exist
Some minutes later another one

Code: Select all

# Exception: Exc H7 Status PI com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'modes.statusPI' doesn't exist
This one at 2017/08/03, 20:51:44.734

Code: Select all

# Exception: Exc H3 LATLONPI. Try to requeue.com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'modes.LATLONPI' doesn't exist
There are multiple entries with these exception messages.


At the moment I see the following log entries

Code: Select all

INFO: sq was: 1000 db: 1000
Aug 05, 2017 2:29:53 PM modesproject.Logging_ModeS main
INFO: format error:
Aug 05, 2017 2:29:53 PM modesproject.Logging_ModeS main
INFO: [MSG, 3, 0, 0, 740731, 0, 2017/08/05, 14:29:53.402, 2017/08/05, 14:29:53.402, , 37125, , , , , , , 0, , 0, 0]
Aug 05, 2017 2:29:59 PM modesproject.MSGsender run
INFO: cs was: RJA117 db: RJA117
I can provide you the whole log file if it's useful for you.

What do these error messages mean?
Post Reply