Server installation on Ubuntu 18.04.2 LTS

topics, questions, hints and more about QuickHMI

Moderator: Board-Admin

sandolution
Posts: 3
Joined: 29. April 2019, 10:30

Server installation on Ubuntu 18.04.2 LTS

Postby sandolution » 29. April 2019, 14:20

Goodday all,

I'm trying to install the server instance on an Ubuntu 18.04.2 LTS system, but I'm currently running into some problems.

First of all, Oracle Java 8 is not available from the ppa:webupd8team/java repository as of 16th April this year.
This results in an unsatisfied installation command during the execution of qhmi_Linux_requirements.sh:

Code: Select all

Start java installation...
E: Package 'oracle-java8-installer' has no installation candidate
Java installed!

I was able to install Java 8 via a different way, using the installer from the Oracle website.
If needed, I can share this workaround.
EDIT: Java workaround added!:
Download Java JDK for Linux x64 from the Oracle site.
Should be something like 'jdk-8u212-linux-x64.tar.gz'
Then use the following commands to set it up:

Code: Select all

tar –xf jdk*
mkdir /usr/lib/jvm
mkdir /usr/lib/jvm/java-8-oracle
mv ./jdk*/* /usr/lib/jvm/java-8-oracle
rm -rf ./jdk*
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-8-oracle/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-8-oracle/bin/javaws" 1
chmod a+x /usr/bin/java
chmod a+x /usr/bin/javac
chmod a+x /usr/bin/javaws
chown -R root:root /usr/lib/jvm/java-8-oracle


Using the version command I know that my Java is properly installed:

Code: Select all

root@ubuntu:# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

When running the installer again, I can now safely ignore the unresolved installation and know that the rest is installed correctly, including the QuickHMI Server:

Code: Select all

QuickHMI Server installed!

So far, everything is good and resolved.

The second problem is regarding running the server.
I start with importing my project:

Code: Select all

root@ubuntu:# qhmiRM --import /home/sander/Testversion.qexp
QuickHMI Console Configurator 7.8.2.0
Import successful.
chmod: missing operand after ‘777’
Try 'chmod --help' for more information.

I edited the import script located under (/home/quickhmi/QuickHMIServer/qhmiRM.sh).
This script seems to refer to an unexisting variable in the import method:

Code: Select all

chmod 777 -R $QHMIENV_PATH

By removing this line from the import script, I was able to import succesfully:

Code: Select all

root@ubuntu:# qhmiRM --import /home/sander/Testversion.qexp
QuickHMI Console Configurator 7.8.2.0
Do you want to overwrite existing security data (Groups, users, passwords...)? (Y/N)
Y
Import successful.

After that I start my server:

Code: Select all

root@ubuntu:# qhmiRM -rd
Starting the QuickHMI server
Param: 1G
Success

But, the process seems to die immediately:

Code: Select all

root@ubuntu:# qhmiRM -c
Server seems to have died


Looking into the log files under (/usr/share/Indi.Systems/QuickHMI Server v7/logs/), I only saw the folder consolerm.
Therefore, I gave the whole Indi.Systems folder 777 rights using chmod (as said somewhere in https://www.forum.indi-systems.com/viewtopic.php?f=30&t=1104 topic)
This gave the server also the possibility to write server logs. In my opinion this should be done by the installer.

Code: Select all

root@ubuntu:# cat out.log
INFO  2019-04-25 14:00:26.988 de.indisystems.quickhmi.server.core.c:70 - Initializing server...
INFO  2019-04-25 14:00:27.000 de.indisystems.quickhmi.server.core.c:73 - Regular start...
INFO  2019-04-25 14:00:27.918 de.indisystems.quickhmi.servercommons.g:1168 - Read instance config file '/usr/share/Indi.Systems/QuickHMI Server v7/instances/1/instance.cfg'
INFO  2019-04-25 14:00:27.931 de.indisystems.quickhmi.servercommons.g:1209 - Instance config loaded successfully.
INFO  2019-04-25 14:00:27.932 de.indisystems.quickhmi.server.core.c:82 - Initialize instance '1'.
INFO  2019-04-25 14:00:28.038 de.indisystems.quickhmi.server.b.a:132 - Initializing datastore...
INFO  2019-04-25 14:00:28.280 de.indisystems.quickhmi.server.b.a:146 - Verify project files...
INFO  2019-04-25 14:00:28.636 de.indisystems.quickhmi.server.b.a:153 - Project files verified.
INFO  2019-04-25 14:00:29.096 de.indisystems.quickhmi.server.b.a:1922 - Loading jdbc drivers.
INFO  2019-04-25 14:00:29.097 de.indisystems.quickhmi.server.b.a:1950 - 0 driver found in /usr/share/Indi.Systems/QuickHMI Server v7/jdbc_driver.
INFO  2019-04-25 14:00:29.097 de.indisystems.quickhmi.server.b.a:327 - Parsing project file...
ERROR 2019-04-25 14:00:29.778 de.indisystems.quickhmi.server.b.a.a.b:201 - No project ID found. Historic data logging not working.
ERROR 2019-04-25 14:00:29.802 de.indisystems.quickhmi.server.b.a:1004 - Error parsing project file.
java.lang.NullPointerException: null
   at de.indisystems.quickhmi.server.b.a.a.a.<init>(SourceFile:256) ~[qhmi_server.jar:?]
   at de.indisystems.quickhmi.server.b.a.h(SourceFile:988) [qhmi_server.jar:?]
   at de.indisystems.quickhmi.server.b.a.a(SourceFile:162) [qhmi_server.jar:?]
   at de.indisystems.quickhmi.server.b.a.a(SourceFile:121) [qhmi_server.jar:?]
   at de.indisystems.quickhmi.server.core.c.a(SourceFile:87) [qhmi_server.jar:?]
   at de.indisystems.quickhmi.server.MainNonFx.main(SourceFile:1140) [qhmi_server.jar:?]
INFO  2019-04-25 14:00:29.814 de.indisystems.quickhmi.server.b.a:206 - Datastore initialized...
INFO  2019-04-25 14:00:29.815 de.indisystems.quickhmi.server.core.c:93 - Couldn't initialize datastore for instance '1'.
INFO  2019-04-25 14:00:29.815 de.indisystems.quickhmi.server.core.c:101 - Server initialized...
ERROR 2019-04-25 14:00:29.816 de.indisystems.quickhmi.server.core.c:143 - Can't start server. Datastore not initialized.



Can anything be said regarding this starting issue? Am I missing something to get the server running properly?
The test project I created is a real-machine project, normally running on Windows without problems.

I'm looking forward to hearing from you.

Best regards,
Sander Verbeek
Last edited by sandolution on 3. May 2019, 12:32, edited 1 time in total.

support
Posts: 37
Joined: 18. August 2016, 14:43

Re: Server installation on Ubuntu 18.04.2 LTS

Postby support » 29. April 2019, 15:18

Hello sandolution,

root@ubuntu:# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

Seems your java installation worked well.

Here are a few things you might want to check:

1.) are the versions of the project (corresponds to version of the editor) and the qhmi runtime manager on linux identical?
2.) try import a new small project
3.) please check if there are files in this path: /usr/share/Indi.Systems/QuickHMI Server v7/jdbc_driver?

Could you please send your project file to us? We will look at it.

Best regards
Christian

sandolution
Posts: 3
Joined: 29. April 2019, 10:30

Re: Server installation on Ubuntu 18.04.2 LTS

Postby sandolution » 30. April 2019, 10:52

Hello Christian,

Thanks for your reply.

The (machine)project file I used was created using editor version 7.6.3.0.
Version.txt on the server shows that it is version 7.8.2, so there is a minor difference there.
Can this be of much influence?
I will try creating and importing a new, small project using the latest editor this evening and post my findings.

As for the jdbc_driver: there is no database used in the project I used, merely OPC UA comms.
The contents of the '/usr/share/Indi.Systems/QuickHMI Server v7/' folder are as follows:

Code: Select all

root@ubuntu:# ls
instances   logs   server.cfg


Thanks in advance,
Regards,
Sander

sandolution
Posts: 3
Joined: 29. April 2019, 10:30

Re: Server installation on Ubuntu 18.04.2 LTS

Postby sandolution » 3. May 2019, 12:30

Hello Christian,

As promised, I did some testing and managed to get it working properly.

First of all, I started with a new, clean install on a box PC running Ubuntu 18.
Using my earlier mentioned workaround for Java installation, it was fairly easy to install Java and the QuickHMI server.
Despite it giving installation errors regarding Java, that is.
I'll edit my original post and add this there.

As said, I edited '/home/quickhmi/QuickHMIServer/qhmiRM.sh' to remove the faulty line:

Code: Select all

chmod 777 -R $QHMIENV_PATH

Also, I found out that it is also needed to give the proper rights to the quickHMI folders:

Code: Select all

chown -R quickhmi:quickhmi /usr/share/Indi.Systems/

Thereafter, I started with a new project that was made with Editor version 7.8.3.0.
Simply import and run was all I had to do to get it working.

So, problem solved. I do however think that the workarounds above should be implemented/fixed in the automatic installer!
Please feel free to share your vision on this, as I can support with this if needed.

Best regards,
Sander


Return to “Topics about QuickHMI”



Who is online

Users browsing this forum: No registered users and 0 guests