Hopefully a simple question. I am new to the Linux OS and wondering if I follow the same steps for installing the Local server on Mint 17.3 as one would on the raspberry-pi?
Thank you!
Hopefully a simple question. I am new to the Linux OS and wondering if I follow the same steps for installing the Local server on Mint 17.3 as one would on the raspberry-pi?
Thank you!
I think instructions are same. Just try and tell me if it works.
So it appears as if it is running, but the app keeps telling me āgetting data from server failed. Try laterā any suggestions or am i missing something?
Blynk Server successfully started.
All server output is stored in folder '/home/develop/./logs' file.
How do you connected to internet in phone?
Did you do any configuring of the server.properties file and how do you start your server? The path given there is a bit weird to me, should not be ./ in it.
This is a bit strange, but it works. (small server bug)
@Dmitriy I am connected via the Wi-Fi on the same network as the computer running the server (connected via Ethernet to router). At one point I tried shutting off the mobile data but ended up with the same result.
@Lichtsignaal brings up a good point as well. When I attempted to change the folder location in the code below, it always reverted back to saving the admin and log folders in the root folder.
I did not configure any of the server.properties file. I started the server in the same manor one would for the raspberry-pi
java -jar server-0.12.2.jar -dataFolder /home/pi/Blynk
- Original code
java -jar server-0.12.2.jar -dataFolder /home/develop/Blynk
-Code run in terminal
All server output is stored in folder '/home/develop/./logs' file.
-Result after server started
Can you post the contents of the blynk.log file in the log dir?
@Lichtsignaal ,below is the blynk.log file you requested
12:23:58.739 INFO - Using data dir '/home/develop/Blynk'
12:23:58.963 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
12:23:59.685 INFO - Plain tcp/ip hardware server port 8442.
12:23:59.688 INFO - Enabling SSL for hardware.
12:23:59.691 WARN - ATTENTION. Certificate /home/develop and key /home/develop paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:24:00.696 INFO - SSL hardware port 8441.
12:24:00.760 INFO - Enabling HTTPS for admin UI.
12:24:00.760 WARN - ATTENTION. Certificate /home/develop and key /home/develop paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:24:00.971 INFO - HTTPS admin UI port 7443.
12:24:00.985 INFO - Enabling SSL for application.
12:24:00.986 WARN - ATTENTION. Server certificate paths cert : '/home/develop', key : '/home/develop' - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
12:24:01.166 INFO - Application server port 8443.
12:24:01.183 INFO - Enabling HTTP for app.
12:24:01.183 INFO - HTTP for app port 8080.
Also, It seems that when I try an IP that is incorrect, it quickly responds server failed, but when I attempt to connect to the real IP it takes 10-15 seconds.
Well, by all means it should work. What you can try is do the following:
make a server.properties file in the directory op Blynk/
Add this line:
log.level=trace
Connect again and see what the log file says. Itāll put maximum logging on, it may give you more clues as to what is going on.
I added the server.properties file, reorganized the folder structure and ended up with the following
Thanks again!
16:46:27.326 INFO - Using data dir ā/home/develop/Blynkā
16:46:27.332 DEBUG - Starting reading user DB.
16:46:27.422 DEBUG - Reading user DB finished.
16:46:27.572 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
16:46:28.415 DEBUG - hard.socket.idle.timeout = 15
16:46:28.416 INFO - Plain tcp/ip hardware server port 8442.
16:46:28.417 INFO - Enabling SSL for hardware.
16:46:28.426 WARN - ATTENTION. Certificate /home/develop/Blynk/server and key /home/develop/Blynk/server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
16:46:29.437 INFO - SSL hardware port 8441.
16:46:29.544 INFO - Enabling HTTPS for admin UI.
16:46:29.546 WARN - ATTENTION. Certificate /home/develop/Blynk/server and key /home/develop/Blynk/server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
16:46:29.737 INFO - HTTPS admin UI port 9443.
16:46:29.751 INFO - Enabling SSL for application.
16:46:29.751 WARN - ATTENTION. Server certificate paths cert : ā/home/develop/Blynk/serverā, key : ā/home/develop/Blynk/serverā - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
16:46:29.921 DEBUG - app.socket.idle.timeout = 600
16:46:29.922 INFO - Application server port 8443.
16:46:29.932 INFO - Enabling HTTP for app.
16:46:29.933 INFO - HTTP for app port 8080.
@arduinewb please check 2 things :
Also did you changed port in app from 8443 to something different?
Also, can you telnet to port 8443 on your Local Server from another device?
@Dmitriy I am able to connect to the Blynk Cloud with my phone from Wifi.
@Lichtsignaal, would I telnet similar to the directions on this page on my Windows computer?
Thatās it yeah. You may have to enable the telnet program form Add/Remove Windows Components though. If that works, e.g. it doesnāt time out, than your server configuration is most likely ok.
@Dmitriy I ran the netstat with and without the Server Running. As you can see below, it recognizes the ports are open, but donāt list the full IP. Is that an issue?
Without Server Running
develop@develop-GB-BXBT-2807 ~ $ netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp6 0 0 :::139 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 :::445 :::* LISTEN
With Server Running
develop@develop-GB-BXBT-2807 ~ $ netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp6 0 0 :::9443 :::* LISTEN
tcp6 0 0 :::139 :::* LISTEN
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 :::8441 :::* LISTEN
tcp6 0 0 :::8442 :::* LISTEN
tcp6 0 0 :::8443 :::* LISTEN
tcp6 0 0 :::445 :::* LISTEN
develop@develop-GB-BXBT-2807 ~ $
@Lichtsignaal I ran telnet with the server ārunningā and the connection Failed
Well, if your connection failed, it could be the firewall. Do you have iptables running? Try turning that off.
WE HAVE A WINNER! It works!!
The firewall was the problem. @Dmitriy and @Lichtsignaal thank you for all of the help!
Very welcome
Linux these days activates SELinux by default I think, that is just the one thing that doesnāt get activated in Raspbian, so hence, itās not in the documentation, but @Dmitriy could make an entry
I hope this isnāt considered hijacking someone elseās thread but if so, say so and Iāll start a new one.
Iām running into a similar problem running the 12.1 and 12.4 server code (havenāt tried the intermediate versions) on Linux Mint 17.
When I first installed 12.1 around Christmas time, it worked just fine. I havenāt been able to use it in the intervening weeks and now Iām finding that I canāt connect to the server from my android app and ffailes with āgetting data from server failedā
The only things that have changed on this machine are: 1 reboot and regular system updates.
Iāve tried stopping and starting the servers and doing another reboot cycle and no dice. Another server (prosody) on this machine is working just fine.
Iāve also tried disabling the firewall (ufw disable). No luck.
netstat shows that blynk is listening on the correct ports but based on the log output, itās never receiving requests.
Any suggestions?