Previous Thread
Next Thread
Print Thread
Invalid ELF Header #31189 20 Sep 18 04:01 AM
Joined: Jun 2001
Posts: 153
O
OmniLedger - Tom Reynolds Offline OP
Member
OP Offline
Member
O
Joined: Jun 2001
Posts: 153
We've been about to deploy our existing SQL software to a new customer, and Neil here has had some issues he's having problems resolving. I've passed on the steps he's taken below, and can't see any issues with the steps he's taken.


Trying to connect Ashell to a newer version of MySQL (8.0.12) we received the message…
…“Client does not support authentication protocol requested by server, consider upgrading mysql client”

We had a symbolic link from /usr/lib/libashmysql.so.1 to /vm/miame/bin/libashmysql.so.1.4.138
so we assumed that a newer version would fix the problem.

We downloaded the following files…
http://www.microsabio.net/dist/other/asql/libashmysql.so.1.4.141-el6.tz
http://www.microsabio.net/dist/other/asql/libashmysql.so.1.4.143-el6.tz
… decompressed, installed, repermissioned them.

We recreated the symbolic link successfully, using…
sudo ln –s /vm/miame/bin/libashmysql.so.1.4.143.el6 /usr/lib/libashmysql.so.1
…and…
sudo ln –s /vm/miame/bin/libashmysql.so.1.4.143.el6 /usr/lib/libashmysql.so.1
… but both versions failed to load with the error “Invalid ELF Header”.

We have Red Hat release 6.10 (Santiago) installed.

Any suggestions would be welcome.

Re: Invalid ELF Header #31190 20 Sep 18 09:48 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Two possibilities seem worthy of further investigation - the file (but both?) got corrupted, or it's related to MySQL 8. My CentOS 6 test system has a much older MySQL package, so let's start with the easy one and first verify that the libashmysql module is good, and see what it is linked to...

Code
$ tar xvzf libashmysql.so.1.4.143.el6.tz
libashmysql.so.1.4.143.el6

$ md5sum libashmysql.so.1.4.143.el6
c3c427de2956f302ce80d039de915919  libashmysql.so.1.4.143.el6

$ file libashmysql.so.1.4.143.el6
libashmysql.so.1.4.143.el6: ELF 32-bit LSB shared object, Intel 80386, version 1
 (SYSV), dynamically linked, not stripped

$ ldd /usr/lib/libashmysql.so.1
        linux-gate.so.1 =>  (0x00493000)
        libc.so.6 => /lib/libc.so.6 (0x00ceb000)
        libmysqlclient.so.16 => /usr/lib/mysql/libmysqlclient.so.16 (0x002c0000)
        /lib/ld-linux.so.2 (0x002a0000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x001e0000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x009b2000)
        libm.so.6 => /lib/libm.so.6 (0x00210000)
        libssl.so.10 => /usr/lib/libssl.so.10 (0x00494000)
        libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x004fd000)
        libz.so.1 => /lib/libz.so.1 (0x0023a000)
        libfreebl3.so => /lib/libfreebl3.so (0x00bac000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x0024e000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0x006c8000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x0028e000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x00436000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00461000)
        libdl.so.2 => /lib/libdl.so.2 (0x00293000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x0047b000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x0081b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x007a6000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x007c1000)
Assuming the hash is right and the file command shows a valid ELF object, the next detail is to see which libmysqlclient it is linked to. As you can see from the above, it wants to link to the .so.16, but my guess is that for MySQL 8 you have .so.20 or even higher.

FWIW, the .el7 version links to libmysqlclient.so.20, so if the so.16 link is broken and you have the .so.20, it might be interesting to test if the .el7 version works.

On a related aside, I'm curious how you got MySQL 8 installed. I didn't think the standard RHEL6 repositories would allow that. Did you do a manual install, or reconfigure your repositories?

I'm not sure MySQL 8 can coexist with 5.7, so before I experiment further which this I probably should clone another server!

Re: Invalid ELF Header #31191 20 Sep 18 11:27 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
OK, I've got a better handle on the situation. The 8.0 version uses libmysqlclient.so.21. I've relinked the 1.4.143 connector object code with the 8.0 developer libraries and now the connector does link properly...

Code
$ ldd /usr/lib/libashmysql.so.1
        linux-gate.so.1 =>  (0x00540000)
        libc.so.6 => /lib/libc.so.6 (0x00b8b000)
        libmysqlclient.so.21 => /usr/lib/mysql/libmysqlclient.so.21 (0xf726e000)
        /lib/ld-linux.so.2 (0x002a0000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00763000)
        libssl.so.10 => /usr/lib/libssl.so.10 (0x00aa8000)
        libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x00300000)
        libdl.so.2 => /lib/libdl.so.2 (0x00b60000)
        librt.so.1 => /lib/librt.so.1 (0x005d7000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x005e0000)
        libm.so.6 => /lib/libm.so.6 (0x001da000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00591000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x00e16000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0x0077e000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x00204000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x00209000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00234000)
        libz.so.1 => /lib/libz.so.1 (0x0024e000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x00d23000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x0028b000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x00262000)
And it loads within A-Shell, at least in the SQLTEST1 ...

Code
.LOG SQL:
.RUN SQLTEST1
...
Select database connector (1=MySQL,2=ODBC) [1]

Using connector MySQL (native)
Loading connector and client library... [OK]
Initializing connection handle...       [OK]
Client database library version:        8.0.12

A-Shell/SQL connector and DBMS client library successfully loaded

Connector ID (lib name)                 LIBASHMYSQL
Connector Version                       1401430 (1.4.143.0)
Connector Description:                  MySQL 5.7 (native)
Note that the Client database library version does correctly show 8.0.12. But the connector description continues to show MySQL 5.7. This is because that's the version it was compiled against. I tried recompiling, but there are a bunch of new incompatibilities to be sorted (probably trivial symbols and things like that, but I need to set aside a few hours to go through that more carefully). I also haven't actually tested using the connector for anything (the 8.0 instructions said to remove all trace of the earlier versions, including data, and the download site was so slow that yum gave up, so I was only able to get the libraries downloaded and will have to try for the whole package later. But I suspect that since the connector links and loads, it will probably work.)

If you want to try it, here's the new link:

libashmysql8.so.1.4.143.el6.tz

(Note the 8 appended to the name before the .so, meant to indicate MySQL 8. This version would not work with MySQL 5.x)

I'll try to work through the complete process (which will result in a 1.4.144 version) in the next 24 hours or so, but for you that may mean Monday morning.

Re: Invalid ELF Header #31192 21 Sep 18 01:48 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I haven't yet succeeded in getting MySQL 8 running on my EL6 server, but I did get the development libraries installed and made the adjustments to the ASQL connector so that it would compile for the new environment. So I recommend testing with this version:

libashmysql8.so.1.4.144.el6.tz

SQLTEST1 now reports the correct version for both the library and the connector:

Code
Select database connector (1=MySQL,2=ODBC) [1]

Using connector MySQL (native)
Loading connector and client library... [OK]
Initializing connection handle...       [OK]
Client database library version:        8.0.12

A-Shell/SQL connector and DBMS client library successfully loaded

Connector ID (lib name)                 LIBASHMYSQL
Connector Version                       1401440 (1.4.144.0)
Connector Description:                  MySQL 8.0 (native)

Re: Invalid ELF Header #31193 21 Sep 18 04:40 AM
Joined: Jun 2001
Posts: 153
O
OmniLedger - Tom Reynolds Offline OP
Member
OP Offline
Member
O
Joined: Jun 2001
Posts: 153
Thanks Jack, that seems to resolve everything. Much appreciated!

Re: Invalid ELF Header #31194 21 Sep 18 11:36 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Excellent - thanks for the feedback. It sounds like we're going to need to maintain two separate connector versions - libashmysql for MySQL 5.x, and libashmysql8 for MySQL 8.x.

Re: Invalid ELF Header [Re: OmniLedger - Tom Reynolds] #35882 06 Feb 23 10:21 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
We're curious what the state of libashmysql8 for CentOS 7 is.

We've been installing the MySQL 5.7 client via an official MySQL repository, but they have removed the RPM download for that yum repo install. I'm investigating the best way for us to move forward. There is an official CentOS 7/MySQL 8 repo. We're wondering if we can switch to the 8 versions of the client library and still connect to the 5.7 server? For clarification, the server is running in a docker container.

Here's a link for the official yum repos
https://dev.mysql.com/downloads/repo/yum/


Stephen Funkhouser
Diversified Data Solutions
Re: Invalid ELF Header [Re: OmniLedger - Tom Reynolds] #35883 07 Feb 23 12:10 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I'm pretty sure there is a good deal of compatibility between newer versions of the client library and older versions of the database server. (For sites that have to connect to multiple database servers, that would seem to be a mandatory requirement.) The main issue I think is between the A-Shell connector and the MySQL client, which do have to agree on various common modules. I'll see if I can get the latest MySQL 8 client package to work with CentOS 7. Might take me a day or two though.

Re: Invalid ELF Header [Re: OmniLedger - Tom Reynolds] #35884 07 Feb 23 02:58 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
Thanks


Stephen Funkhouser
Diversified Data Solutions
Re: Invalid ELF Header [Re: OmniLedger - Tom Reynolds] #35896 09 Feb 23 04:04 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content
Member
Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
Hi Jack,

Looks like you've been pretty busy with other issues. I've found that when you install the new MySQL 8 client repository via mysql80-community-release-el7-7.noarch.rpm the /etc/yum.repos.d/mysql-community.repo it installs contains a MySQL 5.7 repo that is not enabled and the MySQL 8 is enabled. This means you can disable the MySQL 8 repo and enable the 5.7 one. I've tested Installing mysql-community-client.i686 (the client library) from this 5.7 repo, and it works with the current libashmysql.

All of this to say, perhaps a EL7 MySQL 8 would a waste of effort.


Stephen Funkhouser
Diversified Data Solutions
Re: Invalid ELF Header [Re: OmniLedger - Tom Reynolds] #35897 09 Feb 23 04:10 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Thank you for pointing that out. I did get a bit lost in the weeds and other distractions while trying to sort out 32/64 bit, MySQL 5.7/8 and CentOS 7/8/Debian variations of the various puzzle pieces since my last post. I'll bump this down on the priority list for now.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3