Re: mod_jk linux binaries

2012-01-06 Thread Leon Kolchinsky
Hi,

I think we had this discussion regarding rpm packages etc., several month
ago (try to search archives).
AFAIK RedHat distributing mod_jk rpms with their JBoss product.
Try to check with them or build your own ;)

Leon Kolchinsky



On Fri, Jan 6, 2012 at 21:49, Olivier MENUEL wrote:

> Yes
>
> But I wish to package the binaries with my application to distribute them
> to my partners.
> I was hoping I could find binaries for all environments (it will take me
> some time to build them on each possible environment), like apache was
> doing with previous releases (for instance 1.2.31).
> Has apache completely stopped distributing linux binaries since 1.2.32 ?
> Or will they be available later ?
>
> Thanks
>
>
>
> -Message d'origine-
> De : Rainer Jung [mailto:rainer.j...@kippdata.de]
> Envoyé : vendredi 6 janvier 2012 11:19
> À : Tomcat Users List
> Objet : Re: mod_jk linux binaries
>
> On 06.01.2012 11:01, Leon Kolchinsky wrote:
> > Yes there is -
> >
> http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.32-src.tar.gz
>
> These are the sources. For 1.2.32 there are indeed not binaries for
> Linux available. Building is simple and ensures compatibility with your
> Apache Webserver binary.
>
> Regards,
>
> Rainer
>
> > Check out this page -  http://tomcat.apache.org/download-connectors.cgi
> >
> > Cheers,
> > Leon Kolchinsky
> >
> >
> >
> > On Fri, Jan 6, 2012 at 20:54, Olivier MENUEL >wrote:
> >
> >> Ok
> >> Thank you very much
> >>
> >> I was hoping I could find already compiled binaries (there are the
> 1.2.31
> >> in the archives, but not the 1.2.32).
> >> I'll do that.
> >>
> >> Thanks
> >>
> >>
> >> -Message d'origine-
> >> De : Leon Kolchinsky [mailto:lkolc...@gmail.com]
> >> Envoyé : vendredi 6 janvier 2012 10:45
> >> À : Tomcat Users List
> >> Objet : Re: mod_jk linux binaries
> >>
> >> Hi,
> >>
> >> You can compile mod_jk and it's pretty straight forward (please use
> latest
> >> source, mine is just an example):
> >> 1.
> >> # yum install httpd httpd-devel gcc gcc-c++
> >>
> >> 2.
> >> Go to http://tomcat.apache.org/download-connectors.cgi and download the
> >> source code:
> >> # wget
> >>
> >>
> http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/source/jk-1.2.31/tomcat-connectors-1.2.31-src.tar.gz
> >> 3.
> >> # tar -xvzf tomcat-connectors-1.2.31-src.tar.gz
> >>
> >> Read docs/webserver_howto/apache.html or native/BUILDING.txt for
> options.
> >>
> >> # cd tomcat-connectors-1.2.31-src/native/
> >> # which apxs
> >> # ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
> >> # make
> >> # make install
> >>
> >> Cheers,
> >> Leon Kolchinsky
> >>
> >>
> >>
> >> On Fri, Jan 6, 2012 at 20:35, Olivier MENUEL >>> wrote:
> >>
> >>> Hi,
> >>>
> >>> Where can I find binaries for mod_jk 1.2.32 for linux httpd 2.2 ?
> >>> I can find only windows/netware...
> >>>
> >>> Thanks
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: mod_jk linux binaries

2012-01-06 Thread Leon Kolchinsky
Yes there is -
http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.32-src.tar.gz

Check out this page -  http://tomcat.apache.org/download-connectors.cgi

Cheers,
Leon Kolchinsky



On Fri, Jan 6, 2012 at 20:54, Olivier MENUEL wrote:

> Ok
> Thank you very much
>
> I was hoping I could find already compiled binaries (there are the 1.2.31
> in the archives, but not the 1.2.32).
> I'll do that.
>
> Thanks
>
>
> -----Message d'origine-
> De : Leon Kolchinsky [mailto:lkolc...@gmail.com]
> Envoyé : vendredi 6 janvier 2012 10:45
> À : Tomcat Users List
> Objet : Re: mod_jk linux binaries
>
> Hi,
>
> You can compile mod_jk and it's pretty straight forward (please use latest
> source, mine is just an example):
> 1.
> # yum install httpd httpd-devel gcc gcc-c++
>
> 2.
> Go to http://tomcat.apache.org/download-connectors.cgi and download the
> source code:
> # wget
>
> http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/source/jk-1.2.31/tomcat-connectors-1.2.31-src.tar.gz
> 3.
> # tar -xvzf tomcat-connectors-1.2.31-src.tar.gz
>
> Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.
>
> # cd tomcat-connectors-1.2.31-src/native/
> # which apxs
> # ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
> # make
> # make install
>
> Cheers,
> Leon Kolchinsky
>
>
>
> On Fri, Jan 6, 2012 at 20:35, Olivier MENUEL  >wrote:
>
> > Hi,
> >
> > Where can I find binaries for mod_jk 1.2.32 for linux httpd 2.2 ?
> > I can find only windows/netware...
> >
> > Thanks
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: mod_jk linux binaries

2012-01-06 Thread Leon Kolchinsky
Hi,

You can compile mod_jk and it's pretty straight forward (please use latest
source, mine is just an example):
1.
# yum install httpd httpd-devel gcc gcc-c++

2.
Go to http://tomcat.apache.org/download-connectors.cgi and download the
source code:
# wget
http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/source/jk-1.2.31/tomcat-connectors-1.2.31-src.tar.gz
3.
# tar -xvzf tomcat-connectors-1.2.31-src.tar.gz

Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.

# cd tomcat-connectors-1.2.31-src/native/
# which apxs
# ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
# make
# make install

Cheers,
Leon Kolchinsky



On Fri, Jan 6, 2012 at 20:35, Olivier MENUEL wrote:

> Hi,
>
> Where can I find binaries for mod_jk 1.2.32 for linux httpd 2.2 ?
> I can find only windows/netware...
>
> Thanks
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: RedHat and mod_jk

2011-07-16 Thread Leon Kolchinsky
Hi,

On RedHat installation of mod_jk is as easy as:

1.
# yum install httpd httpd-devel gcc gcc-c++

2.
Go to http://tomcat.apache.org/download-connectors.cgi and download the
source code (I'm giving an example with 1.2.31 version)
# wget
http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/source/jk-1.2.31/tomcat-connectors-1.2.31-src.tar.gz
3.
# tar -xvzf tomcat-connectors-1.2.31-src.tar.gz

Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.

# cd tomcat-connectors-1.2.31-src/native/
# which apxs
# ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
# make
# make install

You don't need any Java packages for that.

Also my way of installing JAVA on RedHat (Since many Apps support only Sun's
JDK/JRE):

JAVA INSTALLATION:
--
1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.htmland
download latest Self Extracting Installer.

Put it all under /opt or any other dir. you choose.
[root@vera126 downloads]# ls -l /opt
-rw-r--r--  1 root root  85052342 May 19 11:15 jdk-6u25-linux-i586.bin
[root@vera126 downloads]# cd /opt

# sh jdk-6u25-linux-i586.bin
# ln -s jdk1.6.0_25 jdk

# updatedb;locate javac |grep bin
/opt/jdk1.6.0_25/bin/javac
2.
Here /opt/jdk is the actual JAVA_HOME for your machine. Note this as you
will need it to run the following commands.

alternatives --install /usr/bin/java java /opt/jdk/bin/java 100
alternatives --install /usr/bin/jar jar /opt/jdk/bin/jar 100
alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 100

3.
Finally you should configure alternative to use Sun's JVM as the default
JVM. To do this type:
# /usr/sbin/alternatives --config java

4.
In the future when we update Java, we only need to update this symlink (for
JAVA_HOME)
/opt/jdk

5.
Last check:
[root@vera126 opt]# java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)


I've already seen members of this list giving good tips on that.

Cheers,
Leon Kolchinsky



On Fri, Jul 15, 2011 at 18:23, André Warnier  wrote:

> Hi.
>
> Recently, other people and myself were looking for a pre-packaged mod_jk
> binary for a RedHat RHELS system.
>
> As a result of some investigation (by Mark Eggers on one side, and an
> independent sysadmin of my customer on the other side), things seem to boil
> down to (largely quoted) :
>
> "
> In the RedHat product "Red Hat Enterprise Linux Server" (RHELS), there is
> no repository containing a pre-packaged mod_jk module.
>
> To obtain such a package, the client has to purchase the separate RedHat
> package "JBoss Enterprise Web Server", which contains mod_jk.
> "
>
> I would suppose that RedHat has good lawyers, and that they are "allowed"
> to do such a thing.  Personally, I find this a bit "cheeky", specially from
> a company that presents itself as a champion of Open Source.
> It is not an unmitigated feeling, because on the other hand I also
> recognise that mod_jk is a complex piece of software, and that supporting it
> for customers certainly has a cost.
>
> But whatever the real merits of my personal feelings in the matter,
> there are people (even sysadmins) who are comfortable with the idea of
> installing a software package from sources; but there are also many people
> who simply do not have the time to go through the hassle, and people who are
> uncomfortable with the installation of such packages (because of maintenance
> reasons, patches etc.), and people who are just not allowed to install
> anything that is not part of the standard corporate repository.
>
> In the practice thus, it probably means that a number of people will no
> longer use mod_jk on RHEL systems in the future, and I find this a pity,
> because even from a purely technical point of view, it is always better to
> have some alternatives.  And there are things which you can do with mod_jk,
> which you cannot with mod_proxy_ajp and/or mod_proxy_http (and probably
> vice-versa).
>
> Anyway, I wonder if anyone here has another opinion on the matter.
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tomcat.**apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Binary of mod_jk.so for Apache 2.2.x

2011-07-14 Thread Leon Kolchinsky
Hi,

Hmm, I didn't know that you're not managing this box ;)
I'm actually a Linux SysAdmin and not a big specialist in mod_jk ;)
What version of RedHat it is?
What application do you want to run on Tomcat behind Apache Httpd?

If you want I could help your SysAdmin with compilation and basic
configuration.

Cheers,
Leon Kolchinsky



On Fri, Jul 15, 2011 at 03:03, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2
 wrote:

> Thanks, Chris.  Unfortunately, I don't have root access, and I know just
> enough Linux to be dangerous!  LOL!  The Linux S.A. doesn't know anything
> about compiling (don't get me started on THAT), so he was asking if there
> were a binary module to drop into the modules folder.  I was hoping to avoid
> having to learn how to do his job FOR him.  :-D
>
> JL
>
>
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Thursday, July 14, 2011 12:34 PM
> To: Tomcat Users List
> Subject: Re: Binary of mod_jk.so for Apache 2.2.x
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Leon,
>
> On 7/12/2011 7:42 PM, Leon Kolchinsky wrote:
> > Go to http://tomcat.apache.org/download-connectors.cgi and download
> > the source code:
> >
> > # tar -xvzf tomcat-connectors-1.2.30-src.tar.gz
> >
> > Read docs/webserver_howto/apache.html or native/BUILDING.txt for
> > options.
> >
> > # cd tomcat-connectors-1.2.30-src/native/ # which apxs # ./configure
> > --with-apxs=/usr/sbin/apxs --enable-api-compatibility # make # make
> > install
>
> All that as root? Hmm.
>
> Also, not everyone has a C compiler, especially on a production machine.
> (The answer, of course, is to build somewhere else and upload.)
>
> Jonathan, I understand that you want convenience, but there are several
> factors to consider, here:
>
> 1. Unless you download a binary from a trusted source (i.e. not anyone
>   on this list, but something like something.apache.org, or from your
>   distro's package manager), you should consider yourself compromised.
>
> 2. If you build your own mod_jk, you know it will work with your exact
>   environment. No weird problems with slight version mismatches between
>   httpd version or other libraries. No questions about which
>   architecture's files you need to download, etc.
>
> 3. Building mod_jk from source is relatively trivial. See above. Most
>   Linux distros some with a C compiler by default, and all of them
>   can trivially install gcc.
>
> Consider trying it.
>
> Recently, the Tomcat team decided to stop providing binaries for *NIX
> platforms because of the above (maybe that was just for tcnative, but I
> wouldn't be surprised if the policy is now to avoid rolling binaries for
> any non-Java components).
>
> Why? Because if we wanted to provide binaries for, say, mod_jk, we need
> to support (at least) two architectures: x86 and x86_64. Also, there are
> 4 major versions of Apache httpd: 1.3, 2.0, 2.2, and 2.4. Sometimes,
> even httpd patch level can affect compatibility (though it really
> shouldn't) or maybe it was built against 2.2.11 but the user has 2.2.13
> and wants to know "why no binary?".
>
> We cannot possibly provide enough binaries to make everyone happy. Since
> it's so easy to build mod_jk, we ask users in *NIX environments to just
> do it.
>
> We do provide binaries for both 32- and 64-bit Microsoft Windows
> environments for Apache httpd, Microsoft IIS and (wtf?) Netscape,
> because those folks rarely have compilers handy.
>
> If you have any trouble building mod_jk, please don't hesitate to come
> back for help.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk4fGnQACgkQ9CaO5/Lv0PCRlgCfd41tx9q8BpKfY35elKUCmokO
> b9oAoIC3QamvoAhLvtageSz0/zQzEVxE
> =0myN
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Binary of mod_jk.so for Apache 2.2.x

2011-07-12 Thread Leon Kolchinsky
For God's sake,

Go to http://tomcat.apache.org/download-connectors.cgi and download the
source code:

# tar -xvzf tomcat-connectors-1.2.30-src.tar.gz

Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.

# cd tomcat-connectors-1.2.30-src/native/
# which apxs
# ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
# make
# make install

Cheers,
Leon Kolchinsky



On Wed, Jul 13, 2011 at 05:03, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2
 wrote:

> Thanks for the reply, André.
>
> It is Red Hat Linux.
>
>
> -Original Message-
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Tuesday, July 12, 2011 2:12 PM
> To: Tomcat Users List
> Subject: Re: Binary of mod_jk.so for Apache 2.2.x
>
> Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
> > I don't know the first thing about compiling on Linux.  I just want to
> drop a compiled mod_jk.so into the modules directory.  Where can I find the
> binary, not the source?  Thanks!
> >
> What "kind" of Linux ?
>
> explanation: most Linux "distributions" (RedHat, Suse, Debian, Ubuntu,..)
> have what is
> called a "software package manager" utility, which is a special tool to
> install software
> on the system.  It will usually get the desired binary modules, already
> compiled and
> configured, from some repository (often on the web), and install it for
> you.
> It is the easiest and quickest way of installing software on Linux systems.
>
> For example, if your system is a Debian or Ubuntu Linux, the following
> command would
> download and install mod_jk :
>
> apt-get install libapache2-mod-jk
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: How ot monitor hung tomcat/apache processes?

2010-09-22 Thread Leon Kolchinsky
Hi,

You can try several approaches (I'll list 2 that I'm aware of):

1) Automatic restarts on OutOfMemory errors:
Add the following to CATALINA_OPTS:

-XX:OnOutOfMemoryError=/usr/sbin/restart_tcserver

Write your restart_tcserver (you may send an e-mail notification from it
etc.)

2) This is what I do (please critisice/suggest improvements to this
approach):

I've got 2 servers with Tomcat+Apache httpd with heartbeat beetween them:
I'm running this little script every 15 min. via cron:

# cat /srv/scripts/test_live.sh
#!/bin/bash
SERVICE_HTTPD=$(ps -ef | grep -v grep | grep -c httpd)
SERVICE_TOMCAT=$(ps -ef | grep -v grep | grep -c tomcat)
SERVICE_HEARTBEAT=$(ps -ef | grep -v grep | grep -c heartbeat)
SERVICE_STATUS=$(/srv/scripts/check_http.pl -H confluence-server.myorg.com
-u /blank.html)

# While testing, please uncomment the following echo statements
if [ $SERVICE_HTTPD -ne 0 -a $SERVICE_TOMCAT -ne 0 -a "$SERVICE_STATUS" =
"Status: OK" ]
then
#   echo "SERVICE_HTTPD and SERVICE_TOMCAT and SERVICE_STATUS
are OK, everything is fine"
exit
elif [ $SERVICE_HEARTBEAT -ne 0 ]
then
echo "The following output triggered failover:
SERVICE_HTTPD=$SERVICE_HTTPD , SERVICE_TOMCAT=$SERVICE_TOMCAT ,
SERVICE_STATUS=$SERVICE_STATUS , failing over to spare server"
echo "The following output triggered failover:
SERVICE_HTTPD=$SERVICE_HTTPD , SERVICE_TOMCAT=$SERVICE_TOMCAT ,
SERVICE_STATUS=$SERVICE_STATUS , failing over to a spare server at `date`" |
/bin/mailx -s "Server `uname -n` encountered a problem, failing over to a
spare server at `date`" lkolchin at gmail dot com
/etc/init.d/heartbeat stop
else
#   echo "This server probably failed over to the spare one,
nothing to do"
exit
fi
-

If Tomcat+Apache running and application responsive ($SERVICE_STATUS) do
nothing if at least one of those conditions is not true, failover to a spare
server.

check_http.pl - This is a perl script (from Nagios Plugin I believe)-
## check_http.pl
## Copyright (c) 2008, Oliver Wittenburg  
##
## This program is free software: you can redistribute it and/or modify it
under
## the terms of the GNU General Public License as published by the Free
Software
...


Cheers,
Leon Kolchinsky



On Thu, Sep 23, 2010 at 04:30, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Shashank,
>
> On 9/22/2010 8:30 AM, Mendiratta, Shashank wrote:
> > Thanx , about that here the outbound port 80 is blocked so we cannot
> > wget , moreover this wont solve the problem as to why the the services
> > are getting hung.
>
> Hmm. Can you monitor from the server itself? That's not unusual to do.
> Also, connections to localhost:80 usually work even when software-based
> firewalls are in place, since the local host is usually considered trusted.
>
> > Well I had an idea, please critic it. Why not monitor the server.log
> > file if we get some kind of error. We send an alert and then restart the
> > service . Befire that we have to make a repository of types of error
> > that can occur
>
> We have one particularly poorly-written webapp that has a habit of
> running out of memory. We have segregated it into it's own Tomcat
> instance and actually do scan the log file for errors in the way you
> describe.
>
> The script is essentially this:
>
> grep -m 1 OutOfMemoryError ${LOGFILE} > /dev/null
>
> if [ "$?" == "0" ] ; then
>
> # notify an administrator
>
> fi
>
> It's not particularly elegant, but it gets the job done.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyaS0wACgkQ9CaO5/Lv0PCxXQCgwIlct+hqxxejBAEUAPw8+gXj
> EiAAoImkWA55dP3Nw8iuWIqM2P/N7Hvk
> =avt1
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: FW: tomcat integrated with httpd and over https port, not working

2010-08-11 Thread Leon Kolchinsky
Hi,

Take a look here- http://myunster.com/blog/25.html

<http://myunster.com/blog/25.html>It'll give you an easy start.

Cheers,
Leon Kolchinsky

On Thu, Aug 12, 2010 at 12:57, Irfan Khan wrote:

> Is there anyone who can help me to resolve this issue.
>
>
>
> From: Irfan Khan [mailto:irfan.k...@enovatemedia.co.in]
> Sent: Wednesday, August 11, 2010 5:31 PM
> To: 'users@tomcat.apache.org'
> Subject: tomcat integrated with httpd and over https port, not working
>
>
>
>
>
> Dear pals,
>
>
>
> Issue: tomcat integrated with httpd and over https port, not working.
>
>
>
> Important info: With the below given httpd.conf, if it is modified to work
> with http , then tomcat pages were accessed on http.
>
>
>
> So it is confirmed that there must be something wrong with ssl settings.
>
>
>
> I have tried find on Google , and ended with this final configuration for
> ssl but with no luck. I am pulling my hair to find out why it is not
> working.
>
>
>
> You brilliant guys can suggest!
>
> Kindly help!
>
> Thanks in advance!
>
>
>
>
>
> Tools Version details;
>
> Centos 5.3
>
> httpd-2.2.3-31
>
> tomcat-6.0.26
>
> mod_jk-1.2.28-httpd-2.2.X
>
> openssl-0.9.8e
>
> jre1.6.0_20
>
>
>
> EXISTING WORKING CONFIGURATION
>
> Http and https port on httpd - working fine
>
> Tomcat on port 8080 - working fine
>
> Tomcat + httpd + http port - working fine
>
>
>
> ##
>
> Httpd.conf
>
> ##
>
> NameVirtualHost *:443
>
>
>
> LoadModule jk_module modules/mod_jk.so
>
> JkWorkersFile "/etc/httpd/conf/workers.properties"
>
> JkShmFile "/var/log/httpd/mod_jk.shm"
>
> JkLogFile "/var/log/httpd/mod_jk.log"
>
> JkLogLevel info
>
> JkLogStampFormat "[%a %b %d %H %M %S %Y]"
>
> # JkOptions indicate to send SSL KEY SIZE,
>
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> +ForwardSSLCertChain
>
> # Should mod_jk send SSL information to Tomcat (default is On)
>
> JkExtractSSL On
>
> # What is the indicator for SSL (default is HTTPS)
>
> JkHTTPSIndicator HTTPS
>
> # What is the indicator for SSL session (default is SSL_SESSION_ID)
>
> JkSESSIONIndicator SSL_SESSION_ID
>
> # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
>
> JkCIPHERIndicator SSL_CIPHER
>
> # What is the indicator for the client SSL certificated (default is
> SSL_CLIENT_CERT)
>
> JkCERTSIndicator SSL_CLIENT_CERT
>
>
>
>
>
> 
>
> ServerName abcd.com
>
> SSLEngine On
>
> SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
>
> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
>
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
>
>
>
> jkMount /tomcatpages* worker1
>
> 
>
>


Re: Rewrite URLs inside HTML pages?

2010-08-08 Thread Leon Kolchinsky
Wow ;)

Thanks Rainer,

I'll comment inline.

On Thu, Aug 5, 2010 at 18:26, Rainer Jung  wrote:

> Comments inline
>
>
> On 05.08.2010 03:30, Leon Kolchinsky wrote:
>
>> Hi,
>>
>> Hmm.
>> Interesting.
>> Of course I'd like to make it work with "simple configuration" or/and with
>> JkHTTPSIndicator.
>>
>> I'm just not clear on how to make this "simple configuration".
>>
>> As I've said there is no SSL handling on the server side. All SSL request
>> handled on the load balance level which in turn talks to Apache
>> (configured
>> to talk to Tomcat via mod_jk) via http.
>>
>> myserv.mydomain.com - Tomcat server's Domain name
>> sakai-stg.mydomain.com - Load balancer's Domain name
>>
>> Clients coming to Load Balancer's URL https://sakai-stg.mydomain.com need
>> to
>> use internal links (submit forms etc.) which appear as http://
>> sakai-stg.mydomain.com/. on the served pages.
>> Submitting forms is not working in that scenario since the links should
>> look
>> like this inside the pages - https://sakai-stg.mydomain.com/.
>>
>>
>> Please see my mod_jk.conf, workers.properties, 01myserv.mydomain.com.conf
>> files below.
>>
>> Can you come up with a solution without using mod_substitute as I do now?
>>
>> [r...@myserv mod_sed]# cat /etc/httpd/conf/mod_jk.conf
>> LoadModule jk_module modules/mod_jk.so
>>
>> # mod_jk config
>> # Where to find workers.properties
>> # Update this path to match your conf directory location (put
>> workers.properties next to httpd.conf)
>> JkWorkersFile /etc/httpd/conf/workers.properties
>> # Where to put jk shared memory
>> # Update this path to match your local state directory or logs directory
>> JkShmFile /var/log/httpd/mod_jk.shm
>> # Where to put jk logs
>> # Update this path to match your logs directory location (put mod_jk.log
>> next to access_log)
>> JkLogFile /var/log/httpd/mod_jk.log
>>
>
> Unrelated: you could use rotatelogs here, as in "CustomLog" or "ErrorLog"
> to automatically rotate the files.
>
> My logs rotated by logrotate (I'm not familiar with rotatelogs option, will
need to read about it later)

>
>  # Set the jk log level [debug/error/info]
>> JkLogLevel info
>> # Select the timestamp log format
>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>
>
> Unrelated: I would remove JkLogStampFormat. Since a few years mod_jk will
> log sub second timestamps by default, but this format disables that.
>
> Done: removed  JkLogStampFormat

>
>  #JkOptions indicate to send SSL KEY SIZE,
>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>
>
> Unrelated: You should remove "+ForwardURICompat" unless you understand what
> it does and that you will definitely need it.
>
> Done: removed  "+ForwardURICompat"

>
>  # JkRequestLogFormat set the request format
>> JkRequestLogFormat "%w %V %T"
>>
>
> Unrelated: Don't like the JkRequestFormat. Instead would use so called
> "notes" to add the info directly to the access log.
>
>  Are you talking about "mod_log_config" (
http://tomcat.apache.org/connectors-doc/reference/apache.html)?

>
>  # Globally deny access to the WEB-INF directory
>> 
>> AllowOverride None
>> deny from all
>> 
>>
>
> Unrelated: The application directory usually should not be reachable at all
> by Apache.
>
> So, Is it safe to remove those  . lines?

>
>  [r...@myserv mod_sed]#
>> [r...@myserv mod_sed]# cat /etc/httpd/conf/workers.properties
>> #
>> # This file provides minimal jk configuration properties needed to
>> # connect to Tomcat.
>> #
>> # We define a workers named worker1 and worker2
>> workers.tomcat_home=/srv/tomcat/
>> workers.java_home=/srv/jdk
>> ps=/
>>
>
> Unrelated: The above three are useless.
>
>  Done: removed

>
>  worker.list=worker1
>> worker.worker1.type=ajp13
>> worker.worker1.host=localhost
>> worker.worker1.port=8009
>> worker.worker1.lbfactor=1
>>
>
> Unrelated: That's very minimal.
>
>
>  # Load-balancing behaviour (add when you have more than 1 worker and
>> change
>> worker.workerX.host and worker.list accordingly)
>> # worker.loadbalancer.type=lb
>>
>
> Unrelated: You are not actually using mod_jk load balancing here.
>
> Sure, I don't need load balancing here. It's done on the external LB.

>
>  # Statu

Re: Rewrite URLs inside HTML pages?

2010-08-04 Thread Leon Kolchinsky
Hi,

Hmm.
Interesting.
Of course I'd like to make it work with "simple configuration" or/and with
JkHTTPSIndicator.

I'm just not clear on how to make this "simple configuration".

As I've said there is no SSL handling on the server side. All SSL request
handled on the load balance level which in turn talks to Apache (configured
to talk to Tomcat via mod_jk) via http.

myserv.mydomain.com - Tomcat server's Domain name
sakai-stg.mydomain.com - Load balancer's Domain name

Clients coming to Load Balancer's URL https://sakai-stg.mydomain.com need to
use internal links (submit forms etc.) which appear as http://
sakai-stg.mydomain.com/. on the served pages.
Submitting forms is not working in that scenario since the links should look
like this inside the pages - https://sakai-stg.mydomain.com/.


Please see my mod_jk.conf, workers.properties, 01myserv.mydomain.com.conf
files below.

Can you come up with a solution without using mod_substitute as I do now?

[r...@myserv mod_sed]# cat /etc/httpd/conf/mod_jk.conf
LoadModule jk_module modules/mod_jk.so

# mod_jk config
# Where to find workers.properties
# Update this path to match your conf directory location (put
workers.properties next to httpd.conf)
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/httpd/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log
next to access_log)
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp 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"
# Globally deny access to the WEB-INF directory

AllowOverride None
deny from all


[r...@myserv mod_sed]#
[r...@myserv mod_sed]# cat /etc/httpd/conf/workers.properties
#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# We define a workers named worker1 and worker2
workers.tomcat_home=/srv/tomcat/
workers.java_home=/srv/jdk
ps=/

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1


# Load-balancing behaviour (add when you have more than 1 worker and change
worker.workerX.host and worker.list accordingly)
# worker.loadbalancer.type=lb

# Status worker for managing load balancer (add when you have more than 1
worker)
worker.status.type=status

[r...@myserv mod_sed]#
[r...@myserv mod_sed]# cat
/etc/httpd/conf/vhosts.d/01myserv.mydomain.com.conf
LoadModule substitute_module modules/mod_substitute.so

NameVirtualHost *:80


ServerName myserv.mydomain.com
ServerAdmin leon.kolchin...@mydomain.com
ServerAlias sakai-stg

# Just in case
DocumentRoot /srv/sakai

# if not specified, the global error log is used
ErrorLog /var/log/httpd/myserv.mydomain.com-error_log
CustomLog /var/log/httpd/myserv.mydomain.com-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off

# Add index.jsp to DirectoryIndex files
DirectoryIndex index.php index.html index.htm index.shtml index.php4
index.php3 index.phtml index.cgi index.jsp

JkMount /* worker1

AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|http://myserv|https://sakai-stg|i"
Substitute "s|http://sakai-stg|https://sakai-stg|i"




Best Regards,
Leon



On Wed, Aug 4, 2010 at 23:58, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Leon,
>
> On 8/3/2010 2:45 AM, Leon Kolchinsky wrote:
> > Thanks for your help Rainer/Felix,
> >
> > I've tested several options including mod_substitute and mod_sed and it
> > seems that mod_substitute is a way to go.
>
> Yuk: why go through the kludge of re-writing the pages when simple
> configuration can make it so the pages are correct in the first place?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxZciMACgkQ9CaO5/Lv0PBqtQCgqVkecwM/GcfFnpZY4CeQ5M+g
> weIAnjBkSVjFNpyHaRJ6b58XRXjwIu41
> =x21u
> -END PGP SIGNATURE-
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Leon Kolchinsky
Senior Software Specialist (Collaborative Applications)
ITS Research Support Services
Monash e-Research Centre (MeRC)
Monash University
tel: +61 3 99059560


Re: Rewrite URLs inside HTML pages?

2010-08-02 Thread Leon Kolchinsky
Thanks for your help Rainer/Felix,

I've tested several options including mod_substitute and mod_sed and it
seems that mod_substitute is a way to go.

This is my working configuration now:

LoadModule substitute_module modules/mod_substitute.so
...
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|http://myserver|https://load-balancer|i"
Substitute "s|http://load-balancer|https://load-balancer|i"

Don't ask me why there is a last line, I see no logic here, but without it I
still get several http instead https links via load-balancer backend (May be
Sakai or CISCO CSM side fault).


Best Regards,
Leon Kolchinsky

On Mon, Aug 2, 2010 at 20:14, Rainer Jung  wrote:

> Hi Felix,
>
> hope you are doing well!
>
>
> On 02.08.2010 11:46, Felix Schumacher wrote:
>
>> Hi Rainer,
>> On Mon, 02 Aug 2010 10:00:57 +0200, Rainer Jung
>> wrote:
>>
>>> On 02.08.2010 06:31, Leon Kolchinsky wrote:
>>>
>>>> Hello,
>>>>
>>>> I've configured Tomcat (apache-tomcat-5.5.26) to run behind Apache Http
>>>> (v.2.2.3 ) using mod_jk.
>>>>
>>>> We have 2 of those Tomcat servers running on different machines.
>>>> We also configured load balancer (CISCO CSM) which we want to use for
>>>>
>>> SSL
>>
>>> offloading and LB.
>>>>
>>>> Load balancer serves https requests and forwards them to http (on the
>>>> above
>>>> servers).
>>>>
>>>> The problem is that links given by apache - the generated html pages
>>>>
>>> (by
>>
>>> Sakai app.)  appeared to include http://
>>>> And this is a major problem since we can't even serve forms from https
>>>> URL's
>>>> (the URL of the page is https://. but links inside the HTML page
>>>> itself
>>>> are from http:// format)
>>>>
>>>> I've been thinking to try to resolve this with ProxyHTMLURLMAp
>>>> (mod_proxy_html) but I have no experience with this module.
>>>>
>>>> Can someone give me a sample syntax that I can try to include in my
>>>>
>>> vhost
>>
>>> configuration?
>>>>
>>>> Below is my virt. host configuration:
>>>> NameVirtualHost *:80
>>>>
>>>> 
>>>> ServerName servername.com
>>>> ServerAdmin leo...@servername.com
>>>> ServerAlias sakai-server
>>>>
>>>> # if not specified, the global error log is used
>>>> ErrorLog /var/log/httpd/servername.com-error_log
>>>> CustomLog /var/log/httpd/servername.com-access_log combined
>>>> HostnameLookups Off
>>>> UseCanonicalName Off
>>>>
>>>> # Add index.jsp to DirectoryIndex files
>>>> DirectoryIndex index.php index.html index.htm index.shtml index.php4
>>>> index.php3 index.phtml index.cgi index.jsp
>>>>
>>>> JkMount /* worker1
>>>>
>>>
>>> It might be worthwhile finding out, why sakai produces wrong links. E.g.
>>>
>>
>>  if you are using mod_jk to connect Apache to Tomcat, and you are talking
>>>
>>
>>  HTTPS to Apache, then the calls the isSecure(), getScheme(),
>>> getProtocol() will return the information as seen by Apache, so the
>>> webapp is able to find out that https is used and it seems to be a bug
>>> in sakai.
>>>
>> as I understood the issue, the problems arise from using a loadbalancer in
>>
>> front of the apache httpd servers, which are using mod_jk to communicate
>> with the tomcats. The loadbalancers are terminating the ssl connection and
>> presumably
>> changing hostnames too.
>>
>
> Ah OK, missed that.
>
>
>  But given the documentation link you gave below, it should be easy to
>> configure
>> the vhost in apache httpd (or two - one for ssl, one for non-ssl traffic)
>> by
>> setting JkEnvVar for scheme, hostname and port if necessary.
>>
>> If I read http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>> correctly, one could
>> use proxyPort, proxyName and scheme in the ajp-connector.
>>
>
> If using mod_jk, you can tell mod_jk, that it should derive the
> information, whether SSL is used or not from some Apache environment
> variable. You can the set the variable as you like e.g. depending on the
> client IP is the connection coming from the loadbalancer) or some other
> params.
>
> So you would use
>
> JkHTTPSIndicator MyHT

Rewrite URLs inside HTML pages?

2010-08-01 Thread Leon Kolchinsky
Hello,

I've configured Tomcat (apache-tomcat-5.5.26) to run behind Apache Http
(v.2.2.3 ) using mod_jk.

We have 2 of those Tomcat servers running on different machines.
We also configured load balancer (CISCO CSM) which we want to use for SSL
offloading and LB.

Load balancer serves https requests and forwards them to http (on the above
servers).

The problem is that links given by apache - the generated html pages (by
Sakai app.)  appeared to include http://
And this is a major problem since we can't even serve forms from https URL's
(the URL of the page is https://. but links inside the HTML page itself
are from http:// format)

I've been thinking to try to resolve this with ProxyHTMLURLMAp
(mod_proxy_html) but I have no experience with this module.

Can someone give me a sample syntax that I can try to include in my vhost
configuration?

Below is my virt. host configuration:
NameVirtualHost *:80


ServerName servername.com
ServerAdmin leo...@servername.com
ServerAlias sakai-server

# if not specified, the global error log is used
ErrorLog /var/log/httpd/servername.com-error_log
CustomLog /var/log/httpd/servername.com-access_log combined
HostnameLookups Off
UseCanonicalName Off

# Add index.jsp to DirectoryIndex files
DirectoryIndex index.php index.html index.htm index.shtml index.php4
index.php3 index.phtml index.cgi index.jsp

JkMount /* worker1


Best Regards,

-- 
Leon Kolchinsky


Re: Out of Memory exception (hotspot compilation)

2010-06-03 Thread Leon Kolchinsky
Hello,

Just wanted to update on this issue.
Atlassian support confirms that this is a known issue with Java 6.0_18 and
up.
So, the best solution for now is to use 6.0_17
Here - 
http://jira.atlassian.com/browse/CONF-19049<http://jira.atlassian.com/browse/CONF-19049?focusedCommentId=197013#action_197013>

Regards,
Leon Kolchinsky


On Thu, Jun 3, 2010 at 16:14, Leon Rosenberg wrote:

> On Thu, Jun 3, 2010 at 1:54 AM, Leon Kolchinsky 
> wrote:
> > Yep :)
> > You're right Charles.
> >
> > Thanks,
> > Leon
>
> From Leon To Leon,
> an advice from personal experience and the golden rule of the tomcat
> user list, write it down in glowing red letters on the wall you are
> looking at most:
> Charles is ALWAYS right. ;-)
>
> regards
> Leon
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: simple, fast to setup, javabased CMS for small sites? (not really OT I think )

2010-06-03 Thread Leon Kolchinsky
Hmm,

Confluence?
Although it's more a enterprise wiki but you get all you want (CSS, blogs,
gallery...).
There is a 10$ starter license. You may give it a shot.

Regards,
Leon

On Fri, Jun 4, 2010 at 05:50, MB  wrote:

>
>
> With the wealth of java-based CMS's at  source/content-managment-systems> I was wondering if you guys could
> share your views on the matter when it comes for javabased CMS's for
> small sites?
>
> What are you guys running on Tomcat, if at all?
>
> I need:
> More or less total control over HTML output without an enormous effort
> or learning curve
> CSS-based template themes, both site-wide and for specific pages
> login administration for mere mortals (users)
> gallery function
> news blog style
>
> I love the Struts Action 2 framework and am interested Spring and
> Hibernation as well. I have my eyes on Appfuse, but would like something
> I can set up with 24 hours of work (or whatever is reasonable). All
> designs (CSS), markup and raw content is already ready.
>
> Appfuse look promising for the long term, but I'm not sure about getting
> up and running from the get go.
>
> /MB
>
> "Any sufficiently advanced technology is indistinguishable from magic."
> --Arthur C. Clarke
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Out of Memory exception (hotspot compilation)

2010-06-02 Thread Leon Kolchinsky
Yep :)
You're right Charles.

Thanks,
Leon

On Wed, Jun 2, 2010 at 16:27, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
> > Subject: Re: Out of Memory exception (hotspot compilation)
> >
> > I'd like to file a bug report on similar issue I had.
> > Can you please tell me where can I do it?
>
> Let's see what your original post had in it...
>
> > > Yesterday I've got this error in catalina.out and Tomcat died
> > > (I'm attaching hs_err_pid5460.log file):
> > > #
> > > # A fatal error has been detected by the Java Runtime Environment:
> > > #
> > > # java.lang.OutOfMemoryError: requested 2147483664 bytes for
> Chunk::new.
> > > Out of swap space?
> > > #
> > > #  Internal Error (allocation.cpp:215), pid=5460, tid=1085901120
> > > #  Error: Chunk::new
> > > #
> > > # JRE version: 6.0_18-b07
> > > # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode
> > > linux-amd64 )
> > > # An error report file with more information is saved as:
> > > # /tmp/hs_err_pid5460.log
> > > #
> > > # If you would like to submit a bug report, please visit:
> > > #   http://java.sun.com/webapps/bugreport/crash.jsp
>
> Does that give you a hint?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Out of Memory exception (hotspot compilation)

2010-06-01 Thread Leon Kolchinsky
Hmm,

I'd like to file a bug report on similar issue I had.
Can you please tell me where can I do it?


Cheers,
Leon

On Wed, Jun 2, 2010 at 06:46, Will Glass-Husain wrote:

> The JDK has been the same since early February.  I don't think there's been
> any other system upgrades.  (it's possible there was a upgrade to the OS
> I'm
> not aware of, but definitely not the JDK).
>
> WILL
>
> On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>
> > > From: Will Glass-Husain [mailto:wglasshus...@gmail.com]
> > > Subject: Out of Memory exception (hotspot compilation)
> > >
> > > Specifically, the JVM requested 8GB of memory while hotspot was
> > > trying to compile the exact same Velocity/Foreach method as Leon's
> > > example.  I'm running 64 bit JDK 1.6.0_18-b07
> >
> > > Since it's the exact same method, I'm guessing the Velocity method
> > > triggers a bug in the hotspot compilation.  Note that we've been
> > > running this configuration for 5 months
> >
> > Using the same JDK for those 5 months, or did you recently upgrade?
> >
> >  - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> > MATERIAL and is thus for use only by the intended recipient. If you
> received
> > this in error, please contact the sender and delete the e-mail and its
> > attachments from all computers.
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: Tomcat died on "java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space?" message

2010-05-27 Thread Leon Kolchinsky
Thanks Charles,

It's clear now.
I'll try to run Tomcat with "-client" instead of "-server" option.

It'd be nice to see some speed comparisons between "-client" "-server" and
"-Xint" options and not only "-server" vs "-Xint".


Regards,
Leon

On Fri, May 28, 2010 at 15:28, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
> > Subject: Re: Tomcat died on "java.lang.OutOfMemoryError: requested
> > 2147483664 bytes for Chunk::new. Out of swap space?" message
> >
> > My understanding that the difference between "-client"
> > and "-server" is in the number of code execution before
> > compilation occurred.
>
> No, that's one of the most trivial differences.  The client and server JITs
> are two completely separate and mostly independent compiler implementations.
>
> > Why is it "less fragile"?
>
> Because the server JIT (commonly known as C2) is much more complex and
> includes many more optimization mechanisms; consequently, there is some
> increased chance of error.
>
> Just for grins, I compared Tomcat startup times between server mode and
> -Xint with a 64-bit JDK 6u20 running on a 2.0 Ghz dual-core AMD with 4 GB of
> RAM and the following options:
>
> -Dcom.sun.management.jmxremote -XX:MaxPermSize=128m
> -XX:+HeapDumpOnOutOfMemoryError
>
> Using Tomcat 7 RC2 with full logging enabled, server mode startup took just
> under 4 seconds, whereas -Xint required over 6.5 seconds - a rather
> significant difference, especially since it was purely startup.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat died on "java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space?" message

2010-05-27 Thread Leon Kolchinsky
What do you mean by "less aggressive compilation"?
My understanding that the difference between "-client" and "-server" is in
the number of code execution before compilation occurred.

Why is it "less fragile"?

On Fri, May 28, 2010 at 13:34, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
> > Subject: Re: Tomcat died on "java.lang.OutOfMemoryError: requested
> > 2147483664 bytes for Chunk::new. Out of swap space?" message
> >
> > I've read this nice blog -
> > http://www.talkingtree.com/blog/index.cfm/2006/4/28/Understanding-
> > HotSpot-in-Plain-English
>
> A somewhat naive bit of writing; rather outdated, and tad on the dangerous
> side.  Rainer's suggestions and references are much more appropriate.
>
> > I could use -Xint option to force "interpretedmode execution only"
>
> You could, but your code execution would slow to a crawl.  Not an
> appropriate thing to do in a production environment.  Don't forget that not
> only is your webapp converted to native code by the JIT, but the thousands
> of methods in the JRE and Tomcat itself are also processed.
>
> The client mode (as suggested by Rainer, and almost completely ignored by
> the above article) is a less aggressive compilation option, and is thus less
> fragile than the server JIT.  That should suffice until the Oracle/Sun
> people fix the server bug.  (You did file a bug report, didn't you?)
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat died on "java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space?" message

2010-05-27 Thread Leon Kolchinsky
Hello Jung,

Thanks for your insights. Learning some new stuff about Java every day ;)
I've read this nice blog -
http://www.talkingtree.com/blog/index.cfm/2006/4/28/Understanding-HotSpot-in-Plain-English
 (
UNDERSTANDING HOTSPOT IN PLAIN
ENGLISH<http://www.talkingtree.com/blog/index.cfm/2006/4/28/Understanding-HotSpot-in-Plain-English>
)

Now I can see how to avoid those HotSpot compilation errors and eventual JVM
crashes.
I could use -Xint option to force "interpretedmode execution only"

like this:
# cat /srv/tomcat/bin/setenv.sh
export JAVA_HOME=/srv/jdk
export PATH="${PATH}:${JAVA_HOME}/bin/"
CATALINA_OPTS="-Xint -Xms512m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS
-Djava.awt.headless=true "

What are you saying?
Am I right?


Best Regards,
Leon Kolchinsky

On Thu, May 27, 2010 at 00:38, Rainer Jung  wrote:

> On 26.05.2010 14:49, Caldarale, Charles R wrote:
>
>> From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
>>> Subject: Tomcat died on "java.lang.OutOfMemoryError: requested
>>> 2147483664 bytes for Chunk::new. Out of swap space?" message
>>>
>>> Yesterday I've got this error in catalina.out and Tomcat died (I'm
>>> attaching hs_err_pid5460.log file):
>>>
>>
>> This is not a Tomcat error - it's a bug in the JVM.  The C2 (server)
>> compiler is requesting an extremely large expansion of the C (not Java)
>> heap.  You can try increasing the swap space to see if that's a viable
>> workaround, but you really should do this:
>>
>>  # If you would like to submit a bug report, please visit:
>>> #   http://java.sun.com/webapps/bugreport/crash.jsp
>>>
>>
>> The current JVM version is 6u20, so you might want to try running with
>> that before filing a bug report or expanding the swap file.
>>
>
> If we stick to the theory, that it is actually the Hot Spot compiler, which
> demands the memory, one could also try to work around the issue.
>
> Option 1: Use the client Hot Sopt compiler (Add "-client" when starting the
> JVM). It could help,
>
> Option 2: Disable the Hot Spot compilation for the class and method that
> resulted in the crash:
>
>  Current CompileTask:
>> C2:4743  !
>> org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/parser/node/Node;)Z
>> (514 bytes)
>>
>
> To do this, you need to create a file named ".hotspot_compiler" in the
> working directory of your Tomcat. You would put a line like that into the
> file:
>
> exclude org/apache/velocity/runtime/directive/Foreach render
>
> Some more info about that is contained in
>
>
> http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html#gbyzd
>
> An alternative is adding
> -XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render
>
> to the command line.
>
> See also
>
> http://forums.sun.com/thread.jspa?threadID=417123
>
> http://blogs.sun.com/javawithjiva/entry/hotspotrc_and_hotspot_compiler
>
> If you want to follow the Hot Spot compilation, you can also add
> "-XX:-PrintCompilation".
>
> Regards,
>
> Rainer
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat died on "java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space?" message

2010-05-26 Thread Leon Kolchinsky
Thanks guys for you replys,

Carl - Please update this thread with results of your check for 6u20.

I've decided to install x86 version of JDK - jdk-6u7-linux-i586.bin
(stability is my main concern now)

So in my installation I just installed jdk-6u7-linux-i586.bin version.
1. Changed symlink:
# rm jdk
# ln -s jdk1.6.0_07 jdk
2. Updated paths with:
# alternatives --remove jar /srv/jdk1.6.0_18/bin/jar
# alternatives --remove java /srv/jdk1.6.0_18/bin/java
# alternatives --remove javac /srv/jdk1.6.0_18/bin/javac 100

# alternatives --install /usr/bin/java java /srv/jdk1.6.0_07/bin/java 100
# alternatives --install /usr/bin/jar jar /srv/jdk1.6.0_07/bin/jar 100
# alternatives --install /usr/bin/javac javac /srv/jdk1.6.0_07/bin/javac 100

# /usr/sbin/alternatives --config java
There are 2 programs which provide 'java'.
  SelectionCommand
---
*+ 1   /srv/jdk1.6.0_18/bin/java
   2   /srv/jdk1.6.0_07/bin/java
Enter to keep the current selection[+], or type selection number: 2
# java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

3. Updated setenv.sh to some basic defaults:

# cat /srv/tomcat/bin/setenv.sh
export JAVA_HOME=/srv/jdk
export PATH="${PATH}:${JAVA_HOME}/bin/"

# CATALINA_OPTS="-server -XX:+UseParallelGC -Xms2048m -Xmx2048m
-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled -Djava.awt.headless=true"
CATALINA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS
-Djava.awt.headless=true "
export CATALINA_OPTS

export CATALINA_PID="$CATALINA_HOME/tomcat.pid"

I'm going to monitor this server and see how it goes.

Best Regards,
Leon Kolchinsky

On Thu, May 27, 2010 at 00:20, Carl  wrote:

> I am the person who reported occasional but persistent abrupt terminations
> of the 1.6 JVM on levels 6u10 and above.  I did go back to 6u7 and the
> application has run without a burp for three months.  I had tested
> 6u18/6u19, both of which produced the same result.  I am getting ready to
> start testing 6u20 as I would like to keep current so I don't have any
> security issues hanging out.
>
> Thanks,
>
> Carl
> - Original Message - From: "Caldarale, Charles R" <
> chuck.caldar...@unisys.com>
> To: "Tomcat Users List" 
> Sent: Wednesday, May 26, 2010 8:00 AM
>
> Subject: RE: Tomcat died on "java.lang.OutOfMemoryError: requested
> 2147483664 bytes for Chunk::new. Out of swap space?" message
>
>
>  From: Caldarale, Charles R
>> Subject: RE: Tomcat died on "java.lang.OutOfMemoryError: requested
>> 2147483664 bytes for Chunk::new. Out of swap space?" message
>>
>> The current JVM version is 6u20, so you might want to try running with
>> that before filing a bug report or expanding the swap file.
>>
>
> Should also mention that another Tomcat admin reported occasional but
> persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above, but
> went back to 6u7 and that appeared to rectify the problem.  I think the
> highest level he had tested was 6u17, but I'm not positive.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: virtual host configuration

2010-04-22 Thread Leon Kolchinsky
Try here http://myunster.com/blog/10.html

<http://myunster.com/blog/10.html>Best Regards,
Leon Kolchinsky

On Thu, Apr 22, 2010 at 12:00, daulat khan  wrote:

> Hi,
>
> I am planning to setup virtual hosting in apache-tomcat integrated
> setup. Please share useful links or docs which will help me in
> accomplishing this.
>
>
>
> also  using,
>
> httpd v2.2.14
> tomcat v6.0.20
> tomcat connector v1.2.28
>
>
> Thanks,
> Daulatkhan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Re-direct webpage from HTTP to HTTPS

2010-04-15 Thread Leon Kolchinsky
Hi,

You can read here - http://myunster.com/blog/10.html
<http://myunster.com/blog/10.html>I wrote it a while ago and configuration
is pretty simple.


Best Regards,
Leon Kolchinsky

On Thu, Apr 15, 2010 at 22:33, Stephen .  wrote:

>
>
> Hi all,
>
> I have recently bought and installed an SSL Certificate on my Apache Tomcat
> Server.
>
> I modified the "server.xml" file, so that my webpage now uses only HTTPS
>  (meaning, a secure site)
>
> However, I would like to modify it such that : if someone types in only
> HTTP,  he will nevertheless be directed to the proper place :
> HTTPS://mysite.com
>
> I know that this is a simple thing to do;  I'm just not sure of the exact
> syntax
>
> Any help, please?
>
> Thanks
>
>
>
> _
> Hotmail: Trusted email with powerful SPAM protection.
> https://signup.live.com/signup.aspx?id=60969
>


Re: Multiple SSL certificates on same server

2010-03-08 Thread Leon Kolchinsky
Hi,


Here's an idea for you:
You can use wildcard when generating your certificate, like *.domain.com,
assuming your servers using same domain.com.

Regards,
Leon Kolchinsky

On Tue, Mar 9, 2010 at 11:49, Crypto Sal  wrote:

> On 03/08/2010 06:46 PM, Richard Huntrods wrote:
>
>> Does anyone know if it is possible, or has anyone done this:
>>
>> I have two applications running on a single server. The applications use
>> different domains and URLs, so the single Tomcat instance can easily tell
>> them apart. (Note: this part is currently working just fine).
>>
>> https://domain1/application1
>> https://domain2/application2
>>
>> Again, both domains point to the same static IP, and yes, it is possible
>> for someone to access either application from either domain. Normally, that
>> is not an issue with the clients.
>>
>> However, I currently have only one SSL certificate on the server - this is
>> for domain1. So if you use domain1 to access application1, it's all fine.
>> The security cert comes up green and all that.
>>
>> BUT - if you try and access application2 via domain2, you get the red
>> security cert (wrong domain / server name). I would like to purchase a
>> second certificate for the second domain, and am wondering if this can be
>> done, and how one would tell Tomcat (in server.xml) to acknowledge the
>> second certificate.
>>
>> Currently the stuff in server.xml looks like this:
>>
>> >  maxThreads="150" enableLookups="false" scheme="https"
>> secure="true"
>>  keystoreFile="./keys/.keystore" keystorePass="myPassword"
>>  clientAuth="false" sslProtocol="TLS" />
>>
>>
>> I have a bad feeling it's not possible, but wanted to ask anyway.
>>
>> Thanks in advance.
>>
>> -R
>>
>>
> Richard,
>
> It's possible.
>
> It doesn't appear that Tomcat or Java(SUN) support RFC 3546 just yet (For
> Server Name Indication) even though Apache httpd does. However Windows XP
> users of IE will not be able to take advantage of SNI at this time anyway
> (to further rain on your parade). Vista and greater do make use of SNI
> though. Gotta wait for XP to die I guess. :-P
>
> End result: Multi-Domain Certificate, separate ports, separate IPs or a
> load balancer that distributes the load to an internal IP based on FQDN, to
> which you could then use X amount of different SSL certs.(This last bit may
> be a wee bit complicated)
>
> Hope this helps
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Howto configure cold failover with Tomcat on 2 different servers?

2010-02-18 Thread Leon Kolchinsky
Constrains of the application :(
You can't run 2 instances in same time on the same DB.
That's why I have to configure "Cold Failover" for that I need to find out
that Tomcat is in unresponsive state to shut it down completely and start it
on another server.

But what's the best way (or may be the only way) to achieve that?


On Fri, Feb 19, 2010 at 10:11, Pid  wrote:

> On 18/02/2010 22:49, Leon Kolchinsky wrote:
>
>> Anyone guys?
>> Any insights on the following?
>>
>> Thanks
>>
>> On Thu, Feb 18, 2010 at 13:48, Leon Kolchinsky
>>  wrote:
>>
>>  Hello All,
>>>
>>> My current interest is to install "Confluence" -
>>> http://www.atlassian.com/software/confluence/
>>> in a "Cold Failover" mode.
>>> I'm currently running ApacheHttpd in front of Tomcat6 using mod_jk module
>>> and I prefer to leave Apache Httpd in front of Tomcat.
>>>
>>> This is java application is using DB (Oracle in my case) and some kind of
>>> local caching technique (to make things run faster I presume).
>>> So there must be only one "Confluence" application at a time.
>>>
>>> I would like to configure"Cold Failover" in such a way that the moment
>>> current Tomcat instance become unresponsive, the command will run killing
>>> tomcat+"apache httpd" and starting another
>>> tomcat+"apache httpd" on another server (or just killing tomcat, but I'm
>>> not sure that it's doable, since it's not a regular loadbalancer worker
>>> setup).
>>>
>>
> I'm not sure that's doable either.  If you've got a spare server, why not
> just have the other instance already running?
>
>
>

>
> p
>
>  I know that there is a possibility to use 'Advanced worker directives'
>>> like
>>> connect_timeout, prepost_timeout and reply_timeout but I'm not sure that
>>> it's implementable in my case.
>>>
>>> Any suggestion on proposed configuration?
>>> May be there are some other ways to achieve what I want?
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Howto configure cold failover with Tomcat on 2 different servers?

2010-02-18 Thread Leon Kolchinsky
Anyone guys?
Any insights on the following?

Thanks

On Thu, Feb 18, 2010 at 13:48, Leon Kolchinsky  wrote:

> Hello All,
>
> My current interest is to install "Confluence" -
> http://www.atlassian.com/software/confluence/
> in a "Cold Failover" mode.
> I'm currently running ApacheHttpd in front of Tomcat6 using mod_jk module
> and I prefer to leave Apache Httpd in front of Tomcat.
>
> This is java application is using DB (Oracle in my case) and some kind of
> local caching technique (to make things run faster I presume).
> So there must be only one "Confluence" application at a time.
>
> I would like to configure"Cold Failover" in such a way that the moment
> current Tomcat instance become unresponsive, the command will run killing
> tomcat+"apache httpd" and starting another
> tomcat+"apache httpd" on another server (or just killing tomcat, but I'm
> not sure that it's doable, since it's not a regular loadbalancer worker
> setup).
>
> I know that there is a possibility to use 'Advanced worker directives' like
> connect_timeout, prepost_timeout and reply_timeout but I'm not sure that
> it's implementable in my case.
>
> Any suggestion on proposed configuration?
> May be there are some other ways to achieve what I want?
>
> Any help very much appreciated.
>
>
>
>


Howto configure cold failover with Tomcat on 2 different servers?

2010-02-17 Thread Leon Kolchinsky
Hello All,

My current interest is to install "Confluence" -
http://www.atlassian.com/software/confluence/
in a "Cold Failover" mode.
I'm currently running ApacheHttpd in front of Tomcat6 using mod_jk module
and I prefer to leave Apache Httpd in front of Tomcat.

This is java application is using DB (Oracle in my case) and some kind of
local caching technique (to make things run faster I presume).
So there must be only one "Confluence" application at a time.

I would like to configure"Cold Failover" in such a way that the moment
current Tomcat instance become unresponsive, the command will run killing
tomcat+"apache httpd" and starting another
tomcat+"apache httpd" on another server (or just killing tomcat, but I'm not
sure that it's doable, since it's not a regular loadbalancer worker setup).

I know that there is a possibility to use 'Advanced worker directives' like
connect_timeout, prepost_timeout and reply_timeout but I'm not sure that
it's implementable in my case.

Any suggestion on proposed configuration?
May be there are some other ways to achieve what I want?

Any help very much appreciated.


Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?

2010-01-10 Thread Leon Kolchinsky
Thank you guys,

I've decided to install it into CATALINA_HOME since it seems to be the only
"proper" way for now of installing Sakai.
I also would like to keep apache http and use it's ssl capabilities.

Leon

On Sun, Jan 10, 2010 at 7:57 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Leon,
>
> On 1/9/2010 9:38 AM, Leon Kolchinsky wrote:
> > Yes instructions for Sakai actually say expand it into CATALINA_HOME.
>
> What are the top-level contents for the Sakai tarball? Is it a single
> directory? I would expect
> http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz
> to expand to either a "sakai-2.6.1" directory or maybe even
> "webapps/sakai-2.6.1" or something like that.
>
> If you want to deploy Sakai onto your myserver029.somedomain.com virtual
> host, then you need to put the Sakai directory into one of two places:
>
> /srv/myserver029/Sakai (for http://myserver029.somedomain.com/Sakai)
> or
> /srv/myserver029/ROOT (for http://myserver029.somedomain.com/)
>
> You should also remove the  elements from your conf/server.xml:
> they will cause nothing but confusion.
>
> > O.K I may be wrong but http://sakai26.dyndns.org/servlets-examples/ is
> working.
>
> That's because you properly deployed them using these commands:
>
> > cp -R /opt/tomcat/webapps/jsp-examples /srv/myserver029/
> > cp -R /opt/tomcat/webapps/servlets-examples /srv/sakai26/
>
> > I'd like to fix my configuration and I'm opened for suggestions.
> >
> > What should I change in my configs (I think that I gave a full configs
> > and changes I've made to defaults)?
>
> Suggestions:
>
> 1. Remove the ApacheConfig Listener (as Mark already suggested)
> 2. Remove  elements from conf/server.xml
> 3. Put Sakai into /srv/myserver029/Sakai or /srv/myserver029/ROOT
>  (or /srv/sakai26/Sakai or /srv/sakai26/ROOT)
> 4. Eliminate Apache httpd: you're passing-through everything to
>   Tomcat anyway
>
> > I don't have an access to my linux server now but I've downloaded to
> > J: drive on my win. machine it and there is a structure of tar.gz:
>
> [snip]
>
> > J:\webapps\
> >
> > access.war
> > authn.war
> > courier.war
> > dav.war
> > direct.war
> > emailtemplateservice-tool.war
> > library.war
> > mailtool.war
> > mercury.war
> > osp-common-tool.war
> > osp-glossary-tool.war
> > osp-jsf-example.war
> > osp-jsf-resource.war
> > osp-matrix-tool.war
> > osp-portal-tool.war
> > osp-portal.war
> > osp-presentation-tool.war
> > osp-wizard-tool.war
> > podcasts.war
> > portal-render.war
> > portal.war
> > providers.war
> > sakai-alias-tool.war
> > sakai-announcement-tool.war
> > sakai-archive-tool.war
> > sakai-assignment-tool.war
> > sakai-authz-tool.war
> > sakai-axis.war
> > sakai-axis2.war
> > sakai-blogger-tool.war
> > sakai-calendar-summary-tool.war
> > sakai-calendar-tool.war
> > sakai-chat-tool.war
> > sakai-citations-tool.war
> > sakai-content-tool.war
> > sakai-fck-connector.war
> > sakai-gradebook-testservice.war
> > sakai-gradebook-tool.war
> > sakai-help-tool.war
> > sakai-jsf-resource.war
> > sakai-login-tool.war
> > sakai-mailarchive-james.war
> > sakai-mailarchive-tool.war
> > sakai-memory-tool.war
> > sakai-message-tool.war
> > sakai-messageforums-tool.war
> > sakai-metaobj-tool.war
> > sakai-news-tool.war
> > sakai-podcasts.war
> > sakai-poll-tool.war
> > sakai-postem-tool.war
> > sakai-presence-tool.war
> > sakai-presentation-tool.war
> > sakai-profile-tool.war
> > sakai-reports-tool.war
> > sakai-reset-pass.war
> > sakai-rights-tool.war
> > sakai-roster-tool.war
> > sakai-rutgers-linktool.war
> > sakai-rwiki-tool.war
> > sakai-sample-tool-jsf.war
> > sakai-sample-tool-servlet.war
> > sakai-scheduler-tool.war
> > sakai-search-tool.war
> > sakai-sections-tool.war
> > sakai-site-manage-group-helper.war
> > sakai-site-manage-group-section-role-helper.war
> > sakai-site-manage-participant-helper.war
> > sakai-site-manage-tool.war
> > sakai-site-pageorder-helper.war
> > sakai-site-tool.war
> > sakai-syllabus-tool.war
> > sakai-tool-tool-su.war
> > sakai-user-tool-admin-prefs.war
> > sakai-user-tool-prefs.war
> > sakai-user-tool.war
> > sakai-usermembership-tool.war
> > sakai-web-tool.war
> > samigo.war
>

Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?

2010-01-09 Thread Leon Kolchinsky
Hello again,

Yes instructions for Sakai actually say expand it into CATALINA_HOME.
O.K I may be wrong but http://sakai26.dyndns.org/servlets-examples/ is working.

I'd like to fix my configuration and I'm opened for suggestions.

What should I change in my configs (I think that I gave a full configs
and changes I've made to defaults)?

I don't have an access to my linux server now but I've downloaded to
J: drive on my win. machine it and there is a structure of tar.gz:

J:\

common\
components\
licenses\
server\
shared\
webapps\

J:\common\

lib\

J:\common\lib\

commons-logging-1.0.4.jar
log4j-1.2.12.jar
sakai-dav-common-2.6.1.jar
sakai-kernel-common-1.0.12.jar

J:\components\

emailtemplateservice-pack\
entitybroker-pack\
localization-bundles-pack\
osp-common-component\
osp-glossary-component\
osp-integration-component\
osp-matrix-component\
osp-portal-component\
osp-presentation-component\
osp-warehouse-component\
osp-wizard-components\
sakai-announcement-pack\
sakai-archive-pack\
sakai-assignment-pack\
sakai-calendar-pack\
sakai-chat-pack\
sakai-citations-pack\
sakai-common-components\
sakai-comp-help\
sakai-comp-scheduler\
sakai-content-providers-pack\
sakai-courier-pack\
sakai-coursemanagement-hibernate-pack\
sakai-gradebook-service-pack\
sakai-gradebooksample-grade-converter\
sakai-import\
sakai-kernel-component\
sakai-mailarchive-pack\
sakai-messageforums-components\
sakai-metaobj-component\
sakai-news-pack\
sakai-podcasts-pack\
sakai-poll-pack\
sakai-portal-render-pack\
sakai-portal-service-pack\
sakai-postem-pack\
sakai-presence-pack\
sakai-presentation-pack\
sakai-privacy-pack\
sakai-profile-components\
sakai-provider-pack\
sakai-reports-components\
sakai-rights-pack\
sakai-roster-components\
sakai-rwiki-pack\
sakai-samigo-pack\
sakai-sample-impl-access-pack\
sakai-search-adapters-pack\
sakai-search-pack\
sakai-sections-pack\
sakai-site-manage-pack\
sakai-syllabus-pack\
sakai-taggable-pack\
sakai-usermembership-pack\
sakai-warehouse-component\
sakai-web-pack\

J:\components\emailtemplateservice-pack\

META-INF\
WEB-INF\

J:\components\emailtemplateservice-pack\META-INF\

maven\
MANIFEST.MF

J:\components\emailtemplateservice-pack\META-INF\maven\

org.sakaiproject.emailtemplateservice\

J:\components\emailtemplateservice-pack\META-INF\maven\org.sakaiproject.emailtemplateservice\

emailtemplateservice-pack\

J:\components\emailtemplateservice-pack\META-INF\maven\org.sakaiproject.emailtemplateservice\emailtemplateservice-pack\

pom.properties
pom.xml

J:\components\emailtemplateservice-pack\WEB-INF\

lib\
components.xml
hibernate-hbms.xml
spring-hibernate.xml
web.xml

J:\components\emailtemplateservice-pack\WEB-INF\lib\

commons-codec-1.3.jar
easymock-1.2_Java1.3.jar
emailtemplateservice-impl-0.3.1.jar
freemarker-2.3.11.jar
generic-dao-0.9.8.jar

J:\components\entitybroker-pack\

META-INF\
WEB-INF\

J:\components\entitybroker-pack\META-INF\

maven\
MANIFEST.MF

J:\components\entitybroker-pack\META-INF\maven\

org.sakaiproject.entitybroker\

J:\components\entitybroker-pack\META-INF\maven\org.sakaiproject.entitybroker\

entitybroker-pack\

J:\components\entitybroker-pack\META-INF\maven\org.sakaiproject.entitybroker\entitybroker-pack\

pom.properties
pom.xml

J:\components\entitybroker-pack\WEB-INF\

lib\
components.xml
spring-jdbc.xml
web.xml

J:\components\entitybroker-pack\WEB-INF\lib\

commons-codec-1.2.jar
commons-httpclient-3.1.jar
entitybroker-impl-1.3.6.1.jar
entitybroker-utils-1.3.6.1.jar
generic-dao-0.9.12.jar
reflectutils-0.9.11.jar
sakai-kernel-util-1.0.12.jar

J:\components\localization-bundles-pack\

META-INF\
WEB-INF\

J:\components\localization-bundles-pack\META-INF\

maven\
MANIFEST.MF

J:\components\localization-bundles-pack\META-INF\maven\

org.sakaiproject\

J:\components\localization-bundles-pack\META-INF\maven\org.sakaiproject\

localization-bundles-pack\

J:\components\localization-bundles-pack\META-INF\maven\org.sakaiproject\localization-bundles-pack\

pom.properties
pom.xml

J:\components\localization-bundles-pack\WEB-INF\

lib\
components.xml
web.xml

J:\components\localization-bundles-pack\WEB-INF\lib\

localization-bundles-2.6.1.jar

J:\components\osp-common-component\

META-INF\
WEB-INF\

J:\components\osp-common-component\META-INF\

maven\
MANIFEST.MF

J:\components\osp-common-component\META-INF\maven\

org.sakaiproject.osp\

J:\components\osp-common-component\META-INF\maven\org.sakaiproject.osp\

osp-common-component\

J:\components\osp-common-component\META-INF\maven\org.sakaiproject.osp\osp-common-component\

pom.properties
pom.xml

J:\components\osp-common-component\WEB-INF\

lib\
components.xml
web.xml

J:\components\osp-common-component\WEB-INF\lib\

commons-beanutils-1.7.0.jar
commons-codec-1.2.jar
commons-digester-1.6.jar
jsf-api-1.1.01.jar
jsf-impl-1.1.01.jar
osp-common-impl-2.6.1.jar
sakai-kernel-util-1.0.12.jar
sakai-metaobj-impl-2.6.1.jar
sakai-metaobj-tool-lib-2.6.1.jar
standard-1.1.2.jar
velocity-1.3.1.jar

J:\components\osp-glossary-component\

META-INF\
W

Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?

2010-01-09 Thread Leon Kolchinsky
Hello Mark,

Thanks for the link -
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
I don't think that you've read my configs well.

CATALINA_HOME != httpd document root
That's my case!

Where did you got the info that it isn't so?

appBase and docBase are also different!

And virt. hosts are actually working (please read what I've written).

It must be something with "Configuring my Contexts" as per manual.
My appBase is also not under CATALINA_HOME.

Sakai is similar to moodle in some way.

I'm sorry that it's 250M but I didn't write it.
I've been asked to install it on virt. domains

Any help please?

On Sat, Jan 9, 2010 at 10:46 PM, Mark Thomas  wrote:
> On 09/01/2010 06:25, Leon Kolchinsky wrote:
>> Hello All,
>>
>> I've installed "Apache httpd +mod_jk and tomcat with multiple virtual hosts"
>> Used primarily those 2 manuals
>> http://www.alwayssunny.com/blog/?p=174
> This one looks pretty good although I wouldn't use the ApacheConfig
> listener.
>
>> http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2
> I'd ignore this one.
>
>> Now I need to deply java application called Sakai
>> (http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz)
> That is a 280MB download so it would help if you told us what was in it.
>
>> They all talking about downloading the archive into $CATALINA_HOME and
>> then unpacking the archive. Then start up Tomcat
>> - 
>> http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6)
>>
>> When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual
>> domain's DocumentRoot) and restart tomcat and apache I'm getting -
>> "HTTP Status 404 - /
>
> CATALINA_HOME != httpd document root
> I'm not surprised it didn't work.
>
>> Here are some of my configs realted to apache httpd+tomcat+virt
>> domains integration:
>
> You are using the same location for httpd document root and Host appBase
> and web application's docBase. That is never going to work.
>
> appBase must *never* be the same as docBase. I suggest you read this:
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
>
> I strongly recommend that http DocumentRoot is never the same as a web
> applications docBase. You have to be very carefully do to create a whole
> bunch of security issues. It is much easier just not to do this.
>
> I suggest you follow the Tomcat virtual hosting how-to and get that
> working with Sakai and then worry about adding httpd to the mix.
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?

2010-01-08 Thread Leon Kolchinsky
Hello All,

I've installed "Apache httpd +mod_jk and tomcat with multiple virtual hosts"
Used primarily those 2 manuals
http://www.alwayssunny.com/blog/?p=174
http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2

and a lot of reading through apache docs.

The virt. domains working and java requests processed by tomcat
through apache httpd.

Now I need to deply java application called Sakai
(http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz)
in
DocumentRoot of one of my virtual domains.

I can't find any documentation on deploying Sakai in similar environment :(
They all talking about downloading the archive into $CATALINA_HOME and
then unpacking the archive. Then start up Tomcat
- 
http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6)

When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual
domain's DocumentRoot) and restart tomcat and apache I'm getting -
"HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.
Apache Tomcat/5.5.26
"
Which probably means that the app. is not deployed.
Can someone tell me how to install and configure Sakai or any other
similar application in virt. domain ?
There must be some WEB_INF/web.xml config I should use?
May be some parameters in the main server.xml file?

Thanks.
Here are some of my configs realted to apache httpd+tomcat+virt
domains integration:

# cat /etc/httpd/conf/workers.properties:

#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# We define a workers named worker1 and worker2 for 2 different virt. domains
workers.tomcat_home=/opt/tomcat/
workers.java_home=/usr/java/jdk
ps=/
worker.list=worker1,worker2
worker.worker1.type=ajp13
worker.worker1.host=myserver029.somedomain.com
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker2.type=ajp13
worker.worker2.host=sakai26.dyndns.org
worker.worker2.port=8009
worker.worker2.lbfactor=1

# Load-balancing behaviour
worker.loadbalancer.type=lb

# Status worker for managing load balancer
worker.status.type=status

Snap from httpd.conf:

LoadModule jk_module modules/mod_jk.so
# mod_jk config
# Where to find workers.properties
# Update this path to match your conf directory location (put
workers.properties next to httpd.conf)
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/httpd/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put
mod_jk.log next to access_log)
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp 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"
# Globally deny access to the WEB-INF directory

AllowOverride None
deny from all


Virt. hosts configs:


ServerName myserver029.somedomain.com
ServerAdmin ad...@somedomain.com

DocumentRoot /srv/myserver029

# ServerAlias www.myserver029.somedomain.com
# if not specified, the global error log is used
ErrorLog /var/log/httpd/myserver029.somedomain.com-error_log
CustomLog /var/log/httpd/myserver029.somedomain.com-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off

# Add index.jsp to DirectoryIndex files
DirectoryIndex index.php index.html index.htm index.shtml index.php4
index.php3 index.phtml index.cgi index.jsp

JkMount /* worker1
JkMount /*.jsp worker1

# Im doing it globally in httpd.conf so no need to do this on domain
basis - deny access to the WEB-INF directory

# 
# AllowOverride None
# deny from all
# 



For my second virtual host, I created the following configuration file
under /etc/httpd/conf/vhosts.d/02sakai26.dyndns.org.conf


ServerName sakai26.dyndns.org
ServerAdmin ad...@somedomain.com

DocumentRoot /srv/sakai26

ServerAlias www.sakai26.dyndns.org
# if not specified, the global error log is used
ErrorLog /var/log/httpd/sakai26.dyndns.org-error_log
CustomLog /var/log/httpd/sakai26.dyndns.org-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off

# Add index.jsp to DirectoryIndex files
DirectoryIndex index.php index.html index.htm index.shtml index.php4
index.php3 index.phtml index.cgi index.jsp

JkMount /* worker2
JkMount /*.jsp worker2

# Im doing it globally in httpd.conf so no need to do this on domain
basis - deny access to the WEB-INF directory

# 
# AllowOverride None
# deny from all
# 




Configuration of mod_jk listener in tomcat

In order for tomcat to listen for the workers you defined you need to
add a line like this to the engine element on your tomcat server.xml
file.
# vi /opt/tomcat/conf/ser