I initially asked this on StackOverflow, but it is not application development issue in my opinion. Basically, I have a C++ application which connects to SQL Server using msodbcsql17 package. It is running on RedHat 7 linux server. When deploying this app to a new environment, the local administrators installed the latest available msodbcsql17 package with yum, which is Our application hangs when connecting to the DB, systemctl is not able to stop it, only by killing it after some time. I checked in our lab, app works fine with msodbcsql17 version So I tested versions by taking one of our lab servers, cloning it, and verifying app is working fine on both. I upgraded one of the servers to 17.6 version of msodbcsql17, app broke "as expected". So I downgraded it to 17.4 version, and app is still broken.

As far as I can tell, the installed binaries (everything in /opt/microsoft folder) is the same on the two servers. Other than this I can only see a single symlink from /usr/lib64 which points to an SO file in /opt/microsoft. According to yum, no other dependencies were installed or removed, I checked this by exporting 'yum list installed' to a file and comparing them by diff.

So what I tried is to use rsync to copy files from original working server to new server. I first just did dry-runs, but didn't find any difference. So I copied over entire /usr folder, still not working. Then I copied over entire /etc folder with rsync, I changed back hostname and IP configuration (obviously these files were overwritten also), and the app started working again. So I broke it again by installing the latest version of msodbcsql17, removing it and installing previous version, and did another rsync dry-run. On the usr folder, no differences, rsync only logs that it is skipping symlinks (skipping non-regular file "tmp"). However on the etc folder there were a few differences, and for the life of me, I can't see what is the problematic file here:

sudo rsync -r --dry-run --out-format="[%t]:%o:%f:Last Modified %M" [email protected]:/etc/ /etc/ | less

[2020/12/16 00:59:54]:recv:hostname:Last Modified 2019/11/07-17:10:40
[2020/12/16 00:59:54]:recv:ld.so.cache:Last Modified 2020/12/16-00:40:20
[2020/12/16 00:59:54]:recv:odbcinst.ini:Last Modified 2019/11/27-17:03:27
[2020/12/16 00:59:54]:recv:sysconfig/network-scripts/ifcfg-ens160:Last Modified 2019/11/07-17:09:02
[2020/12/16 00:59:54]:recv:tuned/active_profile:Last Modified 2020/09/15-09:51:08
[2020/12/16 00:59:54]:recv:tuned/profile_mode:Last Modified 2020/09/15-09:51:08

/etc/hostname and /etc/sysconfig/network-scripts/ifcfg-ens160 are obviously different. /etc/odbcinst.ini was regenerated during msodbcsql17 installation, but contents are the same according to diff. As for the rest, again, contents are same according to diff Well, except for ld.so.cache which is binary, but size is different, I copied this file over manually and it didn't solve.

So I'm not sure what exactly is fixing the problem here. Most interesting part: if I rsync the /etc folder with the latest msodbcsql17 installed, the app starts working again. So almost like something breaks in the /etc folder?

1 Answer 1


Ok, after some more extensive checks, it seems I missed the very first one: odbcinst.ini is actually different! During the 17.6 msodbc install, one line was removed. After adding it again, it started working immediately:


Why was this line removed, I don't know. Or, in case of fresh install, this line was never added to odbcinst.ini. Anyway, it works now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .