Help needed with running local server at start-up, Rasp Pi 3

Hi everyone,

I’ve read the various threads on this issue but still cant get it to run on start-up.
I know this is probably a Linux question but any help will be appreciated.

Blynk - IOS app
Raspberry Pi 3 with Stretch installed

I’ve tried both the methods outlined in Docs, crontab -e doesnt work neither does adding “java -jar /home/pi/server-0.39.4.jar -dataFolder /home/pi/Blynk &” to the /etc/rc.local file.

When typing-

cd Blynk
then
java -jar server-0.39.4-java8.jar -dataFolder /home/pi/Blynk

the server starts and runs normally but wont start on reboot.

Thank you in advance for any help.

I had the same issue couple days ago when building a new server. Here is what I found out: make sure the path that contain jar file is correct. Below is my fixed

java -jar /home/pi/Blynk/server-0.39.4-java8.jar -dataFolder /home/pi/Blynk &

In this case, my last file located at /home/pi/Blynk

Hi Key,
Thanks for the reply but it still doesn’t work- please see below for what Ive done

This starts the server correctly-
""pi@raspberrypi:~ $ cd Blynk
pi@raspberrypi:~/Blynk $ java -jar server-0.39.4-java8.jar -dataFolder /home/pi/Blynk

Blynk Server 0.39.5-SNAPSHOT successfully started.
All server output is stored in folder ‘/home/pi/Blynk/logs’ file.
“”
Then I’ve done this in crontab -e

@reboot java -jar /home/pi/Blynk/server-0.39.4-java8.jar -dataFolder /home/pi/Blynk &

And also -
""pi@raspberrypi:~/Blynk $ sudo nano /etc/rc.local

!/bin/sh -e
rc.local
java -jar /home/pi/Blynk/server-0.39.4-java8.jar -dataFolder /home/pi/Blynk &
exit 0""

Any suggestions on what Im doing wrong?

Here is my cheat sheet, hopefully it will help:

HOW TO CONFIGURE BLYNK LOCAL SERVER: (detail HERE)

  1.   Login to Raspberry Pi (user name:  pi/4P)
    
  2.   Open Terminal
    
  3.   Install Java8
    

sudo apt-get install oracle-java8-jdk

  1.   Check Java version
    

java -version
5. Create Blynk directory

Mkdir Blynk

  1.   Change directory from root “pi” to “Blynk” directory
    

cd Blynk

  1.   Download Blynk server file package  (check latest package from HERE)
    

wget “https://github.com/blynkkk/blynk-server/releases/download/v0.39.4/server-0.39.4-java8.jar

  1.   Manual start Blynk server
    
      java -jar server-0.39.4-java8.jar -dataFolder /home/pi/Blynk
    
  2.   At this point, the Blynk Server successfully started.  Take a note on login ID and password for the web portal.  To get out of this terminal windows, press CTRL+C
    
  3. Enable Blynk server auto start each time power failure or hardware reboot

a. Open Terminal and type: sudo leafpad

b. Browse to FileSystem\etc\rc.local then add this line as below then save it.

java -jar /home/pi/Blynk/server-0.39.4-java8.jar -dataFolder /home/pi/Blynk &

c. At the Terminal, type: crontab –e

d. At the following line then save it.

@reboot java -jar /home/pi/Blynk/server-0.39.4-java8.jar -dataFolder /home/pi/Blynk &
  1. Reboot the server then Blynk should automatically start

Hi,

Thank you for the help, Ive reinstalled the operating system and followed your post.
Everything is working now.

Thanks again.