Page 1 of 2
[Solved] Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:14 pm
by SeanCTS
So I ran my usual
from my ubuntu shell and looked liked everything downloaded, but when Unimus goes to start the service, I get an error:
Code: Select all
Job for unimus.service failed because the control process exited with error code. See "systemctl status unimus.service" and "journalctl -xe" for details.
Any suggestions?
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:27 pm
by Tomas
Could you please run Unimus manually and paste the logs?
Thanks!
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:38 pm
by SeanCTS
Code: Select all
13:33:34.671 [main] INFO net.unimus.Application - Starting Application v1.6.0 on chcdevman with PID 1826 (/opt/unimus/Unimus.jar started by chcnetadmin in /opt/unimus)
13:33:34.704 [main] INFO net.unimus.Application - The following profiles are active: together,unix,jar
13:34:02.611 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 8085 (http)
13:34:09.896 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8085 (http)
13:34:09.909 [main] INFO net.unimus.Application - Started Application in 45.361 seconds (JVM running for 47.591)
13:34:10.327 [SimpleAsyncTaskExecutor-1] INFO net.unimus.system.bootstrap.boot.step.LoggingPathAccessibility - Checking logging subsystem
13:34:10.328 [SimpleAsyncTaskExecutor-1] ERROR net.unimus.system.bootstrap.boot.step.LoggingPathAccessibility - Cannot create logging directory /var/log/unimus
13:34:10.342 [SimpleAsyncTaskExecutor-1] INFO net.unimus.system.bootstrap.boot.step.DatabaseConnectionCheck - Testing database connection
13:34:10.493 [SimpleAsyncTaskExecutor-1] WARN net.unimus.system.bootstrap.boot.step.DatabaseConnectionCheck - Database HsqlConfig{path='/etc/unimus/hsql/db', user='username'} connection test failed. Reason = org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@b2587fd2[file =/etc/unimus/hsql/db.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: /etc/unimus/hsql/db.lck (Permission denied)
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:40 pm
by Tomas
/etc/unimus/hsql/db.lck (Permission denied)
Could you please try to run as root?
Thanks!
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:53 pm
by SeanCTS
sorry,
yes,
Code: Select all
/ / / / ____ (_) ____ ___ __ __ _____
/ / / / / __ \ / / / __ `__ \ / / / / / ___/
/ /__/ / / / / / / / / / / / / / / /_/ / (__ )
\___,___/ /_/ /_/ /_/ /_/ /_/ /_/ \__,_/ /____/
:: © 2016-2018 NetCore j.s.a. :: version 1.6.0 ::
2018-03-27 13:42:36.682 INFO 1964 --- [ main] net.unimus.Application : Starting Application v1.6.0 on chcdevman with PID 1964 (/opt/unimus/Unimus.jar started by root in /opt/unimus)
2018-03-27 13:42:36.713 INFO 1964 --- [ main] net.unimus.Application : The following profiles are active: together,unix,jar
2018-03-27 13:43:00.025 INFO 1964 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8085 (http)
2018-03-27 13:43:08.073 INFO 1964 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8085 (http)
2018-03-27 13:43:08.099 INFO 1964 --- [ main] net.unimus.Application : Started Application in 41.302 seconds (JVM running for 42.664)
2018-03-27 13:43:08.103 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.LoggingPathAccessibility : Checking logging subsystem
2018-03-27 13:43:08.133 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck : Testing database connection
2018-03-27 13:43:10.773 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck : Database connection test passed
2018-03-27 13:43:10.774 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate : Connecting to database (HSQL, jdbc:hsqldb:file:///etc/unimus/hsql/db)
2018-03-27 13:43:10.776 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate : Updating database schema
2018-03-27 13:43:14.089 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate : Database schema updated successfully
2018-03-27 13:43:15.895 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.EncryptionKeyValidation : Validating database encryption key
2018-03-27 13:43:16.305 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.DatabaseDataValidation : Validating database data integrity
2018-03-27 13:43:16.629 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.InternalInitialization : Initializing internal services
2018-03-27 13:43:16.704 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.patch.BackupsLineEndingsPatch : Running backup line endings fix patch
2018-03-27 13:43:52.955 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.patch.BackupsDuplicityPatch : Running duplicate backup removal patch
2018-03-27 13:44:00.930 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.b.step.InternalInitialization : Internal initialization completed
2018-03-27 13:44:00.930 INFO 1964 --- [cTaskExecutor-1] n.u.s.b.boot.step.LicenseKeyValidation : Validating license key
2018-03-27 13:44:03.047 INFO 1964 --- [ask-scheduler-3] net.unimus.system.state.states.OkState : Unimus is ready; enjoy the application :)
2018-03-27 13:44:03.176 INFO 1964 --- [ask-scheduler-3] net.unimus.business.scheduler.Scheduler : Scheduling 'discovery / backup' job 'Every day at 06:00.'
2018-03-27 13:44:03.234 INFO 1964 --- [ask-scheduler-3] net.unimus.business.scheduler.Scheduler : Scheduling 'delete backups' job 'Every day at 06:00.'
2018-03-27 13:44:03.644 INFO 1964 --- [ask-scheduler-3] net.unimus.business.core.Core : Performing discovery on 2 device(s)
It seems to run fine manually.
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 5:56 pm
by Tomas
Ok, that's good news, means release 1.6.0 itself is not the problem.
How does your install.sh look like?
We recently released a new installer, maybe you are still using the old install script?
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 6:02 pm
by SeanCTS
Code: Select all
#!/bin/bash
# Author: Tomas Kirnak
# Version: 2017-01-31-01
# check if root
user=$(whoami);
if [[ "$user" != "root" ]]; then
echo 'This installer requires root priviledges.';
echo 'Please switch to root and run the installer again.';
exit 1;
fi;
# check Java version
javaRegex='(?:1\.8\.0_(?:[5-9]\d|[1-9]\d\d)|1\.8\.[1-9]|1\.9|1\.\d\d+)';
echo 'Checking if supported Java version present...';
javaVersion=$(java -version |& grep -P "$javaRegex");
javaSupported=$(echo $?);
if [[ "$javaSupported" == "0" ]]; then
echo 'Supported Java version found!';
echo;
else
echo;
echo 'Supported Java version not found!';
echo 'Please install JRE (Java Runtime Environment) 1.8-u50 or newer and run the installer again.';
echo "We support both OpenJDK ('openjdk-8-jre' package) and Oracle Java ('oracle-java8-installer' package).";
echo;
exit 1;
fi;
# inform the user what this installer will do
echo 'Welcome to the Unimus installer!';
echo;
echo 'This installer will perform the following steps:';
echo '1) download the latest version of Unimus';
echo '2) download the init files';
echo '3) register Unimus as a service';
echo '4) start Unimus';
echo;
echo 'If you are upgrading from a previous version, your current Unimus service will be stopped and restarted after the upgrade.';
echo;
echo 'Press ENTER to continue, or Ctrl+C to exit.';
read -s;
echo;
# stop Unimus service if currently running (needed during upgrade)
echo 'The running Unimus service (if any) will now be stopped.';
service unimus stop &> /dev/null;
# unregister Unimus service auto-start (needed during upgrade)
echo 'Unimus service (if present) will now be removed from auto-start.';
update-rc.d -f unimus remove &> /dev/null;
# download Unimus
echo;
echo 'Downloading Unimus...';
curl https://unimus.net/download/-%20Latest/Unimus.jar --create-dirs -o /opt/unimus/Unimus.jar 2>&1;
# download init file
echo;
echo 'Downloading init script...';
curl https://unimus.net/download/deb/init -o /etc/init.d/unimus 2>&1;
chmod +x /etc/init.d/unimus 2>&1;
# create basic settings file (if not already present)
if [ ! -f /etc/default/unimus ]; then
echo "-Xms256M -Xmx768M" > /etc/default/unimus;
fi
# register Unimus service auto-start
echo;
echo 'Configuring Unimus service to auto-start.';
update-rc.d unimus defaults &> /dev/null;
# start Unimus service
echo;
echo 'Starting the Unimus service.';
service unimus start 2>&1;
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 6:10 pm
by Tomas
That's indeed the older install script.
Can you please run the new one instead?
https://wiki.unimus.net/pages/viewpage. ... eId=950330
Thanks!
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 6:53 pm
by SeanCTS
groovy. Couldn't run it from bash from the web... kept getting an error:
Code: Select all
bash: /dev/fd/63sudo: No such file or directory
chcnetadmin@chcdevman:/opt/unimus$ (23) Failed writing body
I was able to download it via wget and copy it to the unimus folder and run it that way and all is joy.
Re: Updated to 1.6 and Unimus doesn't start
Posted: Tue Mar 27, 2018 6:57 pm
by Tomas
It's a quirk of bash, where if you run that command with sudo, it will error out.
But sudo su and then running it works fine.
Anyway, glad to hear this is sorted out
