Hi, I'm trying to install the latest Thingsboard version for Windows, but without success. I always get the following error.
I'm hoping for help.
log4j:WARN No appenders could be found for logger (hsqldb.db.HSQLDB62F929FE31.ENGINE).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Starting ThingsBoard Installation...
Installing DataBase schema...
Installing SQL DataBase schema...
Loading system data...
Unexpected error during ThingsBoard installation!
org.thingsboard.server.dao.exception.DataValidationException: User with email '[email protected]' already present in database!
at org.thingsboard.server.dao.user.UserServiceImpl$1.validateDataImpl(UserServiceImpl.java:262)
at org.thingsboard.server.dao.user.UserServiceImpl$1.validateDataImpl(UserServiceImpl.java:212)
at org.thingsboard.server.dao.service.DataValidator.validate(DataValidator.java:38)
at org.thingsboard.server.dao.user.UserServiceImpl.saveUser(UserServiceImpl.java:91)
at org.thingsboard.server.service.install.DefaultSystemDataLoaderService.createUser(DefaultSystemDataLoaderService.java:253)
at org.thingsboard.server.service.install.DefaultSystemDataLoaderService.createSysAdmin(DefaultSystemDataLoaderService.java:122)
at org.thingsboard.server.install.ThingsboardInstallService.performInstall(ThingsboardInstallService.java:126)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)
Unexpected error during ThingsBoard installation!
ThingsBoard installation failed!
it means that you have previously tried to install it, and the HSQLDB file exists. If you are using the default configuration, go to C:\tmp and delete all thingsboardDb* files
Hey, i already deleted the files , but the error still exists..
Can you please provide your thingsboard.yml config file? # HSQLDB DAO Configuration section only.
Do you have %SQL_DATA_FOLDER% environment variable set?
User with email '[email protected]' already present in database! means that it was added on previous run. If you have deleted the database file and the error still persists, this means that you did not remove the right one.
btw, just to check - you have unpacked .zip archive and run install.bat, correct? Latest version is 1.4.0 or built from source?
I've gotten the same error and fixed it by removing the unzipped directory and extracting the archive again and everything went fine after that.
I've gotten the same error and fixed it by removing the unzipped directory and extracting the archive again and everything went fine after that.
which unzipped directory?
I solved mine by opening pgAdmin and changing the server and username to postgress

depending on your dev environment:
linux local (non-docker):
/usr/share/thingsboard/data/sql/system-data.sql
local project docker:
./docker/tb-node/postgres
docker container:
/var/lib/postgresql/data
drop all tables or recreat database for 'thingsboard' and run 'install.exe --loadDemo' again. I
Deleting the thingsboard database and recreating seems to have done the trick for me. I'm installing on Ubuntu though.
You have got this error because you are installing thingsboard with non empty DB.
Recreate DB to perform the installation.
I have tried all the options but i am i getting the same error. Could you please help me to address this.
nexpected error during ThingsBoard installation!
org.thingsboard.server.dao.exception.DataValidationException: User with email '[email protected]' already present in database!
at org.thingsboard.server.dao.user.UserServiceImpl$1.validateDataImpl(UserServiceImpl.java:409)
at org.thingsboard.server.dao.user.UserServiceImpl$1.validateDataImpl(UserServiceImpl.java:359)
at org.thingsboard.server.dao.service.DataValidator.validate(DataValidator.java:41)
at org.thingsboard.server.dao.user.UserServiceImpl.saveUser(UserServiceImpl.java:116)
at org.thingsboard.server.service.install.DefaultSystemDataLoaderService.createUser(DefaultSystemDataLoaderService.java:249)
at org.thingsboard.server.service.install.DefaultSystemDataLoaderService.createSysAdmin(DefaultSystemDataLoaderService.java:110)
at org.thingsboard.server.install.ThingsboardInstallService.performInstall(ThingsboardInstallService.java:185)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:597)
Unexpected error during ThingsBoard installation!
ThingsBoard installation failed!
@Shahul1983 since you are trying to install TB without empty database, you have to run an upgrade script instead of install script to resolve your issue.
Thanks. Tried the same however getting the following error
Upgrading thingsboard ...
"--fromVersion parameter is invalid or unspecified!"
"Usage: upgrade.bat --fromVersion {VERSION}"
It is resolved. Dropped the corrupt db and recreated.
Most helpful comment
drop all tables or recreat database for 'thingsboard' and run 'install.exe --loadDemo' again. I