When i run the install.bat file on a windows 7 machine. i receive the following error:
Detecting Java version installed. Detecting if it is 64 bit machine CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8 Java 1.8 found! Installing thingsboard ... Error: Could not find or load main class Files\thingsboard\lib\thingsboard.jar ThingsBoard installation failed!
I assumed it was reading the BASE file directory incorrectly. So I it to the absolute directory location as shown below:
SET BASE="C:\Program Files\thingsboard"
SET LOADER_PATH=%BASE%\conf,%BASE%\extensions
SET SQL_DATA_FOLDER=%BASE%\data\sql
SET jarfile=%BASE%\lib\thingsboard.jar
SET installDir=%BASE%\data
I get the following error:
Detecting Java version installed. Detecting if it is 64 bit machine CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8 Java 1.8 found! Installing thingsboard ... Logging system failed to initialize using configuration from 'C:\Program Files\thingsboard\install\logback.xml' java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Failed to create parent directories for [C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - openFile("C:\Program Files\thingsboard"\logs /install.log,true) call failed. java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log (The file name, directory name, or volume label syntax is incorrect) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161 ) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.jav a:57) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:47) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114) at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java: 304) at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingAppl icationListener.java:235) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.jav a:208) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult icaster.java:166) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult icaster.java:138) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult icaster.java:121) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe ner.java:68) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java :54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:42) 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) java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Failed to create parent directories for [C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - openFile("C:\Program Files\thingsboard"\logs /install.log,true) call failed. java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log (The file name, directory name, or volume label syntax is incorrect) ThingsBoard installation failed!
What am I doing wrong?
The quotes seem to be a problem.
C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log
Have you tried to use SET BASE=%ProgramFiles%\thingsboard
or escape the space in the path with a ^ SET BASE=C:\Program^ Files\thingsboard
?
The problem is because of the space in the install dir.
I have tried to install it in "c:\test folder" and got the same problem. There was no problem when installing in a folder without space like "c:\test"
I changed the following part in the install.bat file and was able to install it in the folder with a space.
SET "BASE=%~dp0"
SET "LOADER_PATH=%BASE%conf,%BASE%extensions"
SET "SQL_DATA_FOLDER=%BASE%data\sql"
SET "jarfile=%BASE%lib\thingsboard.jar"
SET "installDir=%BASE%data"
PUSHD %BASE%conf
java -cp "%jarfile%" -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication "-Dinstall.data_dir=%installDir%" -Dinstall.load_demo=%loadDemo% -Dspring.jpa.hibernate.ddl-auto=none -Dinstall.upgrade=false "-Dlogging.config=%BASE%install\logback.xml" org.springframework.boot.loader.PropertiesLauncher
if errorlevel 1 (
@echo ThingsBoard installation failed!
POPD
exit /b %errorlevel%
)
POPD
"%BASE%thingsboard.exe" install