I’ gonna install Blynk localserver on my Ubuntu 18.04 LTS, the error starting Blynk server. stopping appears when i excuted jar file. Please help me fix it:
Blockquote09:40:25.489 INFO - Using data dir ‘/home/prod/Blynk’
09:40:25.518 INFO - Region : local. Host : 127.0.1.1.
09:40:25.575 INFO - Using native epoll transport.
09:40:26.296 INFO - Initializing gmail smtp mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
09:40:26.457 INFO - Reports : 0
09:40:26.458 INFO - Didn’t find custom user certificates.
09:40:26.459 INFO - Didn’t find Let’s Encrypt certificates.
09:40:26.459 WARN - You didn’t specified ‘server.host’ or ‘contact.email’ properties in server.properties file. Automatic certificate generation is turned off. Please specify above properties for automatic certificates retrieval.
09:40:26.459 INFO - Using native openSSL provider.
09:40:26.459 WARN - ATTENTION. Server certificate paths (cert : ‘/home/prod’, key : ‘/home/prod’) not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
09:40:27.393 ERROR- Error initializing HTTP API and WebSockets, port 8080
io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
09:40:28.242 INFO - Using data dir ‘/home/prod/Blynk’
09:40:28.269 INFO - Region : local. Host : 127.0.1.1.
09:40:28.285 INFO - Using native epoll transport.
09:40:28.551 INFO - Initializing gmail smtp mail transport. Username : example@gmail. SMTP host : smtp.gmail:587
09:40:28.706 INFO - Reports : 0
09:40:28.706 INFO - Didn’t find custom user certificates.
09:40:28.707 INFO - Didn’t find Let’s Encrypt certificates.
09:40:28.707 WARN - You didn’t specified ‘server.host’ or ‘contact.email’ properties in server.properties file. Automatic certificate generation is turned off. Please specify above properties for automatic certificates retrieval.
09:40:28.707 INFO - Using native openSSL provider.
09:40:28.707 WARN - ATTENTION. Server certificate paths (cert : ‘/home/prod’, key : ‘/home/prod’) not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
09:40:29.295 ERROR- Error initializing HTTP API and WebSockets, port 8080
io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
09:59:46.552 INFO - Using data dir ‘/home/prod/Blynk’
09:59:46.585 INFO - Region : local. Host : 127.0.1.1.
09:59:46.602 INFO - Using native epoll transport.
09:59:46.939 INFO - Initializing gmail smtp mail transport. Username : xxxx. SMTP host : xxxx
09:59:47.091 INFO - Reports : 0
09:59:47.091 INFO - Didn’t find custom user certificates.
09:59:47.092 INFO - Didn’t find Let’s Encrypt certificates.
09:59:47.092 WARN - You didn’t specified ‘server.host’ or ‘contact.email’ properties in server.properties file. Automatic certificate generation is turned off. Please specify above properties for automatic certificates retrieval.
09:59:47.092 INFO - Using native openSSL provider.
09:59:47.092 WARN - ATTENTION. Server certificate paths (cert : ‘/home/prod’, key : ‘/home/prod’) not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
09:59:47.610 ERROR- Error initializing HTTP API and WebSockets, port 8080
io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
Please carefully read this instruction about installing / setting up local Blynk Server:
You have many issues, but the most severe is 1.
ERROR: Address already in use. This means your 8080 port, necessary for local Blynk Server Hardware connection, has been used / allocated for another purpose. Only you can check and know why.
You didn’t provide your own mail credentials for email notification system. But this is OK if you don’t really need it.
Thank for you reply, Khôi.
(Anh có thể xem tin nhắn riêng được ko?)
Blockquote ERROR: Address already in use` . This means your 8080 port, necessary for local Blynk Server Hardware connection, has been used / allocated for another purpose. Only you can check and know why.<
Port 8080 is running for Tomcat Server, This Server runs for Production Application, so, maybe issue here.
BlockquoteYou didn’t provide your own mail credentials for email notification system. But this is OK if you don’t really need it.
mail.smtp.auth=true
mail.smtp.starttls.enable=true mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=YOUR_EMAIL_HERE
mail.smtp.password=YOUR_EMAIL_PASS_HERE
I’m a newbie, therefor i unable insert 2 links in this thread, so, i changed some link to text and for security also
BlockquoteYou haven’t set up SSL/TLS certificates (either from Let’s Encrypt or OpenSSL). Still this is OK if you don’t need your server very secured.
The easiest way is to change Tomcat default port 8080 to port 80 (provided port 80 is not currently used by some program).
To do it:
Locate server.xml in {Tomcat installation folder}\conf\ diectory
Replace any instance of 8080 with 80 in server.xml
For example from original :
<!-- Define a non-SSL HTTP/1.1 Connector on port 8180 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
or
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
to:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8180 -->
<Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
or
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Save server.xml file. Restart Tomcat or whole system.
There is another more complicated way to keep Tomcat @ port 8080 and change Local Blynk hardware Server port 8080 to another one. But this way is just for your secret local server as other people won’t know which port to connect, and is not advisable.
have similar problem and I am looking for any help to start the Blynk local server on:
Linux Debian
4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) Java
openjdk version “11.0.8” 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Debian-1deb10u1, mixed mode, sharing) Blynk Server
server-0.41.13.jar
After I launched Blynk server I saw:
Blynk Server successfully started. All server output is stored in foldeer ‘/root/logs’ file. Your Admin url is https://127.0.1.1:9443/admin Your Admin login email is admin@blynk.cc Your Admin password is admin
and nothing… I had to interrupt the process by CTRL-Z.
The blynk.log file seems OK:
17:47:35.288 INFO - Using data dir ‘/srv/Blynk’ 17:47:35.309 INFO - Region : local. Host : 127.0.1.1. 17:47:35.328 INFO - Using native epoll transport. 17:47:35.590 INFO - Initializing gmail smtp mail transport. Username : example@$ 17:47:35.710 INFO - Reports : 0 17:47:35.710 INFO - Didn’t find custom user certificates. 17:47:35.711 INFO - Didn’t find Let’s Encrypt certificates. 17:47:35.711 WARN - You didn’t specified ‘server.host’ or ‘contact.email’ prope$ 17:47:35.711 INFO - Using native openSSL provider. 17:47:35.711 WARN - ATTENTION. Server certificate paths (cert : ‘/srv/Blynk’, k$ 17:47:36.170 INFO - HTTP API and WebSockets server listening at 8080 port. 17:47:36.170 INFO - HTTPS API, WebSockets and Admin page server listening at 94$ 17:47:36.171 INFO - Mqtt hardware server listening at 8440 port.
After kill the process I tried to start the server again and I see now:
Blynk Server successfully started. All server output is stored in folder ‘/srv/Blynk/logs’ file.
I tried 127.0.1.1, 192.168.1.2 (local IP) and public IP. I think, the problem is with the Blynk server. During starting the Blynk server, it is suspending and not launching to the end of the process.
All I get on the command line when I launch a local server is:
Blynk Server successfully started.
All server output is stored in folder '/home/pi/logs' file.
and my log file looks very similar to yours.
If you try to launch the server again from the command line do you get a messages saying that the ports are busy and that the server is most likely already running?
So once you get the “Blynk Server successfully started” message, and before you do CTRL-Z, can you access the admin screen via 127.0.1.1:9443/admin
or 192.168.1.2:9443/admin