LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   isntall apache tomcat connector (https://www.linuxquestions.org/questions/linux-newbie-8/isntall-apache-tomcat-connector-944507/)

fachhoch@gmail.com 05-11-2012 09:45 PM

isntall apache tomcat connector
 
I am having hard time installing apache tomcat connector.

I downloaded apache tomcat connector src in my tmp directory.

I followed some tutorial and executed buildconf.sh from apache-tomcat-connector-src/native
after this no file mod_jk.so is created , please advic e how to install apache-tomcat conector.

blue_print 05-11-2012 10:40 PM

I would suggest you to follow the link to setup Apache-tomcat

http://www.howtoforge.com/apache2_to...jk_integration

If you have issues, please post it here

fachhoch@gmail.com 05-11-2012 11:40 PM

Quote:

Originally Posted by blue_print (Post 4676412)
I would suggest you to follow the link to setup Apache-tomcat

http://www.howtoforge.com/apache2_to...jk_integration

If you have issues, please post it here

Please help me install apache2-threaded-dev,
I downloaded apache2-threaded-dev_2.2.22-5_amd64.deb now I to install this ?

fachhoch@gmail.com 05-11-2012 11:44 PM

Quote:

Originally Posted by fachhoch@gmail.com (Post 4676426)
Please help me install apache2-threaded-dev,
I downloaded apache2-threaded-dev_2.2.22-5_amd64.deb now I to install this ?

I tried with sudo dpkg -i /tmp/apache2-threaded-dev_2.2.22-5_amd64.deb
I got
sudo: dpkg: command not found

also yum install dpkg got not found.
Please help me. I am using amazon linux.

blue_print 05-11-2012 11:59 PM

What is the OS you're running?

Code:

cat /etc/issue

or cat /etc/redhad-release


fachhoch@gmail.com 05-12-2012 12:15 AM

Quote:

Originally Posted by blue_print (Post 4676430)
What is the OS you're running?

Code:

cat /etc/issue

or cat /etc/redhad-release


I am running amazon linux

Code:

Amazon Linux AMI release 2012.03
Kernel \r on an \m

I managed to install apxs2.

I did run this ./configure --with-apxs=/usr/bin/apxs2

here is the output
Code:


[root@ip-10-108-7-154 native]# ./configure --with-apxs
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for test... /usr/bin/test
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
checking for apxs... /usr/sbin/apxs
APRINCLUDEDIR is  -I/usr/include/apr-1 -I/usr/include/apr-1
building connector for "apache-2.0"
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... none
checking dependency style of gcc... none
checking for a sed that does not truncate output... (cached) /bin/sed
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking how to print strings... printf
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... /bin/rm: cannot remove `conftest*': No such file or directory
yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... /bin/rm: cannot remove `conftest*': No such file or directory
no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
LIBTOOL="/usr/lib64/apr-1/build/libtool --silent"
checking size of char... 1
checking size of int... 4
checking size of long... 8
checking size of short... 2
checking size of long double... 16
checking size of long long... 8
checking size of longlong... 0
checking size of pid_t... 4
checking size of pthread_t... 8
checking for snprintf... yes
checking for vsnprintf... yes
checking for flock... yes
checking for setsockopt in -lsocket... no
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking whether to use SO_RCVTIMEO with setsockopt()... yes
checking whether to use SO_SNDTIMEO with setsockopt()... yes
checking whether to use SOCK_CLOEXEC with socket()... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for poll... yes
checking for target platform... unix
no apache given
no netscape given
configure: creating ./config.status
config.status: creating Makefile
config.status: creating apache-1.3/Makefile
config.status: creating apache-1.3/Makefile.apxs
config.status: creating apache-2.0/Makefile
config.status: creating apache-2.0/Makefile.apxs
config.status: creating common/Makefile
config.status: creating common/list.mk
config.status: creating common/jk_types.h
config.status: creating common/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
/bin/rm: cannot remove `libtoolT': No such file or directory

did it complete sucessfully or failed ?

fachhoch@gmail.com 05-12-2012 01:17 AM

I managed installing connector.now when testing I get

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


I checked the logs of mod_jk connector

Code:


[Sat May 12 06:01:16 2012] [23339:140515632519136] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.35 initialized
[Sat May 12 06:01:16 2012] [23340:140515632519136] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.35 initialized
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=2)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_service::jk_ajp_common.c (2634): (worker1) connecting to tomcat failed.
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_handler::mod_jk.c (2788): Service error=-3 for worker=worker1
[Sat May 12 06:03:36 2012] worker1 ec2-23-20-204-230.compute-1.amazonaws.com 0.100685
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=2)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_service::jk_ajp_common.c (2634): (worker1) connecting to tomcat failed.
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_handler::mod_jk.c (2788): Service error=-3 for worker=worker1
[Sat May 12 06:03:54 2012] worker1 ec2-23-20-204-230.compute-1.amazonaws.com 0.100792
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
@


my worker.properties

Code:

workers.tomcat_home=/var/lib/apache-tomcat-6.0.35

#workers.java_home=/usr/lib/jdk

ps=/

worker.list=worker1



worker.default.port=8009

worker.default.host=ip-10-116-182-211.ec2.internal

worker.default.type=ajp13

worker.default.lbfactor=1


last part of my httpd.conf
Code:

workers.tomcat_home=/var/lib/apache-tomcat-6.0.35
JkWorkersFile /etc/httpd/worker.properties



# Where to put jk logs

JkLogFile /var/log/httpd/mod_jk.log



# Set the jk log level [debug/error/info]

JkLogLevel info



# Select the log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "



# JkOptions indicate to send SSL KEY SIZE,

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories



# JkRequestLogFormat set the request format

JkRequestLogFormat "%w %V %T"





# Send servlet for context / jsp-examples to worker named worker1

JkMount /myapp worker1



JkMount /myapp/* worker1

please help what's wrong with my configration

fachhoch@gmail.com 05-12-2012 10:25 AM

Please help me with this

Quote:

Originally Posted by fachhoch@gmail.com (Post 4676463)
I managed installing connector.now when testing I get

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


I checked the logs of mod_jk connector

Code:


[Sat May 12 06:01:16 2012] [23339:140515632519136] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.35 initialized
[Sat May 12 06:01:16 2012] [23340:140515632519136] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.35 initialized
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=2)
[Sat May 12 06:03:36 2012] [23345:140515632519136] [error] ajp_service::jk_ajp_common.c (2634): (worker1) connecting to tomcat failed.
[Sat May 12 06:03:36 2012] [23345:140515632519136] [info] jk_handler::mod_jk.c (2788): Service error=-3 for worker=worker1
[Sat May 12 06:03:36 2012] worker1 ec2-23-20-204-230.compute-1.amazonaws.com 0.100685
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=2)
[Sat May 12 06:03:54 2012] [23343:140515632519136] [error] ajp_service::jk_ajp_common.c (2634): (worker1) connecting to tomcat failed.
[Sat May 12 06:03:54 2012] [23343:140515632519136] [info] jk_handler::mod_jk.c (2788): Service error=-3 for worker=worker1
[Sat May 12 06:03:54 2012] worker1 ec2-23-20-204-230.compute-1.amazonaws.com 0.100792
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_service::jk_ajp_common.c (2614): (worker1) sending request to tomcat failed (recoverable), because of erro
r during request sending (attempt=1)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8009 failed (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [info] ajp_connect_to_endpoint::jk_ajp_common.c (992): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Sat May 12 06:12:44 2012] [23348:140515632519136] [error] ajp_send_request::jk_ajp_common.c (1621): (worker1) connecting to backend failed. Tomcat is probably not star
ted or is listening on the wrong port (errno=111)
@


my worker.properties

Code:

workers.tomcat_home=/var/lib/apache-tomcat-6.0.35

#workers.java_home=/usr/lib/jdk

ps=/

worker.list=worker1



worker.default.port=8009

worker.default.host=ip-10-116-182-211.ec2.internal

worker.default.type=ajp13

worker.default.lbfactor=1


last part of my httpd.conf
Code:

workers.tomcat_home=/var/lib/apache-tomcat-6.0.35
JkWorkersFile /etc/httpd/worker.properties



# Where to put jk logs

JkLogFile /var/log/httpd/mod_jk.log



# Set the jk log level [debug/error/info]

JkLogLevel info



# Select the log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "



# JkOptions indicate to send SSL KEY SIZE,

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories



# JkRequestLogFormat set the request format

JkRequestLogFormat "%w %V %T"





# Send servlet for context / jsp-examples to worker named worker1

JkMount /myapp worker1



JkMount /myapp/* worker1

please help what's wrong with my configration



All times are GMT -5. The time now is 05:22 AM.