Could not find 'apachectl' or 'apache2ctl'.

744 views
Skip to first unread message

anil

unread,
Oct 12, 2011, 4:12:47 PM10/12/11
to Phusion Passenger Discussions
Hi,

I have installed Passenger v 3.0.7 and configured with Apache 2.2.11
on Solaris Sparc successfully. But my requirement is to run
application with Oracle HTTP Server(with Apache 2.0). Tried again
installing passenger with OHS but failed. So I did set below
environment variables and implemented patch for regex errors.

export APXS2=/u01/app/oracle/OraHome_1/ohs/bin/apxs
export APU_CONFIG=/u01/app/oracle/OraHome_1/ohs/bin/apu-config
export APR_CONFIG=/u01/app/oracle/OraHome_1/ohs/bin/apr-config
export HTTPD=/u01/app/oracle/OraHome_1/ohs/bin/httpd

And I did apply patch mentioned for regex.
http://code.google.com/p/phusion-passenger/issues/detail?id=651

Now I am getting error below error.

BEGIN failed--compilation aborted at /u01/app/oracle/OraHome_1/ohs/bin/
apxs line 57.
rake aborted!
Could not find 'apachectl' or 'apache2ctl'.

$ which apachectl
/u01/app/oracle/OraHome_1/ohs/bin/apachectl


Can you please let me know what am I missing here.

Thanks,
Anil.

anil

unread,
Oct 12, 2011, 7:07:36 PM10/12/11
to Phusion Passenger Discussions
Hi,

Solved issue by changing method apache2ctl to below in apache.rb under
$GEM_HOME/gems/passenger-3.0.7/lib/phusion_passenger/platform_info

def self.apache2ctl
if env_defined?('APACHE2CTL')
return ENV['APACHE2CTL']
else
return find_apache2_executable('apache2ctl', 'apachectl2',
'apachectl')
end
end

And set APACHE2CTL to '/u01/app/oracle/OraHome_1/ohs/bin/apachectl'. I
have not looked into why APXS2 path is not considered. Passenger
installed but with some warnings.

ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/lib/libcurl.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/lib/libcurl.so value=LOCL);
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/ssl/lib/libssl.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/ssl/lib/libssl.so value=LOCL);
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/ssl/lib/libcrypto.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/ssl/lib/libcrypto.so value=LOCL);


I have done post installation tasks and stuck at restarting the
server. OHS failing with below error.

/u01/app/oracle/OraHome_1/ohs/bin/apachectl startssl: execing httpd
Syntax error on line 1208 of /u01/app/oracle/OraHome_1/ohs/conf/
httpd.conf:
Cannot load /export/home/maftool/.rvm/gems/ruby-1.9.2-p290@wc/gems/
passenger-3.0.7/ext/apache2/mod_passenger.so into server: ld.so.1:
httpd: fatal: libstdc++.so.6: open failed: No such file or directory

I see the file libstdc++.so.6 is in /usr/local/lib/libstdc++.so.6.
Really appreciate help on this.

Thanks,
Anil.

On Oct 12, 1:12 pm, anil <anilk...@gmail.com> wrote:
> Hi,
>
> I have installed Passenger v 3.0.7 and configured with Apache 2.2.11
> on Solaris Sparc successfully. But my requirement is to run
> application with Oracle HTTP Server(with Apache 2.0). Tried again
> installing passenger with OHS but failed. So I did set below
> environment variables and implemented patch for regex errors.
>
> export APXS2=/u01/app/oracle/OraHome_1/ohs/bin/apxs
> export APU_CONFIG=/u01/app/oracle/OraHome_1/ohs/bin/apu-config
> export APR_CONFIG=/u01/app/oracle/OraHome_1/ohs/bin/apr-config
> export HTTPD=/u01/app/oracle/OraHome_1/ohs/bin/httpd
>
> And I did apply patch mentioned for regex.http://code.google.com/p/phusion-passenger/issues/detail?id=651

Hongli Lai

unread,
Oct 13, 2011, 3:22:28 AM10/13/11
to phusion-...@googlegroups.com
We depend on apxs for a lot of Apache property detection. But in your
case apxs is broken and you need to fix that first.

BEGIN failed--compilation aborted at /u01/app/oracle/OraHome_1/ohs/bin/
apxs line 57.

Here you see that apxs crashes on line 57. I don't know what's on line
57 but you should fix whatever's causing the crash there.

As for the libstdc++ problem, it looks like a system problem that has
got nothing to do with Phusion Passenger. I'm not familiar with
Solaris so I don't know how library path lookup there works. Maybe you
can ask a Solaris admin forum.

> --
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.
>
>

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

anil

unread,
Oct 15, 2011, 7:42:28 PM10/15/11
to Phusion Passenger Discussions
Hi Hongli,

I reinstalled passenger. Seems like it is installed with below
warning.

Can't locate strict.pm in @INC (@INC contains: /ade/
stvobadm_perl_583_build/perl/bin/Solaris/Opt/lib/5.8.3/sun4-solaris-
thread-multi /ade/stvobadm_perl_583_build/perl/bin/Solaris/Opt/lib/
5.8.3 /ade/stvobadm_perl_583_build/perl/bin/Solaris/Opt/lib/site_perl/
5.8.3/sun4-solaris-thread-multi /ade/stvobadm_perl_583_build/perl/bin/
Solaris/Opt/lib/site_perl/5.8.3 /ade/stvobadm_perl_583_build/perl/bin/
Solaris/Opt/lib/site_perl .) at /u01/app/oracle/OraHome_1/ohs/bin/apxs
line 57.
BEGIN failed--compilation aborted at /u01/app/oracle/OraHome_1/ohs/bin/
apxs line 57.

I don't see any paths mentioned in @INC exists on the server.

In /u01/app/oracle/OraHome_1/ohs/bin/apxs file line 57 has "use
strict". Seems like strict.pm so I added perl bin directory(perl/lib/
5.8.3) to the path but no luck.

Is there any way we can add path to @INC for searching at the right
location.

Thanks,
Anil.
> > For more options, visit this group athttp://groups.google.com/group/phusion-passenger?hl=en.
>
> --
> Phusion | Ruby & Rails deployment, scaling and tuning solutions
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

anil

unread,
Oct 18, 2011, 10:43:43 PM10/18/11
to Phusion Passenger Discussions
Hi Hongli,

I have solved this issue as well by adding perl lib path to the
PERL5LIB.

Passenger successfully loaded but with warnings below. Can you please
look at it and let me know.

g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -
Iext -Iext/common -Iext/libev -I/usr/local/include -
DHAS_CURL_EASY_RESET -D_REENTRANT -I/usr/local/include -
DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -pthreads -
D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -
D_FILE_OFFSET_BITS=64 -DBOOST_HAS_STDINT_H -mcpu=ultrasparc -Wall -g -
DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/
libpassenger_common.a ext/common/libboost_oxt.a ext/libev/.libs/
libev.a -L/usr/local/lib -lcurl -L/usr/local/lib -R/usr/local/lib -R/
usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/
ssl/lib -R/usr/local/ssl/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/
local/BerkeleyDB.4.7/lib -R/usr/local/BerkeleyDB.4.7/lib -L/usr/local/
ssl/lib -L/usr/local/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -L/
usr/X11R6/lib -L/usr/local/BerkeleyDB.4.7/lib -lidn -lssh2 -lssl -
lcrypto -lrt -lsocket -lnsl -lssl -lcrypto -lsocket -lnsl -ldl -lz -
lssh2 -lnsl -lsocket -lz -lxnet -lrt -lsocket -lnsl -lpthread
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/lib/libcurl.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/lib/libcurl.so value=LOCL);
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/ssl/lib/libssl.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/ssl/lib/libssl.so value=LOCL);
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/ssl/lib/libcrypto.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/ssl/lib/libcrypto.so value=LOCL);


Thanks,
Anil.
Reply all
Reply to author
Forward
0 new messages