Running 64-bit app on CentOS 7

Can you paste in the output from ‘uname -a’ ?

CentOS 7 on 64 bit

Can you paste in the full output from running the ‘uname -a’ command?

The output is: ‘Linux servername.name.net 3.10.0-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux’

Does a Standalone build (rather than CGI) of the same web app run correctly?

when you get segmentation fault, it can simply be an FTP upload in ASCII mode instead of BINARY mode.
At least that problem kept me busy looking for a problem one day.

I recently failed to get a 64 bit web app running on ubuntu 14.0.4. I was able to load the 32 bit libraries and get the 32bit version running.

I could not find any error with the 64 bit app and could launch it from the command line and it would run. I just couldn’t get it working. I would always get an error from the .cgi file about premature end of script headers. It seems it was having an issue with an uninitialized environment variable or some such, but I could not figure any reason for it. I presume something between the 64bit app and the cgi was not working right.

I plan to put together a test app and try again when I have a couple of hours to spend on it. Not sure when that will be though. Had to get the new server up and running so I had to bail on my last attempt so it would be ready Monday morning.

@ Travis, the app works well as standonline, but not as CGI yet. Do you know how I can achieve this ?

@ Christian, I have tried your solution, unfortunately without any luck.

Thank you all.

Kind regards,
Eric

Can you file a Feedback report about the issue with your 64-bit CGI web app on CentOS 7 64-bit? That way we can take a closer look.

Thank you Travis. I will do.

I have a cgi web app running in CentOS7 X86_64, but my kernel (stock) differs from yours:

Linux websrv.srv 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Perhaps your machine is running in a container and that is the problem?

For the app’s executable i don’t get an “statically linked” like you, but:

ldd AgendaWeb

linux-vdso.so.1 => (0x00007ffc0b9e2000) XojoConsoleFramework64.so => /var/www/cgi-bin/AgendaWeb/./AgendaWeb Libs/XojoConsoleFramework64.so (0x00007f59e1d8e000) libc.so.6 => /lib64/libc.so.6 (0x00007f59e19b6000) libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f59e1766000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f59e1433000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f59e1216000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f59e1012000) libm.so.6 => /lib64/libm.so.6 (0x00007f59e0d10000) libc++.so.1 => /var/www/cgi-bin/AgendaWeb/./AgendaWeb Libs/libc++.so.1 (0x00007f59e095e000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f59e0748000) /lib64/ld-linux-x86-64.so.2 (0x00007f59e2474000) libffi.so.6 => /lib64/libffi.so.6 (0x00007f59e0540000) librt.so.1 => /lib64/librt.so.1 (0x00007f59e0337000)

For XojoConsoleFramework64.so

ldd XojoConsoleFramework64.so

linux-vdso.so.1 => (0x00007ffc95152000) libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f6955602000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f69552ce000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f69550b2000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f6954eae000) libm.so.6 => /lib64/libm.so.6 (0x00007f6954bab000) libc++.so.1 => /var/www/cgi-bin/AgendaWeb/AgendaWeb Libs/./libc++.so.1 (0x00007f69547fa000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f69545e4000) libc.so.6 => /lib64/libc.so.6 (0x00007f6954222000) /lib64/ld-linux-x86-64.so.2 (0x00007f6955f4e000) libffi.so.6 => /lib64/libffi.so.6 (0x00007f695401a000) librt.so.1 => /lib64/librt.so.1 (0x00007f6953e12000)
The permissions / owner / group for this are:

-rwxr-xr-x 1 apache apache 9281472 nov 10 23:01 AgendaWeb -rwxr-xr-x 1 apache apache 7023 nov 3 18:47 agendaweb.cgi drwxr-xr-x 2 apache apache 4096 nov 10 23:01 AgendaWeb Libs drwxr-xr-x 3 apache apache 21 nov 10 23:01 AgendaWeb Resources -rw-rw-rw- 1 apache apache 57 nov 11 12:01 config.cfg -rw-r--r-- 1 apache apache 86 nov 3 18:47 .htaccess

This worked fine with 2015r3 and 2015r3.1 (compiled yesterday)

Thank you Jos for sharing this information. How can I see if the VPS is running in a container ?

There is a bunch of containers technologies, but for example, check if there is a file called /proc/user_beancounters then you are under OpenVZ or Virtuozzo.

Also, you can check from your OS with virt-what, my installation is virtualized under KVM and it is identified correctly :

[root@websrv ~]# virt-what kvm

https://people.redhat.com/~rjones/virt-what/virt-what.txt

The system does not recognise the command virt-what. I have tried to install a package.

Even though it is likely to assume that it is running in a container. If this the case, what can do to make it happen ?

Thank you.

virt-what is installed by default in CentOS7, in case is not, he package to install is: virt-what

[root@websrv ~]# rpm -q --whatprovides virt-what virt-what-1.13-5.el7.x86_64

Don’t know how to solve it if is a container problem. I don’t use them, for now i prefer full virtualization.

Thanks, but I get an error:

[root@h2468606 ~]# rpm -q --whatprovides virt-what virt-what-1.13-5.el7.x86_64
no package provides virt-what
no package provides virt-what-1.13-5.el7.x86_64
[root@h2468606 ~]#

Try installing it:

yum install virt-what

Great, that works ! Output: openvz

Do you know how I can let this run under openvz ?

Thanks again for all your effort.

Don’t know what may be the problem, but supposed that.

I’ll try install a container later in my server and try, if not today, tomorrow. I’ve no longer OpenVZ because the maker of the OS changed to LXC, but will try on it.

Meanwhile… perhaps a SeLinux issue? What says /etc/selinux/config? ( cat /etc/selinux/config )

Well, i installed the container and had the same error that you with the same application:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

I’ll try if can get it working.