Jump to content

MySQL connect problem.


unkn0wnus333r

Recommended Posts

function mysqlConnect()
    dbHandle = dbConnect( "mysql", "dbname=server;host=127.0.0.1", "user", "password", "share=1" )

 

    if (not dbHandle) then
        outputDebugString("invalid connection to MySQL")
    else
        outputDebugString("successfully connection to MySQL")
    end
end
addEventHandler("onResourceStart", resourceRoot, mysqlConnect)

Log: [12:20:04] ERROR: Could not load /home/mta/x64/dbconmy.so - /usr/local/lib/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/mta/x64/dbconmy.so)[12:20:04] WAR
NING: database/connect.lua:2: Bad usage @ 'dbConnect' [Could not connect]
[12:20:04] INFO: invalid connection to MySQL
Link to comment

You have to wait for somebody who is in charge of maintaining the Linux version of the MTA server. Since you are experiencing a server set-up related error this is not a scripting problem, hence the place to put this topic is wrong. Putting topics into wrong categories does impede the ability to answer your support request properly.

Link to comment

/mta/x64/dbconmy.so: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /mta/x64/dbconmy.so)
/mta/x64/dbconmy.so: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /mta/x64/dbconmy.so)
        linux-vdso.so.1 (0x00007ffd0dbcb000)
        libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fd4cfe36000)
        libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fd4cf99a000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd4cf780000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd4cf57c000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd4cf35f000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd4cefc0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd4d095e000)

Link to comment

It's difficult to reproduce your problem.

I tried to setup a similar environment and I don't get the error message. The server also runs without installed libssl.

So what you can try to remove openssl and every dependend package. But be careful to not remove to much from your system.

I dont know what else is running on your server. You should know, what you do, I can not give so detailed instructions.

 

Here for example my ldd output without openssl:

root@b3609dcf556f:/multitheftauto_linux_x64# ldd x64/dbconmy.so
        linux-vdso.so.1 (0x00007fff567e9000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f720f8b6000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f720f6b2000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f720f495000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f720f0f6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f721038c000)

 

Link to comment

Please understand that we are offering Linux support on a best-effort basis. This error is showing exactly the reason as to why. Linux is a wicked ecosystem and some users might have so wild system configurations that even the clean set-up approach as practiced by Audifire above is not working. That is why I recommend Linux server owners to try installing the MTA server on a clean install of their operating system distribution first. We are not a Linux support board! Then we could give additional guidance based on the remaining difficulties and whether we want to support that OS variant in the first place.

Link to comment
53 minutes ago, The_GTA said:

Please understand that we are offering Linux support on a best-effort basis. This error is showing exactly the reason as to why. Linux is a wicked ecosystem and some users might have so wild system configurations that even the clean set-up approach as practiced by Audifire above is not working. That is why I recommend Linux server owners to try installing the MTA server on a clean install of their operating system distribution first. We are not a Linux support board! Then we could give additional guidance based on the remaining difficulties and whether we want to support that OS variant in the first place.

 

On 09/12/2021 at 09:20, unkn0wnus333r said:
Log: [12:20:04] ERROR: Could not load /home/mta/x64/dbconmy.so - /usr/local/lib/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/mta/x64/dbconmy.so)[12:20:04] WAR
NING: database/connect.lua:2: Bad usage @ 'dbConnect' [Could not connect]
[12:20:04] INFO: invalid connection to MySQL

Best advice a server admin can get is: learn Docker.

Looks like you have package libssl1.1 installed but the library file is named something else or located something else. You can try this hipotesis by executing:

ls -l /usr/local/lib | grep libssl

Paste the output here.

Looking at the Debian package description we see the file you need is located under /usr/lib/x86_64-linux-gnu/libssl.so.1.1. Probably, all you have to do is create a symbolic link at the location where MTA Server is expecting to find libssl.so.1.1.

sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/local/lib/libssl.so.1.1
Edited by vicisdev
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...