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 ktul_fueler,

I appreciate it very much that you are testing the tool.

One of the errors you reported was:

Lat
format error
[MSG, 3, 1, 1, ABF2EA, 1, 2016/10/29, 14:17:48.183, 2016/10/29, 14:17:48.212, , 35350, , , , , , , , , , 0]

These three lines in the output mean that the format of the message (MSG) given in squared brackets is not correct. Messages of type 3 (second value) have to contain the position of the plane with Latitude (value 15) and Longitude (value 16). This information is missing. The tool reports the fact and refuses the message.

Flights of Southwest or American would be sorted out by a good blacklist anyway.

Cheers!
ktul_fueler
Posts: 10
Joined: Tue Aug 02, 2016 6:27 pm

Re: Pi problems

Post by ktul_fueler »

Oh, ok. I did black list most of the commercial airlines that flight to and from where I am located. Thanks again!
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

I have a similar problem to what ktul described whereby modesfiltered.jar stops sending data to the mode s server after a couple of days, for unknown reasons. The disappearance of my site from the locations online and termination of output to the log file happens once the below message STOPS appearing in the modes log:

Executed com.mysql.jdbc.JDBC4PreparedStatement@12593aa: INSERT IGNORE INTO statusPI(....)

How do I find out what is stopping the above task/job from continuing to function??

Thanks

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

Re: Pi problems

Post by modesfan »

Hello andrewn,

Thank you for reporting the error! It's interesting because until know I did not see a modesfiltered.jar stopping without external interaction.

Please tell us the version you are using:

Code: Select all

head /var/log/modes.log
Is there still input from dump1090?:

Code: Select all

nc 127.0.0.1 30003
Is there free disk space?:

Code: Select all

df -h
Is it running at all?:

Code: Select all

ps -ax | grep java
Cheers!
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

modesfan wrote:Hello andrewn,

Thank you for reporting the error! It's interesting because until know I did not see a modesfiltered.jar stopping without external interaction.

Please tell us the version you are using:

Code: Select all

head /var/log/modes.log
Is there still input from dump1090?:

Code: Select all

nc 127.0.0.1 30003
Is there free disk space?:

Code: Select all

df -h
Is it running at all?:

Code: Select all

ps -ax | grep java
Cheers!
Hi,

Sorry for the delay but I was away with work. Here's the answer to your q's..

Q1
Image

Q2
Yes - would appear so given the screen goes crazy with text updates when I enter the command given...

Q3
Image

Q4
Image

Thanks again for your help.

Regards

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

Re: Pi problems

Post by modesfan »

Hello Nick,

did you gather the data when the problem just occurred?

Q1: Unfortunately has not been answered because of an exception. Could you please restart the program "sudo service modes.sh restart" and test again "head /var/log/modes.log" ?
Q2: There is data from port1, so no problem.
Q3: Disk space also seems to be no problem.
Q4: The program is running.

Are you using the second port option? Please type: "cat /etc/init.d/modes.sh".

If so, check whether there is data coming from it: "nc 127.0.0.1 port2" with port2 properly set.

May it be that the program seems to stop at Fridays? Generally there is very little mil traffic at weekends. So this could be an explanation.

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

Re: Pi problems

Post by andrewn »

Hi Albert,

Thanks for the follow up - see responses below:

Q1:
Image

Q2:
login as: pi
pi@192.168.1.XXX's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jul 9 20:40:08 2017 from desktop-7uv2g36
pi@raspberrypi:~ $ cat /etc/init.d/modes.sh
#!/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() {

sleep 5

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
}

stop() {
if [ -e $PIDFILE ]; then
## Program is running, so stop it
echo "$PROG is running, PIDFILE exists"
killall java
rm -f $PIDFILE
echo "$PROG stopped, PIDFILE deleted"
else
## Program is not running, exit with error.
echo "Error! $PROG not started! No PIDFILE found." 1>&2
exit 1
fi
}

## Check to see if we are running as root first.
## Found at http://www.cyberciti.biz/tips/shell-roo ... cript.html
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi

case "$1" in
start)
start
exit 0
;;
stop)
stop
exit 0
;;
reload|restart|force-reload)
stop
start
exit 0
;;
**)
echo "Usage: $0 {start|stop|reload}" 1>&2
exit 1
;;
esac
exit 0
pi@raspberrypi:~ $
Last edited by andrewn on Fri Jul 21, 2017 2:49 pm, edited 1 time in total.
MW0JNI
Posts: 5
Joined: Sat Jan 10, 2015 2:54 pm

Re: Pi problems

Post by MW0JNI »

Hi Guys,
not sure what is going wrong for me but all I get is an error saying unable to access modesfiltered.jar when i try to run the script.
login as: pi
pi@192.168.1.xxx's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jul 12 22:01:50 2017 from


pi@piaware:~$ sudo apt-get update
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Hit http://repo.feed.flightradar24.com flightradar24 InRelease
Hit http://flightaware.com jessie InRelease
Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [170 kB]
Get:4 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,533 kB]
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://repo.feed.flightradar24.com flightradar24/raspberrypi-stable armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_US
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_US
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Hit http://flightaware.com jessie/piaware armhf Packages
Ign http://repo.feed.flightradar24.com flightradar24/raspberrypi-stable Translation-en_US
Ign http://repo.feed.flightradar24.com flightradar24/raspberrypi-stable Translation-en
Ign http://flightaware.com jessie/piaware Translation-en_US
Ign http://flightaware.com jessie/piaware Translation-en
Get:5 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [43.3 kB]
Get:6 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [84.2 kB]
Get:7 http://mirrordirector.raspbian.org jessie/firmware armhf Packages [1,232 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/firmware Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/firmware Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Fetched 9,870 kB in 1min 54s (86.3 kB/s)
Reading package lists... Done
pi@piaware:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@piaware:~$ cd /home/pi/modesfiltered
pi@piaware:~/modesfiltered$ cp /home/pi/modesfiltered/modes.sh /etc/init.d/
cp: cannot create regular file ‘/etc/init.d/modes.sh’: Permission denied
pi@piaware:~/modesfiltered$ sudo cp /home/pi/modesfiltered/modes.sh /etc/init.d/
pi@piaware:~/modesfiltered$ sudo chmod +x /etc/init.d/modes.sh
pi@piaware:~/modesfiltered$ sudo nano /etc/init.d/modes.sh
pi@piaware:~/modesfiltered$
pi@piaware:~/modesfiltered$ sudo service modes start
Warning: Unit file of modes.service changed on disk, 'systemctl daemon-reload' recommended.
pi@piaware:~/modesfiltered$ sudo systemctl daemon-reload
pi@piaware:~/modesfiltered$ sudo service modes start
pi@piaware:~/modesfiltered$ cat /var/logs/modes.log
cat: /var/logs/modes.log: No such file or directory
pi@piaware:~/modesfiltered$ cat /var/log/modes.log
Error: Unable to access jarfile modesfiltered.jar
pi@piaware:~/modesfiltered$ cd /etc/init.d/
pi@piaware:/etc/init.d$ ls
alsa-utils hostname.sh mountnfs.sh rmnologin
bootlogs hwclock.sh networking rsyslog
bootmisc.sh ifplugd ntp sendsigs
cgmanager killprocs piaware single
cgproxy kmod plymouth skeleton
checkfs.sh lighttpd plymouth-log ssh
checkroot-bootclean.sh loadcpufreq procps sudo
checkroot.sh modes.sh raspi-config udev
cpufrequtils motd rc udev-finish
cron mountall-bootclean.sh rc.local umountfs
dbus mountall.sh rcS umountnfs.sh
fake-hwclock mountdevsubfs.sh README umountroot
fr24feed mountkernfs.sh reboot urandom
halt mountnfs-bootclean.sh resolvconf x11-common
pi@piaware:/etc/init.d$ del modes.sh
-bash: del: command not found
pi@piaware:/etc/init.d$ sudo rm modes.sh
pi@piaware:/etc/init.d$ ls
alsa-utils hostname.sh networking rsyslog
bootlogs hwclock.sh ntp sendsigs
bootmisc.sh ifplugd piaware single
cgmanager killprocs plymouth skeleton
cgproxy kmod plymouth-log ssh
checkfs.sh lighttpd procps sudo
checkroot-bootclean.sh loadcpufreq raspi-config udev
checkroot.sh motd rc udev-finish
cpufrequtils mountall-bootclean.sh rc.local umountfs
cron mountall.sh rcS umountnfs.sh
dbus mountdevsubfs.sh README umountroot
fake-hwclock mountkernfs.sh reboot urandom
fr24feed mountnfs-bootclean.sh resolvconf x11-common
halt mountnfs.sh rmnologin
pi@piaware:/etc/init.d$ sudo cp /home/pi/modesfiltered/modes.sh /etc/init.d/
pi@piaware:/etc/init.d$ ls
alsa-utils hostname.sh mountnfs.sh rmnologin
bootlogs hwclock.sh networking rsyslog
bootmisc.sh ifplugd ntp sendsigs
cgmanager killprocs piaware single
cgproxy kmod plymouth skeleton
checkfs.sh lighttpd plymouth-log ssh
checkroot-bootclean.sh loadcpufreq procps sudo
checkroot.sh modes.sh raspi-config udev
cpufrequtils motd rc udev-finish
cron mountall-bootclean.sh rc.local umountfs
dbus mountall.sh rcS umountnfs.sh
fake-hwclock mountdevsubfs.sh README umountroot
fr24feed mountkernfs.sh reboot urandom
halt mountnfs-bootclean.sh resolvconf x11-common
pi@piaware:/etc/init.d$ sudo chmod +x /etc/init.d/modes.sh
pi@piaware:/etc/init.d$ sudo service modes start
Warning: Unit file of modes.service changed on disk, 'systemctl daemon-reload' recommended.
pi@piaware:/etc/init.d$ sudo systemctl daemon-reload
pi@piaware:/etc/init.d$ sudo service modes start
pi@piaware:/etc/init.d$ cat /var/log/modes.log
Error: Unable to access jarfile modesfiltered.jar
pi@piaware:/etc/init.d$ sudo nano modes.sh
pi@piaware:/etc/init.d$ sudo rm modes.sh
pi@piaware:/etc/init.d$ cd /home/pi/modesfiltered
pi@piaware:~/modesfiltered$ ls
blacklist.txt lib modesfiltered.zip modes.sh variables.txt
callsigns.txt modesfiltered.jar modes.jar README.TXT whitelist.txt
pi@piaware:~/modesfiltered$ sudo nano modes.sh
pi@piaware:~/modesfiltered$ sudo cp /home/pi/modesfiltered/modes.sh /etc/init.d/
pi@piaware:~/modesfiltered$ sudo chmod +x /etc/init.d/modes.sh
pi@piaware:~/modesfiltered$ sudo systemctl daemon-reload
pi@piaware:~/modesfiltered$ sudo service modes start
pi@piaware:~/modesfiltered$ cat /var/log/modes.log
Error: Unable to access jarfile modesfiltered.jar
pi@piaware:~/modesfiltered$
Running PiAware 3.5 on a pi b+

Anyone got any ideas how to fix?

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

Re: Pi problems

Post by modesfan »

Hello MW0JNI,
check the start script: Is PROG_PATH properly defined? Is "cd $PROG_PATH" done before executing the jarfile?
Go to the directory where the jarfile is and try excuting there: java -jar modesfiltered.jar
Show your start script: head /etc/init.d/modes.sh -n 30
andrewn
Posts: 9
Joined: Sun Jan 15, 2017 6:04 pm

Re: Pi problems

Post by andrewn »

andrewn wrote:Hi Albert,

Thanks for the follow up - see responses below:

Q1:
Image

Q2:
login as: pi
pi@192.168.1.XXX's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jul 9 20:40:08 2017 from desktop-7uv2g36
pi@raspberrypi:~ $ cat /etc/init.d/modes.sh
#!/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() {

sleep 5

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
}

stop() {
if [ -e $PIDFILE ]; then
## Program is running, so stop it
echo "$PROG is running, PIDFILE exists"
killall java
rm -f $PIDFILE
echo "$PROG stopped, PIDFILE deleted"
else
## Program is not running, exit with error.
echo "Error! $PROG not started! No PIDFILE found." 1>&2
exit 1
fi
}

## Check to see if we are running as root first.
## Found at http://www.cyberciti.biz/tips/shell-roo ... cript.html
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi

case "$1" in
start)
start
exit 0
;;
stop)
stop
exit 0
;;
reload|restart|force-reload)
stop
start
exit 0
;;
**)
echo "Usage: $0 {start|stop|reload}" 1>&2
exit 1
;;
esac
exit 0
pi@raspberrypi:~ $

Now re-embedded the image with the help of flickr!
Post Reply