cancel
Showing results for 
Search instead for 
Did you mean: 

Apache start error on SAP Content server 6.40

Former Member
0 Kudos

Hi all

I installed a SAP Content Server 6.4 successfully in Solaris 10 with MaxDB 7.6.

Although Installation is finished completely I got an syxtext error when apache web server is started after completing installation as below;

dmscs/bin>./apachectl start

Cannot load /usr/sap/XXD/apache/libexec/mod_sapcs.so into server: ld.so.1: httpd: fatal:sap/Apache/libexec/mod_sapcs.so: wrong ELF class: ELFCLASS64

./apachectl start: httpd could not be started

let me know to solution if you had experienced with the same problem.

Accepted Solutions (1)

Accepted Solutions (1)

nelis
Active Contributor
0 Kudos

Hi,

When you compiled Apache did you set the compile switch variable CFLAGS="-xarch=v9" as per Note 664384 - Generation info for Apache Web server for SAP Content Server ?

Nelis

Former Member
0 Kudos

Hi Nelis,

We set the CFLAG as per the SAP Note but it give CFLAG doesn't exist.

Regards,

Panu

nelis
Active Contributor
0 Kudos

It's CFLAGS not CFLAG.

From what I can see it looks like you have compiled Apache with 32bit libraries and the sapcs module is 64bit which is why you are getting that error. You need to set the CFLAGS correctly so it gets compiled with 64bit libraries.

Nelis

Former Member
0 Kudos

HI Nelis,

We set the CFLAGS correctly but when compiling we are getting the error below:

gcc -m64 -c -I../os/unix -I../include -DSOLARIS2=2100 -DUSE_HSREGEX `../apaci` gen_test_char.c

gcc -m64 -DSOLARIS2=2100 -DUSE_HSREGEX `../apaci` -o gen_test_char gen_test_char.o -lsocket -lnsl -lpthread -lexpat

./gen_test_char >test_char.h

ld.so.1: gen_test_char: fatal: /usr/sfw/lib/libexpat.so.1: wrong ELF class: ELFCLASS32

      • Error code 137

make: Fatal error: Command failed for target `test_char.h'

Current working directory /sapcd/apache_1.3.42/src/main

      • Error code 1

The following command caused the error:

for i in regex os/unix ap main lib modules; do \

echo "===> src/$i"; \

case ".Solaris 2100" in \

.OS390 | .TPF) ( cd $i && make SDP='src/' OPTIM='') || exit 1;; \

*) ( cd $i && make SDP='src/' CC='gcc -m64' AUX_CFLAGS=' -DSOLARIS2=2100 -DUSE_HSREGEX `./apaci`' RANLIB='ranlib' OPTIM='') || exit 1;; \

esac; \

echo "<=== src/$i"; \

done

make: Fatal error: Command failed for target `subdirs'

Current working directory /sapcd/apache_1.3.42/src

      • Error code 1

The following command caused the error:

case "xsun4u-sun-solaris2.2100" in \

x390) C89STEPS="0xffffffff"; export C89STEPS;; \

esac; \

cd ./src; make SDP=src/ all

make: Fatal error: Command failed for target `build-std'

Current working directory /sapcd/apache_1.3.42

      • Error code 1

The following command caused the error:

make -f ./Makefile root= build-std

make: Fatal error: Command failed for target `build'

Grateful if you can help.

Thanks

Panu

nelis
Active Contributor
0 Kudos

Hmm, been a while since I worked on Solaris

ld.so.1: gen_test_char: fatal: /usr/sfw/lib/libexpat.so.1: wrong ELF class: ELFCLASS32

Basically you need to make sure the compiler see's your 64bit libraries so do you have a /usr/sfw/lib/amd64 directory by any chance ?

If so, try export the variable LDFLAGS="-L/usr/sfw/lib/amd64 -R/usr/sfw/lib/amd64" and compile again(with same CFLAGS).

Nelis

Former Member
0 Kudos

Hi Nelis,

we got another error, grateful if you can have a look on this;

sapcs02@sapcs1 # ./configure --prefix=/usr/sap/CSD/apache --enable-shared=max --enable-module=most

Configuring for Apache, Version 1.3.42

+ using installation path layout: Apache (config.layout)

Creating Makefile

Creating Configuration.apaci in src

+ enabling mod_so for DSO support

Creating Makefile in src

+ configured for Solaris 2100 platform

+ setting C compiler to gcc

+ setting C pre-processor to gcc -E

+ using "tr [a-z] [A-Z]" to uppercase

+ checking for system header files

+ adding selected modules

o rewrite_module uses ConfigStart/End

disabling DBM support for mod_rewrite

(perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS)

o dbm_auth_module uses ConfigStart/End

+ using builtin Expat

+ checking sizeof various data types

+ doing sanity check on compiler and options

    • A test compilation with your Makefile configuration

    • failed. The below error output from the compilation

    • test will give you an idea what is failing. Note that

    • Apache requires an ANSI C Compiler, such as gcc.

======== Error Output for sanity check ========

cd ..; gcc -DSOLARIS2=2100 -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -xarch=v9 `./apaci` -L/usr/sfw/lib/sparcv9 -R/usr/sfw/lib/sparcv9 -o helpers/dummy helpers/dummy.c -lsocket -lnsl -lpthread

gcc: language arch=v9 not recognized

ld: fatal: file helpers/dummy.c: unknown file type

ld: fatal: File processing errors. No output written to helpers/dummy

collect2: ld returned 1 exit status

      • Error code 1

make: Fatal error: Command failed for target `dummy'

============= End of Error Report =============

Aborting!

sapcs02@sapcs1 #

The export variable used are below:

LDFLAGS="-L/usr/sfw/lib/sparcv9 -R/usr/sfw/lib/sparcv9"

CFLAGS="-xarch=v9"

Thanks for the response

Panu

nelis
Active Contributor
0 Kudos

gcc: language arch=v9 not recognized

Try using CFLAGS="-m64" instead of CFLAGS="-xarch=v9"

Nelis

Former Member
0 Kudos

Hi Nelis,

its work fine... indeed thanx.

Regards,

Panu

nelis
Active Contributor
0 Kudos

Good to hear.

SAP must update Note 664384 so that it includes CFLAGS="-m64" for newer releases of Solaris 64bit.

Nelis

Former Member
0 Kudos

Hi Nelis,

I can access the Apache URL but not the SAP Content Server.

They was no "ContentServer/ContentServer.dll" directory exist under the apache/htdocs.

Can u help me where I did the wrong?

Regards,

Panu

nelis
Active Contributor
0 Kudos

You should read the Unix installation guide. At the end of the guide in the Appendix there is a section for module registration and configuration if you are using Apache 1.3 - you must follow the instructions. I used Apache 2.x so never came across this issue.

You need to change your httpd.conf to point to the correct location for contentserver.dll and the directory structure must be setup correctly.

Nelis

Former Member
0 Kudos

Hi Nelis,

We did the module registration after after installation, Please find the below of httpd.conf.

=======================================================================================

#

  1. Example:

  2. LoadModule foo_module libexec/mod_foo.so

LoadModule sapcs_module libexec/mod_sapcs.so

LoadModule vhost_alias_module libexec/mod_vhost_alias.so

LoadModule env_module libexec/mod_env.so

LoadModule config_log_module libexec/mod_log_config.so

LoadModule mime_magic_module libexec/mod_mime_magic.so

LoadModule mime_module libexec/mod_mime.so

LoadModule negotiation_module libexec/mod_negotiation.so

LoadModule status_module libexec/mod_status.so

LoadModule info_module libexec/mod_info.so

LoadModule includes_module libexec/mod_include.so

LoadModule autoindex_module libexec/mod_autoindex.so

LoadModule dir_module libexec/mod_dir.so

LoadModule cgi_module libexec/mod_cgi.so

LoadModule asis_module libexec/mod_asis.so

LoadModule imap_module libexec/mod_imap.so

LoadModule action_module libexec/mod_actions.so

LoadModule speling_module libexec/mod_speling.so

LoadModule userdir_module libexec/mod_userdir.so

LoadModule alias_module libexec/mod_alias.so

LoadModule rewrite_module libexec/mod_rewrite.so

LoadModule access_module libexec/mod_access.so

LoadModule auth_module libexec/mod_auth.so

LoadModule anon_auth_module libexec/mod_auth_anon.so

LoadModule dbm_auth_module libexec/mod_auth_dbm.so

LoadModule digest_module libexec/mod_digest.so

LoadModule proxy_module libexec/libproxy.so

LoadModule cern_meta_module libexec/mod_cern_meta.so

LoadModule expires_module libexec/mod_expires.so

LoadModule headers_module libexec/mod_headers.so

LoadModule usertrack_module libexec/mod_usertrack.so

LoadModule log_forensic_module libexec/mod_log_forensic.so

LoadModule unique_id_module libexec/mod_unique_id.so

LoadModule setenvif_module libexec/mod_setenvif.so

  1. Reconstruction of the complete module list from all available modules

  2. (static and shared ones) to achieve correct module execution order.

  3. [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]

ClearModuleList

AddModule mod_sapcs.cpp

AddModule mod_vhost_alias.c

AddModule mod_env.c

AddModule mod_log_config.c

AddModule mod_mime_magic.c

AddModule mod_mime.c

AddModule mod_negotiation.c

AddModule mod_status.c

AddModule mod_info.c

AddModule mod_include.c

AddModule mod_autoindex.c

AddModule mod_dir.c

AddModule mod_cgi.c

AddModule mod_asis.c

AddModule mod_imap.c

AddModule mod_actions.c

AddModule mod_speling.c

AddModule mod_userdir.c

AddModule mod_alias.c

AddModule mod_rewrite.c

AddModule mod_access.c

AddModule mod_auth.c

AddModule mod_auth_anon.c

AddModule mod_auth_dbm.c

AddModule mod_digest.c

AddModule mod_proxy.c

AddModule mod_cern_meta.c

AddModule mod_expires.c

AddModule mod_headers.c

AddModule mod_usertrack.c

AddModule mod_log_forensic.c

AddModule mod_unique_id.c

AddModule mod_so.c

AddModule mod_setenvif.c

Can you guide me where exactly point to the correct location for /ContentServer/ContentServer.dll in httpd.conf.

=========================================================================

#<VirtualHost *:80>

  1. DocumentRoot /www/docs/dummy-host.example.com

  2. ServerName dummy-host.example.com

  3. ErrorLog logs/dummy-host.example.com-error_log

  4. CustomLog logs/dummy-host.example.com-access_log common

#</VirtualHost>

<IfModule mod_sapcs.cpp>

AddModuleInfo ContentServer "SAP Content Server 640/0 (Prototype) (C) SAP AG 1998, 2001"

CSConfigPath /export/home/sapcs1/conf/cs.conf

<Location /sapcs>

SetHandler sapcs_module

Allow from all

</Location>

<Location /ContentServer/ContentServer.dll>

SetHandler sapcs_module

Allow from all

</Location>

<Location /contentserver/contentserver.dll>

SetHandler sapcs_module

Allow from all

</Location>

Regards,

Panu

Edited by: kumar panu on Sep 7, 2010 9:05 AM

Edited by: kumar panu on Sep 7, 2010 9:07 AM

Edited by: kumar panu on Sep 7, 2010 9:08 AM

Edited by: kumar panu on Sep 7, 2010 9:08 AM

Former Member
0 Kudos

Hi Nelis,

Its great-full if you can help..

Regards

Panu

Answers (0)