ERROR: Connecting to database engine. ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) | FWCloud Forum

ERROR: Connecting to database engine. ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111)

kpiq

New member
Folks

My system is running Ubuntu 22.04 LTS. Just tried your fwcloud-installer.sh and this happened. The full details are on the attached file.

Can you help?

(*) TypeScript code compilation.
Compiling websrv (please wait) ... DONE
Compiling api (please wait) ... DONE
Compiling updater (please wait) ... DONE

(*) FWCloud database.
Next we are going to create the fwcloud database.
ERROR: Connecting to database engine.
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111)
root@psnac00:/usr/local/u/opt/fwcloud-installer#

#uname -a
Linux psXXXXX 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
 

Attachments

  • tmp.txt (22.2 KB)
    File size
    22.2 KB
    Download
    1
  • mariadb.txt (1.5 KB)
    File size
    1.5 KB
    Download
    1

Carles Munyoz

Administrator
Staff member
Hi,
We are trying to reproduce the error in a fresh and updated Ubuntu 22.04 LTS.
I'll inform you with the results of the tests once we finish them.

Thank you for the feedback.
 

kpiq

New member
BTW, just "apt purge "mariadb*" and chose to purge /var/lib/mysql. Then rm -fr /opt/fwcloud. Re-ran the fwcloud-installer.sh and had the same result.

The mariadb versions installed are:

apt list --installed "mariadb*"
Listing... Done
mariadb-client-10.6/jammy-updates,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 amd64 [installed,automatic]
mariadb-client-core-10.6/jammy-updates,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 amd64 [installed,automatic]
mariadb-common/jammy-updates,jammy-updates,jammy-security,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 all [installed,automatic]
mariadb-server-10.6/jammy-updates,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 amd64 [installed,automatic]
mariadb-server-core-10.6/jammy-updates,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 amd64 [installed,automatic]
mariadb-server/jammy-updates,jammy-updates,jammy-security,jammy-security,now 1:10.6.12-0ubuntu0.22.04.1 all [installed]
 

Carles Munyoz

Administrator
Staff member
We have been able to install FWCloud by means of FWCloud-Installer in a fresh installed and updated Ubuntu 22.04.2 LTS Server. That is something that we usually verify every time a new release is published, but we checked it again just in case.

Are you installing FWCloud in a new server or are in a server that you already had with other services?

Looking at the log files that you have supplied it seems that the problem is in your database engine.
Bash:
Starting mariadb service ... Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.

Is the MariaDB database engine working?
Are you already using it with other services?
 

kpiq

New member
Apparently it was installed but was no longer in use. Yet, after purging all mariadb* packages twice, and re-running fwcloud-installer.sh it still fails. Any ideas?
 

kpiq

New member
"OK, some remnants of mariadb.service were still in the system, in a folder called /run/systemd/propagate/. "apt purged" mariadb.service a 3rd time, rebooted the system. The files in /run/systemd/propagate/ are gone. Re-ran the fwcloud-installer.sh for the 3rd time. Same failure.
Your help is appreciated.
 

Carles Munyoz

Administrator
Staff member
You have to check first that the MariaDB engine is working fine.
Can you log into your MariaDB engine and create a new database?
 

kpiq

New member
Hello, Carlos, mariadb is now up and running. I ran the fwcloud-installer.sh. Running systemctl status -a and searching for fwcloud shows up nothing. Telnet localhost 3030 connection refused. What's up?

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.000 sec)

MariaDB [(none)]> show tables in sys;
+-----------------------------------------------+
| Tables_in_sys |
+-----------------------------------------------+
| host_summary |
| host_summary_by_file_io |
| host_summary_by_file_io_type |
| host_summary_by_stages |
| host_summary_by_statement_latency |
| host_summary_by_statement_type |
| innodb_buffer_stats_by_schema |
| innodb_buffer_stats_by_table |
| innodb_lock_waits |
| io_by_thread_by_latency |
| io_global_by_file_by_bytes |
| io_global_by_file_by_latency |
| io_global_by_wait_by_bytes |
| io_global_by_wait_by_latency |
| latest_file_io |
| memory_by_host_by_current_bytes |
| memory_by_thread_by_current_bytes |
| memory_by_user_by_current_bytes |
| memory_global_by_current_bytes |
| memory_global_total |
| metrics |
| processlist |
| ps_check_lost_instrumentation |
| schema_auto_increment_columns |
| schema_index_statistics |
| schema_object_overview |
| schema_redundant_indexes |
| schema_table_lock_waits |
| schema_table_statistics |
| schema_table_statistics_with_buffer |
| schema_tables_with_full_table_scans |
| schema_unused_indexes |
| session |
| session_ssl_status |
| statement_analysis |
| statements_with_errors_or_warnings |
| statements_with_full_table_scans |
| statements_with_runtimes_in_95th_percentile |
| statements_with_sorting |
| statements_with_temp_tables |
| sys_config |
| user_summary |
| user_summary_by_file_io |
| user_summary_by_file_io_type |
| user_summary_by_stages |
| user_summary_by_statement_latency |
| user_summary_by_statement_type |
| version |
| wait_classes_global_by_avg_latency |
| wait_classes_global_by_latency |
| waits_by_host_by_latency |
| waits_by_user_by_latency |
| waits_global_by_latency |
| x$host_summary |
| x$host_summary_by_file_io |
| x$host_summary_by_file_io_type |
| x$host_summary_by_stages |
| x$host_summary_by_statement_latency |
| x$host_summary_by_statement_type |
| x$innodb_buffer_stats_by_schema |
| x$innodb_buffer_stats_by_table |
| x$innodb_lock_waits |
| x$io_by_thread_by_latency |
| x$io_global_by_file_by_bytes |
| x$io_global_by_file_by_latency |
| x$io_global_by_wait_by_bytes |
| x$io_global_by_wait_by_latency |
| x$latest_file_io |
| x$memory_by_host_by_current_bytes |
| x$memory_by_thread_by_current_bytes |
| x$memory_by_user_by_current_bytes |
| x$memory_global_by_current_bytes |
| x$memory_global_total |
| x$processlist |
| x$ps_digest_95th_percentile_by_avg_us |
| x$ps_digest_avg_latency_distribution |
| x$ps_schema_table_statistics_io |
| x$schema_flattened_keys |
| x$schema_index_statistics |
| x$schema_table_lock_waits |
| x$schema_table_statistics |
| x$schema_table_statistics_with_buffer |
| x$schema_tables_with_full_table_scans |
| x$session |
| x$statement_analysis |
| x$statements_with_errors_or_warnings |
| x$statements_with_full_table_scans |
| x$statements_with_runtimes_in_95th_percentile |
| x$statements_with_sorting |
| x$statements_with_temp_tables |
| x$user_summary |
| x$user_summary_by_file_io |
| x$user_summary_by_file_io_type |
| x$user_summary_by_stages |
| x$user_summary_by_statement_latency |
| x$user_summary_by_statement_type |
| x$wait_classes_global_by_avg_latency |
| x$wait_classes_global_by_latency |
| x$waits_by_host_by_latency |
| x$waits_by_user_by_latency |
| x$waits_global_by_latency |
+-----------------------------------------------+
101 rows in set (0.000 sec)

MariaDB [(none)]>
 

kpiq

New member
I did password-protect mariadb user = root and also user = debian-sys-maint. Would that mean anything?
This is the output of fwcloud-installer.sh:

#################################################################################
# #
# Copyright 2020 SOLTECSIS SOLUCIONES TECNOLOGICAS, SLU #
# https://soltecsis.com #
# info@soltecsis.com #
# #
# #
# This file is part of FWCloud (https://fwcloud.net). #
# #
# FWCloud is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Affero General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# FWCloud is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with FWCloud. If not, see <https://www.gnu.org/licenses/>. #
# #
#################################################################################

(*) Linux distribution.
Detected supported Linux distribution: Ubuntu 22.04.2 LTS


This shell script will install/update FWCloud on your system.
Projects fwcloud-websrv, fwcloud-ui, fwcloud-api and fwcloud-updater will be installed.
Do you want to continue? [Y/n]

(*) HTTP/HTTPS proxy.
As part of the install procedure we will download system packages and NodeJS modules.
If this system requires a HTTP/HTTPS proxy you have to specify its URL.
Are you behind an HTTP/HTTPS proxy? [y/N]

(*) Searching for required packages.
PACKAGE: lsof ... FOUND

PACKAGE: git ... FOUND

PACKAGE: curl ... FOUND

PACKAGE: OpenSSL ... FOUND

PACKAGE: OpenVPN ... FOUND

PACKAGE: osslsigncode ... FOUND

Setting up Node.js repository ... DONE
PACKAGE: Node.js ... FOUND

(*) Database engine.
FWCloud needs a MariaDB or MySQL database engine.
MariaDB ... FOUND

(*) Installing/updating from GitHub repositories.
We are going to install/update the next FWCloud projects:
fwcloud-websrv [UPDATE] (https://github.com/soltecsis/fwcloud-websrv.git)
fwcloud-ui [UPDATE] (https://github.com/soltecsis/fwcloud-ui.git)
fwcloud-api [UPDATE] (https://github.com/soltecsis/fwcloud-api.git)
fwcloud-updater [UPDATE] (https://github.com/soltecsis/fwcloud-updater.git)
These repositories will be installed/updated into the directory: /opt/fwcloud
Is it right? [Y/n]

Updating fwcloud-websrv ...
Don't needs update, it is already up to date.

Updating fwcloud-ui ...
Don't needs update, it is already up to date.

Updating fwcloud-api ...
Don't needs update, it is already up to date.

Updating fwcloud-updater ...
Don't needs update, it is already up to date.

(*) Setting up permissions.
Creating fwcloud user/group and setting up permissions.

--- PROCESS COMPLETED ----
Your FWCloud system is ready!

If you need help please contact us:
info@fwcloud.net
--------------------------

root@psnac00:/opt/fwcloud# systemctl status -a
● psnac00
State: running
 

Carles Munyoz

Administrator
Staff member
Remove the `/opt/fwcloud` folder and then launch de install script again.
Let me know if all goes fine now.
 

kpiq

New member
Terrific, love the interface, works smoothly when discovering the interfaces and firewall rules. Looks excellent. will help me map and tune my home network's firewalls.
One question, and it will show I know nothing about mysql/mariadb. With the mysql/mariadb root password-protected, how are you able to create databases and all sorts of elements in my system?
 

Carles Munyoz

Administrator
Staff member
Thank you very much for your comments. I deduce for them that you have now FWCloud operative, great! :)

The FWCloud Installer script must be executed by root or a sudo user, for this reason it is not necessary to indicate the database password for create the FWCloud required database.

If you have further questions, please let me know.
 
Top