Howto install guacamole

No luck…

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Please check if tomcat is running and if there are errors:

systemctl status tomcat -l

Same with mariadb:

systemctl status mariadb -l

Try to restart the services:

systemctl restart mariadb tomcat

I think it has something to do with mariadb.

[root@gateway ~]# mysql
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
[root@gateway ~]# sudo mysql -uroot -p

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 5.5.56-MariaDB MariaDB Server

Copyright © 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>

I believe the database is not even getting installed.

Normally root can login without password. Did you change the mysql root password?

You may use cat ~/.my.cnf to get the mysql root password and then login to mysql and reset the password:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'THEPASSWORDFROMMYCNF';

That may be because root is used to create database and users.

MariaDB [(none)]> alter user root set password = ‘UY4_FzRrsMYs7D1q’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘use r root set password = ‘UY4_FzRrsMYs7D1q’’ at line 1
MariaDB [(none)]>

MariaDB [(none)]> UPDATE user SET password=password(‘UY4_FzRrsMYs7D1q’) WHERE user=‘root’; ERROR 1046 (3D000): No database selected
MariaDB [(none)]>

Not sure what I am doing wrong, but it seems like there is no database present. Any other ideas’? Should I reinstall everything from scratch(including Neth Server??

No, that’s not necessary. These commands should work to set the password:

MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('UY4_FzRrsMYs7D1q') WHERE User = 'root' AND Host = 'localhost';
MariaDB [(none)]> flush privileges;

Now you should be able to login to mysql as root without password.

[root@testserver ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
...

You may reconfigure guacamole with signal-event nethserver-guacamole-update. This way the database should be created correctly.

MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD(‘UY4_FzRrsMYs7D1q’) WHERE User = ‘root’ AND Host = ‘localhost’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

[root@gateway ~]# mysql
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

Still the same…but the password is changed.

Please try this and enter the actual root password:

mysqladmin -p password UY4_FzRrsMYs7D1q

Now you should be able to login to mysql without password.

That worked. I restarted mariadb but looks like there is something still wrong with it.

Apr 17 10:08:15 gateway.vmakol.lan systemd[1]: Starting MariaDB database server…
Apr 17 10:08:15 gateway.vmakol.lan mariadb-prepare-db-dir[22350]: Socket file /var/lib/mysql/mysql.sock exists.
Apr 17 10:08:15 gateway.vmakol.lan mariadb-prepare-db-dir[22350]: Is another MySQL daemon already running with the same unix socket?
Apr 17 10:08:15 gateway.vmakol.lan systemd[1]: mariadb.service: control process exited, code=exited status=1
Apr 17 10:08:15 gateway.vmakol.lan systemd[1]: Failed to start MariaDB database server.
Apr 17 10:08:15 gateway.vmakol.lan systemd[1]: Unit mariadb.service entered failed state.
Apr 17 10:08:15 gateway.vmakol.lan systemd[1]: mariadb.service failed.

I assume mysqld is running and you’re restarting mariadb which is the same service in background.

Please try the following to restart mysql:

systemctl restart mysqld

Correct, the mysqld service is running. I restarted it and still the same message.

You may try stop both services and start mysqld:

systemctl stop mysqld mariadb
systemctl start mysqld

If that does not work there’s maybe another mysql process running. To check that please enter:

ps aux | grep mysql

[root@gateway ~]# ps aux | grep mysql
mysql 23642 0.2 0.0 113260 1596 ? Ss 10:24 0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
mysql 23815 1.4 1.0 905424 86408 ? Sl 10:24 0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
root 23855 0.0 0.0 112660 972 pts/0 S+ 10:24 0:00 grep --color=auto mysql
[root@gateway ~]#

I think it’s because of the guacamole package which enables mariadb tough mysqld is already enabled, I’ll try to provide an update this week.

Please try disabling mariadb and reboot:

systemctl disable mariadb

After reboot you should be able to restart mysql without error:

systemctl restart mysqld

Reinstalled Guacamole. The guacd and mysqld are running but still getting the same result…

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

OK so let’s try restart tomcat and check if it’s running and if there are errors:

systemctl restart tomcat
systemctl status tomcat -l

Earlier tomcat was not throwing any errors but now is.

Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at java.lang.reflect.Method.invoke(Method.java:498)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: Apr 17, 2018 10:52:10 AM org.apache.catalina.startup.Catalina load
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: WARNING: Catalina.start using conf/server.xml: Attribute “URIEncoding” was already specified for element “Connector”.
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: Apr 17, 2018 10:52:10 AM org.apache.catalina.startup.Catalina start
Apr 17 10:52:10 gateway.vmakol.lan server[19403]: SEVERE: Cannot start server. Server instance is not configured.

I am sorry for the circumstances. The install script of guacamole is buggy and implements the connector for guacamole several times. Update of the package will follow.

Please open /etc/tomcat/server.xml with your favourite editor and search for following lines (line 91). I assume there are duplicates, try to delete them.
You may just post your /etc/tomcat/server.xml and I search for the errors.

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="/var/lib/tomcat/webapps/.keystore"
               keystorePass="guacamole"
               URIEncoding="UTF-8" />

Another line may make problems when occuring more times (line 71):

URIEncoding="UTF-8"

I have uploaded the server.xml here:

https://vmakol.com/nextcloud/index.php/s/oPmqxWaa4LYetyo

Should this be there?

<Connector port=“8443” protocol=“org.apache.coyote.http11.Http11Protocol”