Please find the solutions for the issues I’ve faced with the Blynk server running on BeagleBone. I hope this summary will help other users!
- Blynk Server Launch Fails
Blynk server launch fails if one port is already used by another process. In my case, Apache was using port 8080
.
To solve this, create on the Blynk folder a file called server.properties
and add
http.port=8181
- Connection to admin Website Fails
Connection to the admin page of the local Blynk server in a BeagleBone failed.
Like Chrome and Safari, Firefox first refused to connect but provided more information: The certificate is not trusted because it is self-signed and then asked me to add an exception.
If the browser suggests to add an exception, accept. Otherwise, generate a not self-signed certificate.
- No Prompt on Client
The Blynk client launched by java -jar client-0.15.3.jar -mode app -host 192.168.1.171 -port 8443
doesn’t display any prompt.
After my successful implementation of Private IoT with Blynk on Local Server also posted at Hackster.io with Blynk server-0.8.0 on a BeagleBone, I wanted to update to release server-0.15.3.
I’ve already gone through those threads
- [SOLVED] How to launch Blynk Server on Mint 17.3
- [SOLVED] How to configure Blynk server?
- [SOLVED] Can not Start Local Server on Win8.1
but I’m still facing an issue.
Server ports are busy. Most probably server already launched. See /root/Blynk/./logs for more info.
I’ve followed the same Quick local server setup on Raspberry PI procedure.
Here are some details.
root@beaglebonewhite:~ # uname -a
Linux beaglebonewhite 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux
root@beaglebonewhite:~ # java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) Client VM (build 25.77-b03, mixed mode)
root@beaglebonewhite:~ # cd Blynk
root@beaglebonewhite:~/Blynk # java -jar server-0.15.3.jar -dataFolder ~/Blynk
Server ports are busy. Most probably server already launched. See /root/Blynk/./logs for more info.
^C
Log file
root@beaglebonewhite:~/Blynk # cat /root/Blynk/./logs/blynk.log
15:56:42.254 INFO - Using data dir '/root/Blynk'
15:56:46.599 ERROR - Error parsing file '/root/Blynk/server.properties'.
15:56:46.602 ERROR - Error parsing file '/root/Blynk/server-0.15.3.jar'.
15:56:46.609 ERROR - Error parsing file '/root/Blynk/client-0.15.3.jar'.
15:56:47.661 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
15:56:52.773 INFO - Plain tcp/ip hardware server port 8442.
15:56:52.806 WARN - ATTENTION. Certificate /root/Blynk and key /root/Blynk paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
15:56:57.996 INFO - SSL hardware port 8441.
15:56:58.045 WARN - ATTENTION. Server certificate paths cert : '/root/Blynk', key : '/root/Blynk' - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
15:56:59.759 INFO - Application server port 8443.
15:57:00.055 INFO - HTTP API port 8080.
15:57:00.121 WARN - ATTENTION. Certificate /root/Blynk and key /root/Blynk paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
15:57:02.998 INFO - HTTPS API port 9443.
15:57:03.214 WARN - ATTENTION. Certificate /root/Blynk and key /root/Blynk paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
15:57:05.498 INFO - HTTPS admin UI port 7443.
15:57:05.857 INFO - HTTP reset pass port 7444.
15:57:05.867 INFO - Web Sockets port 8082.
15:57:05.877 WARN - ATTENTION. Certificate /root/Blynk and key /root/Blynk paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
15:57:07.633 INFO - Web SSL Sockets port 8081.
15:57:08.576 ERROR - Error initializing HTTP API, port 8080
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:498)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1271)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:413)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:399)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:349)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:374)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
Ports used
root@beaglebonewhite:~/Blynk # netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 862/sshd
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 850/xrdp-sesman
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 830/xrdp
tcp6 0 0 :::22 :::* LISTEN 862/sshd
tcp6 0 0 :::3000 :::* LISTEN 1/systemd
tcp6 0 0 :::8080 :::* LISTEN 896/apache2
tcp6 0 0 :::80 :::* LISTEN 1/systemd
udp 0 0 0.0.0.0:57818 0.0.0.0:* 598/avahi-daemon: r
udp 0 0 0.0.0.0:5353 0.0.0.0:* 598/avahi-daemon: r
udp 0 0 0.0.0.0:67 0.0.0.0:* 1017/udhcpd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1152/dhclient
udp 0 0 0.0.0.0:24682 0.0.0.0:* 1152/dhclient
udp6 0 0 :::5353 :::* 598/avahi-daemon: r
udp6 0 0 :::13804 :::* 1152/dhclient
udp6 0 0 :::33009 :::* 598/avahi-daemon: r
root@beaglebonewhite:~/Blynk # fuser 8080/tcp
8080/tcp: 896 901 902
root@beaglebonewhite:~/Blynk # ls -l /proc/896/exe
lrwxrwxrwx 1 root root 0 Apr 12 16:04 /proc/896/exe -> /usr/lib/apache2/mpm-worker/apache2
root@beaglebonewhite:~/Blynk # grep 8080 /etc/services
http-alt 8080/tcp webcache # WWW caching service
http-alt 8080/udp
What’s I’m going wrong? Thank you for your help!