Local server project disappear problem

My local server projects suddenly disappear… How can i fix it…

By providing lots more information for starters.

What do you think we would like to know?

Normally you have the wrong path when projects disappear.

1 Like

Do you see any errors in blynk.log? What server version do you have? Did you specify dataFolder?

My server version 0.27.2
app version 2.15.2

My data folder here, i did not touch it…

where can i found blynk.log file ?

@tsavasci looks like you are running the server on some kind of Linux machine. Precisely what machine and iOS is it?

rasp pi 3

Do you have any “autostart” facility for the server? This has 2 advantages, firstly it’s convenient and secondly the path will always be correct once it’s set up. Whereas manually running the server means data folders can “disappear” due to typos when you issue the start server command.

I would say for the Pi the log should be in a folder called logs at the root level.

i found the blynk.log. Here it is…

00:41:51.784 INFO - tsavascii@gmail.com hardware joined.

00:45:26.686 INFO - tsavascii@gmail.com hardware joined.

07:07:14.468 INFO - tsavascii@gmail.com hardware joined.

07:17:14.423 INFO - Using data dir '/home/pi/Blynk'

07:17:16.366 ERROR- Error parsing file '/home/pi/Blynk/tsavascii@gmail.com.Blynk.user'. Error : No content to map due to end-of-input
 at [Source: (File); line: 1, column: 0]

07:17:16.380 INFO - Region : local

07:17:17.953 INFO - Initializing gmail smtp mail transport. Username : tsavascii@gmail.com. SMTP host : smtp.gmail.com:587

07:17:18.027 INFO - Didn't find custom user certificates.

07:17:18.032 INFO - Didn't find Let's Encrypt certificates.

07:17:18.032 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.

07:17:18.216 WARN - ATTENTION. Server certificate paths (cert : '/home/pi', key : '/home/pi') not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.

07:17:20.611 INFO - Hardware plain tcp/ip server listening at 8442 port.

07:17:20.615 INFO - Hardware SSL server listening at 8441 port.
07:17:20.617 INFO - Application server listening at 8443 port.

07:17:20.618 INFO - HTTP API and WebSockets server listening at 8080 port.

07:17:20.620 INFO - HTTPS API, WebSockets and Admin page server listening at 9443 port.

07:17:20.621 INFO - Mqtt hardware server listening at 8440 port.

08:10:10.449 INFO - tsavascii@gmail.com Blynk-app joined.

08:10:27.056 INFO - tsavascii@gmail.com Blynk-app joined.

08:11:52.047 INFO - tsavascii@gmail.com Blynk-app joined.

08:18:55.456 INFO - tsavascii@gmail.com Blynk-app joined.

08:19:32.948 INFO - tsavascii@gmail.com Blynk-app joined.

08:19:33.427 INFO - tsavascii@gmail.com Blynk-app joined.

08:20:12.479 INFO - tsavascii@gmail.com Blynk-app joined.

08:20:12.589 INFO - tsavascii@gmail.com Blynk-app joined.

08:17:14.359 INFO - Using data dir '/home/pi/Blynk'

08:17:16.280 INFO - Region : local
08:17:17.887 INFO - Initializing gmail smtp mail transport. Username : tsavascii@gmail.com. SMTP host : smtp.gmail.com:587
08:17:17.962 INFO - Didn't find custom user certificates.

08:17:17.966 INFO - Didn't find Let's Encrypt certificates.

08:17:17.966 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:38:28.748 WARN - ATTENTION. Server certificate paths (cert : '/home/pi', key : '/home/pi') not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.

09:38:31.368 INFO - Hardware plain tcp/ip server listening at 8442 port.

09:38:31.372 INFO - Hardware SSL server listening at 8441 port.

09:38:31.374 INFO - Application server listening at 8443 port.

09:38:31.377 INFO - HTTP API and WebSockets server listening at 8080 port.

09:38:31.380 INFO - HTTPS API, WebSockets and Admin page server listening at 9443 port.

09:38:31.382 INFO - Mqtt hardware server listening at 8440 port.

09:39:04.705 INFO - tsavascii@gmail.com Blynk-app joined.

09:39:25.397 INFO - tsavascii@gmail.com Blynk-app joined.

12:01:13.361 INFO - tsavascii@gmail.com Blynk-app joined.

12:01:28.081 INFO - tsavascii@gmail.com Blynk-app joined.

12:02:44.337 WARN - Facebook user 'tsavasci@yahoo.com' tries to login with pass. /192.168.1.24:49162

12:02:56.977 INFO - tsavascii@gmail.com Blynk-app joined.

12:10:28.432 WARN - User 'admin@blynk.cc' not registered. /192.168.1.24:36988

12:18:46.365 INFO - tsavascii@gmail.com Blynk-app joined.

12:20:32.173 INFO - tsavascii@gmail.com Blynk-app joined.

12:21:24.672 INFO - tsavascii@gmail.com Blynk-app joined.

12:21:53.426 INFO - tsavascii@gmail.com Blynk-app joined.

12:22:44.385 INFO - tsavascii@gmail.com Blynk-app joined.

12:23:18.652 INFO - tsavascii@gmail.com Blynk-app joined.

12:27:44.472 INFO - tsavascii@gmail.com Blynk-app joined.

12:31:18.115 INFO - tsavascii@gmail.com Blynk-app joined.

13:43:40.072 INFO - tsavascii@gmail.com Blynk-app joined.

And here my server.properties file;

#hardware mqtt port
hardware.mqtt.port=8440

#hardware ssl port
hardware.ssl.port=8441

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

#http and web sockets port
http.port=8080

#https and web sockets port
https.port=9443

#application ssl port
app.ssl.port=8443

#address to bind to. by default bounded to all interfaces
listen.address=

#by default server uses embedded in jar cert to simplify local server installation.
#WARNNING DO NOT USE THIS CERTIFICATES ON PRODUCTION OR IN WHERE ENVIRNOMENTS REAL SECURITY REQUIRED.
#provide either full path to files either use '.' for specifying current directory. For instance "./myfile.crt"
server.ssl.cert=
server.ssl.key=
server.ssl.key.pass=

#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=info

#maximum number of devices allowed per account
user.devices.limit=25

#maximum number of tags allowed per account
user.tags.limit=100

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

#defines maximum allowed widget size in KBs as json string.
user.widget.max.size.limit=20

#user is limited with 100 messages per second.
user.message.quota.limit=100

#maximum allowed number of notification queue. Queue responsible for processing email, pushes, twits sending.
#Because of performance issue - those queue is processed in separate thread, this is required due
#to blocking nature of all above operations. Usually limit shouldn't be reached.
notifications.queue.limit=5000

#Number of threads for performing blocking operations - push, twits, emails, db queries.
#Recommended to hold this value low unless you have to perform a lot of blocking operations.
blocking.processor.thread.pool.limit=6

#this setting defines how often we can send mail/tweet/push or any other notification. Specified in seconds
notifications.frequency.user.quota.limit=15

#this setting defines how often we can send webhooks. Specified in miliseconds
webhooks.frequency.user.quota.limit=1000

#this setting defines how big could be response for webhook GET request. Specified in kbs
webhooks.response.size.limit=72

#maximum size of user profile in kb's
user.profile.max.size=128

#number of strings to store in terminal widget
terminal.strings.pool.size=25

#number of strings to store in map widget
map.strings.pool.size=25

#number of strings to store in lcd widget
lcd.strings.pool.size=6

#maximum number of rows allowed
table.rows.pool.size=100

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

#period in millis for saving stats to disk.
stats.print.worker.period=60000

#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.
#leave it empty for infinity timeout
hard.socket.idle.timeout=15

#Enables native socket transport for Linux using JNI. Should be turned on only if you 100% sure.
#may not work on some environments. Used to increase server performance. Performance boost is ~20-40%.
enable.native.epoll.transport=false

#Enabled native openSSL support for SSL handlers. Should be turned on only if you 100% sure.
#may not work on some environments. Used to increase server performance. Performance boost is ~16%.
#For more details see - http://netty.io/wiki/forked-tomcat-native.html
enable.native.openssl=false

#enable DB
enable.db=false

#enable raw data storage to DB
enable.raw.db.data.store=false

#size of async logger ring buffer. should be increased for loads >2-3k req/sec
async.logger.ring.buffer.size=2048

#initial amount of energy
initial.energy=100000

#ADMINISTRATION SECTION

admin.rootPath=/admin

#used for reset password page and certificate generation.
#by default current server IP is taken. could be replaced with more friendly hostname.
#it is recommended to override this property with your server IP to avoid possible problems of host resolving
#server.host=test.blynk.cc

#email used for certificate registration, could be omitted in case you already specified it in mail.properties
contact.email=tsavascii@gmail.com

#network interface to determine server's current IP.
#only the first characters of the interface's name are needed.
#the default setting eth will use the first ethX interface found (i.e. eth0)
net.interface=wlan0

#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=0.0.0.0/0,::/0

# default admin name and password. that will be created on initial server start
admin.email=tsavascii@gmail.com
admin.pass=383838

#comma separated list of users allowed to create accounts. leave it empty if no restriction required.
allowed.users.list=

Do you see /home/pi/Blynk/backup folder?

Yes, here it is…

As quick fix you need to take latest one from backup folder and replace your profile /home/pi/Blynk/tsavascii@gmail.com.Blynk.user

Usually, Blynk should restore from backup automatically, however, seems like this code had a bug. It will be fixed in next versions.

nothing changed…

but i updated the local server to 0.28.0, kill old one and start 0.28.0 it give to me this errors then it started…

You specified wrong path to data folder. Should be -dataFolder /home/pi/Blynk in your case.

@tsavasci That is the most likely reason your projects disappeared.

The docs refer to path but that’s not literal it’s a technical term for “where you want to put your stuff”.

If you state an incorrect location for your stuff, like /path, it puts it in a temporary directory. Which has you have seen can disappear, hence the directory name.

So for you:

java -jar server-0.28.0-java8.jar -dataFolder /home/pi/Blynk

Corrected.

I think your server start command incorrect.

java -jar server-0.28.0.jar -dataFolder /home/pi/Blynk

it must be…

java -jar server-0.28.0-java8.jar -dataFolder /home/pi/Blynk

.ok… when i do this correction…

pi@Tamer_pi:~ $ java -jar server-0.28.0-java8.jar -dataFolder /home/pi/Blynk
Exception in thread "main" java.lang.IllegalStateException: java.lang.IllegalStateException: Duplic                                                                     ate key {"name":"tsavascii@gmail.com","email":"tsavascii@gmail.com","appName":"Blynk","region":"loc                                                                     al","pass":"txbgCpw3EXeGpM/KUK3xs682JQsWIf6iaB4F6IzfoZ0=","lastModifiedTs":1506854768330,"lastLogge                                                                     dIP":"178.243.30.156","lastLoggedAt":1506854788921,"profile":{},"isFacebookUser":false,"isSuperAdmi                                                                     n":true,"energy":100000,"isLoggedOut":false,"id":"tsavascii@gmail.com-Blynk"}
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java                                                                     :62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorI                                                                     mpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
        at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:496)
        at cc.blynk.server.core.dao.FileManager.deserializeUsers(FileManager.java:154)
        at cc.blynk.server.Holder.<init>(Holder.java:107)
        at cc.blynk.server.launcher.ServerLauncher.start(ServerLauncher.java:106)
        at cc.blynk.server.launcher.ServerLauncher.main(ServerLauncher.java:100)
Caused by: java.lang.IllegalStateException: Duplicate key {"name":"tsavascii@gmail.com","email":"ts                                                                     avascii@gmail.com","appName":"Blynk","region":"local","pass":"txbgCpw3EXeGpM/KUK3xs682JQsWIf6iaB4F6                                                                     IzfoZ0=","lastModifiedTs":1506854768330,"lastLoggedIP":"178.243.30.156","lastLoggedAt":150685478892                                                                     1,"profile":{},"isFacebookUser":false,"isSuperAdmin":true,"energy":100000,"isLoggedOut":false,"id":                                                                     "tsavascii@gmail.com-Blynk"}
        at java.util.stream.Collectors.lambda$throwingMerger$137(Collectors.java:133)
        at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
        at java.util.stream.Collectors.lambda$toConcurrentMap$196(Collectors.java:1472)
        at java.util.stream.ReferencePipeline.lambda$collect$98(ReferencePipeline.java:496)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
pi@Tamer_pi:~ $

Yes sorry I was just copying your typo.

then “my bad”…

looks like a java problem? isnt it?

Are you using 8 or 9? Forget that only 8 available for Pi.

Did you replace file? Error tells that you have few files with same user.