unable to install on Rpi

Questions about joining this site
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

unable to install on Rpi

Post by CaLi »

I have a Rpi2 that i have a flightaware image on to feed adsb.

i have followed the instructions here.. https://www.live-military-mode-s.eu/Rpi/ but can not get it to install.

i am ok on a Rpi but i am by no means an expert, i have a few friends that have better knowledge than me and they can not get it to work either.

It will not make makes modes.sh executable with the command "sudo chmod +x /etc/init.d/modes.sh"

Hopefully someone here can assist as to why it wont install. Im currently using my PC to feed to live mil but this is not ideal as it means leaving the PC on all day.

Thanks in advance

Pi info..

pi@piaware:~$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
pi@piaware:~$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@piaware:~$ free -m -t
total used free shared buffers cached
Mem: 924 670 254 26 48 489
-/+ buffers/cache: 132 792
Swap: 0 0 0
Total: 924 670 254
pi@piaware:~$ cd /etc/init.d
pi@piaware:/etc/init.d$ ls -l
total 304
-rwxr-xr-x 1 root root 4152 Feb 8 2015 360r-mlat-test
-rwxr-xr-x 1 root root 5340 Oct 18 2013 alsa-utils
-rwxr-xr-x 1 root root 1276 Apr 6 2015 bootlogs
-rwxr-xr-x 1 root root 1248 Apr 6 2015 bootmisc.sh
-rwxr-xr-x 1 root root 3565 Sep 9 2014 cgmanager
-rwxr-xr-x 1 root root 3354 Sep 9 2014 cgproxy
-rwxr-xr-x 1 root root 3807 Apr 6 2015 checkfs.sh
-rwxr-xr-x 1 root root 1072 Apr 6 2015 checkroot-bootclean.sh
-rwxr-xr-x 1 root root 9290 Apr 6 2015 checkroot.sh
-rwxr-xr-x 1 root root 1379 Dec 9 2011 console-setup
-rwxr-xr-x 1 root root 2489 May 6 2012 cpufrequtils
-rwxr-xr-x 1 root root 3049 Sep 5 2015 cron
-rwxr-xr-x 1 root root 2813 Jul 21 2015 dbus
-rwxr-xr-x 1 root root 824 Sep 5 2014 fake-hwclock
-rwxr-xr-x 1 root root 1336 Apr 6 2015 halt
-rwxr-xr-x 1 root root 1423 Apr 6 2015 hostname.sh
-rwxr-xr-x 1 root root 3916 Mar 29 2015 hwclock.sh
-rwxr-xr-x 1 root root 4698 May 1 2012 ifplugd
-rwxr-xr-x 1 root root 1591 Oct 1 2012 keyboard-setup
-rwxr-xr-x 1 root root 1300 Apr 6 2015 killprocs
-rwxr-xr-x 1 root root 1990 Sep 23 2014 kmod
-rwxr-xr-x 1 root root 4155 Jul 7 2015 lfw-mlat-client
-rwxr-xr-x 1 root root 4167 Oct 12 2016 lfw-mlat-client-rx4
-rwxr-xr-x 1 root root 2610 Jul 25 2011 lightdm
-rwxr-xr-x 1 root root 2944 Aug 2 2016 lighttpd
-rwxr-xr-x 1 root root 6912 May 6 2012 loadcpufreq
-rwxr-xr-x 1 root root 4150 Oct 10 2015 mlat-client
-rwxr-xr-x 1 root root 1696 Mar 29 16:05 modes.sh
-rwxr-xr-x 1 root root 995 Apr 6 2015 motd
-rwxr-xr-x 1 root root 677 Apr 6 2015 mountall-bootclean.sh
-rwxr-xr-x 1 root root 2138 Apr 6 2015 mountall.sh
-rwxr-xr-x 1 root root 1461 Apr 6 2015 mountdevsubfs.sh
-rwxr-xr-x 1 root root 1564 Apr 6 2015 mountkernfs.sh
-rwxr-xr-x 1 root root 685 Apr 6 2015 mountnfs-bootclean.sh
-rwxr-xr-x 1 root root 2456 Apr 6 2015 mountnfs.sh
-rwxr-xr-x 1 root root 4760 Dec 14 2014 networking
-rwxr-xr-x 1 root root 1814 Dec 26 2009 ntp
-rwxr-xr-x 1 root root 2406 Aug 19 2016 piaware
-rwxr-xr-x 1 root root 1366 Nov 15 2015 plymouth
-rwxr-xr-x 1 root root 752 Nov 15 2015 plymouth-log
-rwxr-xr-x 1 root root 1192 Mar 6 2015 procps
-rwxr-xr-x 1 root root 1202 May 6 2016 raspi-config
-rwxr-xr-x 1 root root 6228 Apr 6 2015 rc
-rwxr-xr-x 1 root root 820 Apr 6 2015 rc.local
-rwxr-xr-x 1 root root 117 Apr 6 2015 rcS
-rw-r--r-- 1 root root 2427 Apr 6 2015 README
-rwxr-xr-x 1 root root 661 Apr 6 2015 reboot
-rwxr-xr-x 1 root root 4153 Jan 27 2015 resolvconf
-rwxr-xr-x 1 root root 1042 Apr 6 2015 rmnologin
-rwxrwxr-x 1 root root 2435 Aug 24 2016 rpimonitor
-rwxr-xr-x 1 root root 2796 Dec 14 2015 rsyslog
-rwxr-xr-x 1 root root 3207 Apr 6 2015 sendsigs
-rwxr-xr-x 1 root root 597 Apr 6 2015 single
-rw-r--r-- 1 root root 1087 Apr 6 2015 skeleton
-rwxr-xr-x 1 root root 4077 Apr 14 2016 ssh
-rwxr-xr-x 1 root root 731 Jan 5 2016 sudo
-rwxr-xr-x 1 root root 6581 Mar 3 2016 udev
-rwxr-xr-x 1 root root 461 Mar 3 2016 udev-finish
-rwxr-xr-x 1 root root 2737 Apr 6 2015 umountfs
-rwxr-xr-x 1 root root 2202 Apr 6 2015 umountnfs.sh
-rwxr-xr-x 1 root root 1129 Apr 6 2015 umountroot
-rwxr-xr-x 1 root root 3111 Apr 6 2015 urandom
-rwxr-xr-x 1 root root 2757 Jul 14 2016 x11-common
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: unable to install on Rpi

Post by modesfan »

Hi Cali,
Please type:

Code: Select all

head /etc/init.d/modes.sh
The file access rights are correct.
How do you know that the script is not installed or executable?
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

Re: unable to install on Rpi

Post by CaLi »

pi@piaware:~$ head /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

when i check, i can see modes.sh isnt executable even after running the command to make it executable.

pi@piaware:~$ cd modesfiltered
pi@piaware:~/modesfiltered$ ls -al
total 1964
drwxr-xr-x 3 pi pi 4096 Mar 29 16:35 .
drwxr-xr-x 11 pi pi 4096 Apr 16 15:49 ..
-rw-r--r-- 1 pi pi 47 Apr 19 2016 blacklist.txt
-rw-r--r-- 1 pi pi 397 Jun 4 2017 callsigns.txt
drwxr-xr-x 2 pi pi 4096 Mar 29 16:35 lib
-rw-r--r-- 1 pi pi 111744 Aug 4 2017 modesfiltered.jar
-rw-r--r-- 1 pi pi 926153 Aug 4 2017 modesfiltered.zip
-rw-r--r-- 1 pi pi 927645 Feb 15 20:12 modesfiltered.zip.1
-rw-r--r-- 1 pi pi 1696 Dec 31 2016 modes.sh
-rw-r--r-- 1 pi pi 7263 Aug 4 2017 README.TXT
-rw-r--r-- 1 pi pi 0 Jul 10 2016 variables.txt
-rw-r--r-- 1 pi pi 34 Apr 18 2016 whitelist.txt
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: unable to install on Rpi

Post by modesfan »

There is no problem. You just mixed up the directories. The script is executed under /etc/init.d. You already checked the file rights. The rights under /home/modesfiltered don't matter. You could delete this copy.
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

Re: unable to install on Rpi

Post by CaLi »

ahhh, something so simple :)

so how do i get it to work as i am now completely lost with what is what and where (like i said im not great on the pi sorry)

Im hoping this is a simple fix to get it running and feeding data.


i guess its running so i carried on with the instructions but when i Check the logfile: cat /var/log/modes.log

i get this.. (presume something is wrong as my location is not appearing on the livelog page)

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'Location' cannot be null
at sun.reflect.GeneratedConstructorAccessor3.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
at modesproject.MSGsender.run(MSGsender.java:292)
at java.lang.Thread.run(Thread.java:745)
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: unable to install on Rpi

Post by modesfan »

Did you fill variables.txt with your location-string (step 6 of the How to)?

Code: Select all

head /home/pi/modesfiltered/variables.txt
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

Re: unable to install on Rpi

Post by CaLi »

yes with, nano variables.txt which now contains a single line of text: North Wales One, UK

i did originally have it as North Wales, UK but as my PC is feeding using that name, incase it was causing a conflict i changed it to, North Wales One, UK

i then saved and restarted using sudo service modes.sh restart
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

Re: unable to install on Rpi

Post by CaLi »

think i have finally got there..

the following was blank and didnt contain my location so i have added in there.

nano /home/pi/modesfiltered/variables.txt

I don't really understand where all the files and folders are through SSH its difficult to grasp. Data is getting sent through now :)

Many thanks for the replies, got there in the end. Really don't want to do it again though as it was rather confusing if im honest. my head is still mashed but at least its working.

I will close the PC feeder now and then rename my Rpi one
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: unable to install on Rpi

Post by modesfan »

Thanks for beeing patient with the tool. I will take up your case/comments and try to improve the Setup guide.

Some users reported problems with the newer versions so please keep checking the reports of your station on the website and locally under /var/log/modes.log.

Always good reception!
CaLi
Posts: 7
Joined: Thu Mar 29, 2018 3:01 pm

Re: unable to install on Rpi

Post by CaLi »

Due to accidently upgrading the Raspberry Pi once it rebooted it stopped working properly and i lost my adsb. I have since re-wrote the card and am trying again to add my feed to Live Mil EU but as per previously i am having trouble.

Followed the instructions and i thought it was working but when i check the mode s status i get the following and i not sure if its actually working? no dump1090 found?

pi@piaware:~ $ sudo service modes status
● modes.service - LSB: modes initscript
Loaded: loaded (/etc/init.d/modes.sh; generated)
Active: active (exited) since Sat 2020-01-11 21:02:45 UTC; 20min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 2200)
Memory: 0B
CGroup: /system.slice/modes.service

Jan 11 21:01:29 piaware systemd[1]: Starting LSB: modes initscript...
Jan 11 21:02:45 piaware modes.sh[226]: No running dump1090 found.
Jan 11 21:02:45 piaware modes.sh[226]: modesfiltered.jar started
Jan 11 21:02:45 piaware systemd[1]: Started LSB: modes initscript.

and also..

pi@piaware:~ $ cat /var/log/modes.log
/etc/init.d/modes.sh: line 40: java: command not found
Post Reply