Jump to content

`OPENSSL_1_1_1' not found (required by dbconmy.so)


Recommended Posts

Hello!

I have a local network home server (192.168.0.4) for storage and other service server running. On this server I run Ubuntu server with CasaOS. I recently made two custom flask apps, one for a XAMPP manager and one for an MTA Server Manager so I can easily have a web UI on two different ports. I setup everything successfully, I could run and join to an FTP server from my main desktop PC (192.168.0.122) or laptop, manage MTA servers correctly, start and stop them, join them, open and run phpMyAdmin. But when I got to the part to run the MTA server on the server PC, and setup the MySQL database connection I run into an issue regarding linux.

[02:25:51] Starting Database
[02:25:51] ERROR: Could not load /home/hmsvr/ftp/servers/LegendaryLegacy/SA/x64/dbconmy.so - /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/hmsvr/ftp/servers/LegendaryLegacy/SA/x64/dbconmy.so)
[02:2 5:51] WARNING: [Engine]/[Main]/Database/S_Database.lua:17: Bad usage @ 'dbConnect' [Could not connect]
[02:25:51] ERROR: [Engine]/[Main]/Database/S_Database.lua:27: Database connection failed;

When I start the server on my desktop PC, but still use the server PC to run the Apache, MySQL and FTP, I can successfully connect to the MySQL server running on my server PC.

G_Database.lua & S_Database.lua sections for context

DATABASE_DETAILS = {
    ["host"] = "192.168.0.4", -- "127.0.0.1" or "localhost" if the mysql server - XAMPP - runs on your PC, or "your server ip" if you have a separate PC or VPS
    ["port"] = 3306, -- Provided in XAMPP control panel or my.ini / my.cnf
    ["username"] = "mysql", -- Provided in phpMyAdmin or my.ini / my.cnf
    ["password"] = "", -- Provided in phpMyAdmin or my.ini / my.cnf - none by default
    ["database"] = "mta-ll", -- Rename if you are using different database or create one with this name
}



----------------------




DATABASE = {
    CONNECTION = nil,
    RECONNECT_TIMER = nil
}

function connectDatabase()
    DATABASE.CONNECTION = dbConnect("mysql", "dbname="..DATABASE_DETAILS["database"]..";host="..DATABASE_DETAILS["host"]..";port="..DATABASE_DETAILS["port"], DATABASE_DETAILS["username"], DATABASE_DETAILS["password"], "log=1")

    if DATABASE.CONNECTION then
        print("Database connection successful")
        if isTimer(DATABASE.RECONNECT_TIMER) then killTimer(DATABASE.RECONNECT_TIMER) end
        DATABASE.RECONNECT_TIMER = nil

        --prepareDatabase()
        return true
    else
        error("Database connection failed; retrying in 5 seconds")
        DATABASE.RECONNECT_TIMER = setTimer(function()
            connectDatabase()
        end, 5000, 1)
        return false
    end
end

function disconnectDatabase()
    if not DATABASE.CONNECTION then return false end
    DATABASE.CONNECTION = nil
    print("Database connection closed")
    if isTimer(DATABASE.RECONNECT_TIMER) then killTimer(DATABASE.RECONNECT_TIMER) end
    DATABASE.RECONNECT_TIMER = nil
    return true
end

addEventHandler("onResourceStart", resourceRoot, function()
    connectDatabase()
    return true
end)

addEventHandler("onResourceStop", resourceRoot, function()
    disconnectDatabase()
    return true
end)

 

I already had OpenSSL installed when I checked the version, but also my version is 3.0 something. I was looking on many forums on how to get OpenSSL 1.1.1 as the error message requires but I didn't find any easy solutions apart from building from source and many complicated commands which I am not sure how to revert if it doesn't solve the issue.

I downloaded some .deb file from ubuntu archive and istalled it via a forum post but I don't remember which one was it, because at first I got an error message saying that the libssl.so1.1 directory didn't exist or something similar, that's why I then tried to install that but then realised I have a newer OpenSSL version. I didn't even know I will have to f*ck around with OpenSSL for the sake of MTA SA MySQL database handling, nor I had to do this previously - well previously I didn't use MTA Linux Server on linux either.

 

Does anybody have any suggestions how could I possibly solve this issue so I am able to run the linux version of MTA server on my home network Ubuntu linux server alongside the XAMPP / LAMPP  Apache MySQL and FTP servers? I followed the tutorial on the MTA SA Linux Server Tutorial page.

This is currently the only thing keeping me away from finishing what I've been wanting to do for a long time for a home network MTA development environment to be able to store and access and edit the server files on a separate server PC from various other devices.

 

I am planning on releasing the flask apps for the XAMPP and MTA server managers later on in case anybody needs something similar, or also it could be used as good templates if you want to create docker images from it or so on, however the code may not be production ready but will be free to use and adjust.

Thank you for your time response and help in advance!

Link to comment

try installing OpenSSL 1.1 directly. Run the following commands in the terminal to add the Ubuntu package repository that contains OpenSSL 1.1, and then install the library

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install libssl1.1

After installation, check if the libssl.so.1.1 library is present on your system with the command

ls -l /lib/x86_64-linux-gnu/libssl.so.1.1

 

Link to comment

@Laxante101

Should I remove my current OpenSSL version first?

EDIT:

I launched the commands without removing my current version, however as I stated in my original post, I already installed an ubuntu archive .deb package previously which installed libssl.so.1.1 previously. But the result of launching the commands:

libssl1.1 is already the newest version (1.1.0g-2ubuntu4).
0 updated, 0 installed, 0 to be removed, and 14 not updated.
hmsvr@server-pc:~$ ls -l /lib/x86_64-linux-gnu/libssl.so.1.1
-rw-r--r-- 1 root root 433760 apr   25  2018 /lib/x86_64-linux-gnu/libssl.so.1.1

 

EDIT 2: I removed the current libssl.so.1.1 from the

/lib/x86_64-linux-gnu/

directory, i also purged libssl1.1, then tried to install it using your command but it won't let me, it says the package is old:

hmsvr@server-pc:~$ sudo apt install libssl1.1
Reading packing lists...
Done
Building dependency tree...
Done
Reading status information...
Done
package libssl1.1 is not available but is referenced by another. The requested package is missing, outdated or only available from another source

E: package "libssl1.1" has no version marked for installation

EDIT 3: I tried fking around again with the .so files as I had to, every 1.1 .so file is in location, but I still get the error about OPENSSL_1_1_1 and I can't install the openssl 1.1 version for some reason, I tried removing and purging every current openssl thing, but it would still say this:


hmsvr@server-pc:~$ sudo apt-get install openssl1.1
Reading packing lists... Done
Building dependency tree... Done
Reading status information... Done
Note: Select "libengine-gost-openssl1.1" for "openssl1.1" regex
Note: select "libengine-pkcs11-openssl1.1" for regex "openssl1.1"
Note: select "apache2-api-20120211-openssl1.1" for regex "openssl1.1"
Note: select "apache2-bin" instead of "apache2-api-20120211-openssl1.1"
libengine-gost-openssl1.1 is now the latest version (1.1.0.3-1ubuntu1).
apache2-bin is now the latest version (2.4.52-1ubuntu4.12).
libengine-pkcs11-openssl1.1 is now the latest version (0.4.11-1ubuntu0.22.04.1).
0 updated, 0 newly installed, 0 to be removed and 14 not updated.

 

and in the MTA SA console I get this:

restart database
[20:31:30] restart: Requested by Console
[20:31:30] restart: Resource restarting...
[20:31:30] Stopping Database
[20:31:30] Starting Database
[20:31:30] ERROR: Could not load /home/hmsvr/ftp/servers/LegendaryLegacy/SA/x64/
dbconmy.so - /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/hmsvr/ftp/servers/LegendaryLegacy/SA/x64/dbconmy.so)
[20:31:30] WARNING: [Engine]/[Main]/Database/S_Database.lua:17: Bad usage @ 'dbConnect' [Could not connect]
[20:31:30] ERROR: [Engine]/[Main]/Database/S_Database.lua:27: Database connection failed; retrying in 5 seconds
[20:31:30] Database restarted successfully

 

The openssl version command returns this:
hmsvr@server-pc:~$ openssl version
-bash: /usr/bin/openssl: No such file or directory

Currently I removed openssl again, but I all along this time I've had the 3.0.2 version and could only install it via sudo apt install openssl

Edited by Dzsozi (h03)
Link to comment

try compile openSSL from source

 

sudo apt install build-essential checkinstall

wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
tar -xzvf openssl-1.1.1k.tar.gz
cd openssl-1.1.1k

./config
make
sudo make install

when finished restart the server

Link to comment

I uninstalled openssl version I had which was 3.0, then I installed 1.1.1 from source as you told, now I get these errors:

openssl-1.1.1k$ openssl version
openssl: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
openssl: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
openssl: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by openssl)
openssl: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0d' not found (required by /lib/x86_64-linux-gnu/libssl.so.1.1)
openssl: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0f' not found (required by /lib/x86_64-linux-gnu/libssl.so.1.1)
openssl: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /lib/x86_64-linux-gnu/libssl.so.1.1)

On 18/10/2024 at 06:14, Laxante101 said:

Also your signature has a mistake I think, I think you didn't put it on purpose 

Yea I know, I didn't bother to change it yet.

 

What should I do?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...