[SOLVED] How to configure Blynk server?

Yes, Im using gmail email with same username and password.

this are the logs from the server:

From blynk logs:

02:35:52.843 INFO - Using data dir ‘\path’
02:35:53.202 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
02:35:53.530 INFO - Plain tcp/ip hardware server port 8442.
02:35:53.530 INFO - Enabling SSL for hardware.
02:35:53.530 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:53.984 INFO - SSL hardware port 8441.
02:35:53.984 INFO - Enabling SSL for application.
02:35:53.984 WARN - ATTENTION. Server certificate paths cert : ‘C:\Users\Jun\Blynk\Server’, key : ‘C:\Users\Jun\Blynk\Server’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
02:35:54.249 INFO - Application server port 8443.
02:35:54.265 INFO - Enabling HTTP API.
02:35:54.265 INFO - HTTP API port 8080.
02:35:54.265 INFO - Enabling HTTPS API.
02:35:54.265 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.406 INFO - HTTPS API port 9443.
02:35:54.421 INFO - Enabling HTTPS for admin UI.
02:35:54.421 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.693 INFO - HTTPS admin UI port 7443.
02:35:54.693 INFO - Enabling Web Sockets.
02:35:54.693 INFO - Web Sockets port 8082.
02:35:54.693 INFO - Enabling Web SSL Sockets.
02:35:54.693 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.959 INFO - Web SSL Sockets port 8081.
08:41:18.363 INFO - junxxxxx@gmail.com app joined.

from the user logs:

09:18:59.883 INFO - Generated token for user junxxx@gmail.com and dashId 1 is 4d0548bc3ffd40ed80e64c3182e623c0.
15:58:23.924 INFO - Creating new dashboard.
15:58:23.955 INFO - Generated token for user junxxx@gmail.com and dashId 2 is e6c33e8bfd9e457883f7e3477645551a.
15:58:34.887 INFO - Deleting dashboard 2.
15:58:49.701 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 m6sm12838288wje.21 - gsmtp

15:58:56.014 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 n10sm12845960wjf.28 - gsmtp

16:04:05.132 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 74sm8620465wmn.17 - gsmtp

16:04:05.163 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 s66sm8669115wmb.6 - gsmtp

Can you post your server.properties and your mail.properties?

Server Properties:

server.ssl.cert=/test-certs/mutual/server.crt
server.ssl.key=/test-certs/mutual/server.pem
server.ssl.key.pass=blynkawesome
client.ssl.cert=
client.ssl.key=

#hardware ssl port
hardware.ssl.port=9441

#hardware plain tcp/ip port
hardware.default.port=9442

#application ssl port
app.ssl.port=9443

#https port
https.port=10443

#web sockets ssl port
ssl.websocket.port=18081
#web sockets plain tco port
tcp.websocket.port=18082

#http port
http.port=8080

#by default System.getProperty(“java.io.tmpdir”)/blynk used
data.folder=

#folder for logs.
#logs.folder=./logs

#log debug level. trace|debug|info|error. Defines how precise logging will be.
log.level=trace

#defines maximum allowed number of user dashboards. Needed to limit possible number of tokens.
user.dashboard.max.limit=10

#user is limited with 100 messages per second.
user.message.quota.limit=100
#in case of consistent quota limit exceed during long term, sending warning response back to exceeding channel
#for performance reason sending only 1 message within interval. In millis
user.message.quota.limit.exceeded.warning.period=2000

#this setting defines how often we can send mail/tweet/push or any other notification. Specified in seconds
notifications.frequency.user.quota.limit=60
#maximum size of user profile in kb’s
user.profile.max.size=16

#period in millis for saving all user DB to disk.
profile.save.worker.period=100

server.workers.threads=2

#specifies maximum period of time when application socket could be idle. After which
#socket will be closed due to non activity. In seconds. Default value 600 if not provided.
app.socket.idle.timeout=600
#specifies maximum period of time when hardware socket could be idle. After which
#socket will be closed due to non activity. In seconds. Default value 15 if not provided.
hard.socket.idle.timeout=15

#if enabled - native epoll transport will be used. should be turned on only if you 100% sure.
#may not work on some environment. Used to increase server performance.
enable.native.epoll.transport=false

#mostly required for local servers setup in case user want to log raw data in CSV format
#from his hardware
enable.raw.data.store=true

#https port
administration.https.port=7443

#comma separated list of administrator IPs. allow access to admin UI only for those IPs.
#you may set it for 0.0.0.0/0 to allow access for all.
#you may use CIDR notation. For instance, 192.168.0.53/24
allowed.administrator.ips=127.0.0.1

Mail Properties:

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=My Gmail Email
mail.smtp.password=My Gmail Password

I do notice something weird. When I restart my local server I see this in blynk.log:

15:41:59.925 INFO - Initializing mail transport. Username : whizzcat@gmail.com. SMTP host : smtp.gmail.com:587

In your log I see:

02:35:53.202 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587

Almost as if Blynk doesn’t detect the correct username?

1 Like

Or @Junesp made a typo in “mail.properties” file :slightly_smiling:

in the mail.properties file I used my gmail email and password it is the same email and password when i log to the local blynk server.

Anyway I will re-install the local server and post the procedure how I install and you guys can make a comment which part of my procedure is wrong.

thanks for helping me.

This is my procedure in installing the local blynk server, please post comment where I made mistake in installing the Blynk Server:

  1. Downloaded the following File:

blynk-server-0.13.1 (source code)
server-0.13.1.jar
client-0.13.1.jar

  1. Save the above files in c/users/Junesp111/Blynk/Server

3.Check the Java verion in my PC (java vesion “1.8.0_73”)

  1. Run the server server-0.13.1.jar via command prompt as per blynk website instruction.

    Output from command prompt:
    Blynk Server Successfully started.
    All server output is stored in folder ‘C:\Users\Junesp111\Blynk\Server.\logs’ file

  2. Created a mail.properties file save in the same folder where server-0.13.1.jar is located.

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=My gmail email (same logon ID for the local blynk server)
mail.smtp.password=My gmail password (same Password for the local blynk server)

Sever response when I send the Auth Token from my mobile device (andriod):

   Email was not send to your login acc.

Server Logs:

from blynk file:

21:32:36.690 INFO - Using data dir ‘\path’
21:32:36.799 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
21:32:37.409 INFO - Plain tcp/ip hardware server port 8442.
21:32:37.409 INFO - Enabling SSL for hardware.
21:32:37.409 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:37.924 INFO - SSL hardware port 8441.
21:32:37.924 INFO - Enabling SSL for application.
21:32:37.924 WARN - ATTENTION. Server certificate paths cert : ‘C:\Users\Junesp111\Blynk\Server’, key : ‘C:\Users\Junesp111\Blynk\Server’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
21:32:38.174 INFO - Application server port 8443.
21:32:38.190 INFO - Enabling HTTP API.
21:32:38.190 INFO - HTTP API port 8080.
21:32:38.190 INFO - Enabling HTTPS API.
21:32:38.190 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.456 INFO - HTTPS API port 9443.
21:32:38.456 INFO - Enabling HTTPS for admin UI.
21:32:38.456 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.643 INFO - HTTPS admin UI port 7443.
21:32:38.643 INFO - Enabling Web Sockets.
21:32:38.643 INFO - Web Sockets port 8082.
21:32:38.643 INFO - Enabling Web SSL Sockets.
21:32:38.643 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.799 INFO - Web SSL Sockets port 8081.
21:45:49.418 INFO - Trying register user : junxxxx@gmail.com
21:45:49.480 INFO - Registered junxxxx@gmail.com.
21:45:49.543 INFO - junxxxx@gmail.com app joined.

from the user file:

21:45:54.635 INFO - Creating new dashboard.
21:45:54.682 INFO - Generated token for user junxxxx@gmail.com and dashId 1 is 91c4a022c5414999ba80e0c006402d90.
21:46:28.310 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 e25sm1872837wmi.21 - gsmtp

21:47:01.107 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 i1sm14032150wjs.45 - gsmtp

21:48:04.972 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 cb2sm14211540wjc.16 - gsmtp

21:48:05.237 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 e127sm9896877wma.20 - gsmtp

21:48:21.893 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 v1sm14118021wjf.49 - gsmtp

21:48:39.279 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 gb9sm14149131wjb.26 - gsmtp

How do you exactly run jar file and from where?

from the command prompt.

C/Users/Junesp111/Blynk/Server/java -jar server-0.13.1.jar -dataFolder /path

Did you restart the Blynk server after you created the mail.properties file? If you don’t it will not work.

1 Like

Do you run that from folder where jar is?

yes.

the jar file is inside the server folder

yes I restart the server

Did you install java in C/Users/Junesp111/Blynk/Server folder? I just check on Win. All works fine.

  • cd to folder where jar is;
  • create mail.properties file;
  • run server;

Thanks Dmitriy now the server is now sending the Auth Token to my email.

thank you guys.

I upload the code to the arduino mega, used the example Blynk arduino ethernet but the Auth Token is not recognized by the server. below is the serial print in my monitor.

[0] Blynk v0.3.3
[0] Getting IP…
[9828] My IP: 192.168.100.26
[9829] Connecting to cloud.blynk.cc:8442
[10348] Invalid auth token
[15127] Connecting to cloud.blynk.cc:8442
[15639] Invalid auth token
[20429] Connecting to cloud.blynk.cc:8442
[20939] Invalid auth token
[25719] Connecting to cloud.blynk.cc:8442
[26226] Invalid auth token
[31005] Connecting to cloud.blynk.cc:8442
[31508] Invalid auth token
[36293] Connecting to cloud.blynk.cc:8442
[36807] Invalid auth token
[41592] Connecting to cloud.blynk.cc:8442

Maybe because you need to connect to local server?

Now im connected Thanks Dmitriy.

What was wrong with mail?

The way I created the mail.properties file, I search in the internet how to create via the command prompt. before I created only directly to the folder via txt file thats why its not working. I am only a hobbyist no formal eduaction in programming and Im very thankful to you and the blynk community for giving me support.