Re: Is there a clean way to add Custom protocol endpoint to tomcat 5.5

2006-04-28 Thread Bill Barker

"David Gagnon" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Bill Barker wrote:
>
>>"David Gagnon" <[EMAIL PROTECTED]> wrote in message 
>>news:[EMAIL PROTECTED]
>>
>>>Hi all,
>>>
>>>I need to have my tomcat servers to broadcast their state (custom 
>>>information) in order for them to collaborate.
>>>
>>>I look into the cluster code, org.apache.catalina.cluster.mcast.* it a 
>>>good example of what I need : send a multicast message each X seconds and 
>>>keep a member list with their public info.
>>>
>>>My problem is to fin a way to starts MY protocol endpoint when Tomcat 
>>>boots.  I don't want to put the code in my webApp, since I can have 
>>>several webapps on the same server.
>>>
>>>I looked into server.xml to find a way to starts it... I tought Connector 
>>>would be suitable for my needs but it seems strictly related to HTTP 
>>>request handling.
>>>
>>>
>>
>>In theory, you can write a ProtocolHandler for any protocol you like and 
>>plug it into the Connector.  However, you are right that this is for 
>>Request processing.
>>
> Is server.xml supports a custom protocol Handler? For what I looked it 
> seem to be predefined connector one for HTTP, HTTPS and AJP/1.3.
> If it possible in some way to hook by there I can live whith the fact that 
> is not the way that supposed to be used :-)
>
>
>maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>   enableLookups="false" redirectPort="8443" acceptCount="100"
>   connectionTimeout="2" disableUploadTimeout="true" />
>enableLookups="false" redirectPort="8443" protocol="AJP/1.3" 
> />
>
>



The values AJP/1.3 and HTTP/1.1 are just shortcuts for the respective 
default ProtocolHandlers.

>
>
>>You could take a look at Tribes (container/modules/groupcom in the 5.5.17+ 
>>source distro/SVN co).  It's still a work-in-progress, but it may let you 
>>do what you want.
>>
> Thanks for the info I'll look into it!
>
> Best Regards
> /David
>
>>
>>>I hope to find a way without changing the tomcat code base.
>>>
>>>Thanks for your help.
>>>Best Regards
>>>/David
>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>> 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing tomcat's group

2006-04-28 Thread Bob Hall


--- Aria Bamdad <[EMAIL PROTECTED]> wrote:

> 
> Solved!!!
> 
> The solution is to use the linux group sticky bit to
> force any files
> created in a directory (and subdirectories) to have
> the same group
> as the parent.  For example let's say there are two
> applications,
> one for accounting and one for payroll.  If you
> create a directory
> for accounting and one for payroll, each belonging
> to their own
> group and tomcat belonging to both groups, then
> tomcat can read the
> files in both directories but when it creates a
> file, it ends up
> being tomcat user and tomcat group.  If you change
> the settings on the
> two directories as follows:
> 
> chmod g+ws /accounting
> chmod g+ws /payroll
> 

Aria, good to know the problem is solved.
Wish I had seen your latest post before replying
a few minutes ago.

To set the group sticky bit on dirs from 'app' down:

$ find ./app -type d | xargs chmod g+s

-Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing tomcat's group [OT]

2006-04-28 Thread Bob Hall
--- Aria Bamdad <[EMAIL PROTECTED]> wrote:

> On Thu, 27 Apr 2006 20:09:44 -0700 (PDT) Bob Hall
> said:
> >
> >How about making each application owner a member
> >of the 'tomcat' group.
> 
> Bob, making each app owner a member of the tomcat
> group will allow different
> app owners to look at each other's files.  For
> security, I need to keep each
> applications files secure from the other.  So, I
> can't add each owner to the
> tomcat group.  Even so, the application owner needs
> to have read/write access
> to the files created which makes matters more
> complicated.
> 
> What I need is to either have tomcat create the
> files using the appropriate
> group by maybe having tomcat do a 'newgrp' before
> executing an application
> request.  Is this possible?  Is there a way to do a
> post- or pre- script
> before running a request in tomcat?
> 
> Thanks.
> Aria.
> 
>

The 'newgrp' command starts another shell within
the current one, whcich won't work AFAIK.

However, you should still be able to accomplish what
you want.

- For each app-dir -

# 1. Ensure all files/dirs  have correct owner &
group:

$ chown -R  
$ chgrp -R  

# 2. Ensure all file/dirs are group writeable:

$ chmod -R g+w 

# 3. Set group "sticky-bit" for app's dirs:

$ find . -type d | xargs chmod -R g+s 

Step 3 should force all files/dirs created in
an  to have the specified .
This will allow an app-owner full access to files
created by the tomcat user.

You'll also need to require that all app owner
accounts have their umask set to 002.  Otherwise
an app-owner account could create a file that would
be read-only for the tomcat user which might produce
problems when running Tomcat.  ($ umask 002)

-Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can't access database after timcat idle for several hours

2006-04-28 Thread ALEX HYDE
'If' your web srver is firewalled off from your
database server and 'if' it turns out that the
firewall is timing out your connections at a TCP/IP
level, then the Proxool pool could be useful. 

Gluck

--- james edwards <[EMAIL PROTECTED]>
wrote:

> Opps, sorry I forgot to mention that I am running
> continuous pings between
> the tomcat and database server  and not seeing any
> drops.
> 
> james
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Class loading from within a servlet: interface definition not found

2006-04-28 Thread Christopher Piggott
I have something happening with class loading from within a server, and I don't 
understand it.

My servlet defines some classes called:
org.something.server  -- the class that extends HttpServlet
org.something.DatabaseRequestHandler -- an interface

When you make a request to the server, it figures out what handler class to 
load.  Then it attempts to load it:

Class handlerClass = Class.forName(handlerClassNameString);


QUESTION: looking at the little diagram in the Tomcat 5.5 Class Loader HOW-TO, 
when I do the above (Class.forName) I am using the Webapp class loader, correct?


The handler classes are all in handlers.jar which is in 
$CATALINA_BASE/shared/lib.  The actual exception that I get is:

2006-04-28 17:05:55 StandardWrapperValve[xdb]: Servlet.service() for 
servlet xdb threw exception
java.lang.NoClassDefFoundError: org/something/DatabaseRequestHandler

It took me a few minutes to realize that this was not a ClassNotFound 
exception, but something else.  Reading docs I figured out that the most 
probably cause is that the servlet's classloader was able to find the handler 
class, but then it failed to load one of the things it depended on, 
specifically it was able to find handlerClass but not the interface class that 
it depends on.

Trouble is: the interface .class file is right there in 
WEB-INF/classes/com/something/DatabaseRequestHandler.class just like it should 
be.  So, I am stumped why the class loader would be able to find the handler 
class in $CATALINA_BASE/shared/lib but NOT the interface that it implements 
which is in WEB-INF/classes.


At the suggestion of a nice gentleman on freenode, I tried turning on the 
-verbose:class option in the jvm, and watched it log some interesting stuff to 
catalina.out.  Unfortunately it doesn't shed any light on what is happening, 
beyond the exception and stack trace in the error log.  I don't want to post 
the whole stack trace (unless someone thinks it would help to see it) but I 
will say that it includes catalina.loader.WebappClassLoader as well as 
catalina.loader.StandardClassLoader

--Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: can't access database after timcat idle for several hours

2006-04-28 Thread Tim Lucia
Are you using pooling?  If so, be sure to have a validation query, in which
case timed-out connections will be recycled before handed to your program.


i.e.:

   




Tim
 

-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 4:19 PM
To: Tomcat Users List
Subject: Re: can't access database after timcat idle for several hours

Sounds to me like your database is timing out the connection.  See if you
can extend the timeout so it won't drop it during an overnight lull.


james edwards wrote:

> No, different machines. But, it works all day and works right after a
> restart of tomcat.
>
> j
>
> On 4/28/06, ALEX HYDE <[EMAIL PROTECTED]> wrote:
>
>>
>> Are they on the same machine? If not it could be a
>> firewall issue? It could be alot of things but that's
>> a start.
>>
>> --- james edwards <[EMAIL PROTECTED]>
>> wrote:
>>
>> > I am running 3 servers; Apache, Tomcat (5.5.16, java
>> > version "1.5.0_06",
>> > Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
>> > After the app has been idle for several hours tomcat
>> > cannot access the
>> > database. Netstat shows not connections to the
>> > database
>> > and tcpdump shows no traffic at all going the
>> > database when queries are made
>> > to the app (which would cause the database to be
>> > consulted)
>> > At first it seemed that the overnight backup of the
>> > database was causing
>> > this problem but restarting tomcat after the backup
>> > only fixes this problem
>> > for a few more hours.
>> > I wrote a loop to wget url's that cause the database
>> > to be consulted every
>> > 60 sec but after several hours this problem happens
>> > again. Tomcat seems to
>> > be fine, I can load the
>> > management page and restart the app. Only restarting
>> > tomcat fixes this
>> > problem, reloading the app does not fix the
>> > problem.. Nothing is being
>> > logged during and right before this problem.
>> >
>> > Does anyone have suggestions to further debug this
>> > problem ?
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can't access database after timcat idle for several hours

2006-04-28 Thread Gustavo Noronha

2006/4/28, David Kerber <[EMAIL PROTECTED]>:


Sounds to me like your database is timing out the connection.  See if
you can extend the timeout so it won't drop it during an overnight lull.



This seems probable, indeed. I would recommend setting up some kind of
connection checking, that would make some traffic round-trip between the
servers.

We had problems with a stateful firewall droping ESTABILISHED (!)
connections after some time of idleness.

See you,

--
Gustavo Noronha Silva
Coordenação de Segurança e Sustentação
Ministério do Desenvolvimento Social - Brasil


Re: can't access database after timcat idle for several hours

2006-04-28 Thread David Kerber
Sounds to me like your database is timing out the connection.  See if 
you can extend the timeout so it won't drop it during an overnight lull.



james edwards wrote:


No, different machines. But, it works all day and works right after a
restart of tomcat.

j

On 4/28/06, ALEX HYDE <[EMAIL PROTECTED]> wrote:



Are they on the same machine? If not it could be a
firewall issue? It could be alot of things but that's
a start.

--- james edwards <[EMAIL PROTECTED]>
wrote:

> I am running 3 servers; Apache, Tomcat (5.5.16, java
> version "1.5.0_06",
> Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
> After the app has been idle for several hours tomcat
> cannot access the
> database. Netstat shows not connections to the
> database
> and tcpdump shows no traffic at all going the
> database when queries are made
> to the app (which would cause the database to be
> consulted)
> At first it seemed that the overnight backup of the
> database was causing
> this problem but restarting tomcat after the backup
> only fixes this problem
> for a few more hours.
> I wrote a loop to wget url's that cause the database
> to be consulted every
> 60 sec but after several hours this problem happens
> again. Tomcat seems to
> be fine, I can load the
> management page and restart the app. Only restarting
> tomcat fixes this
> problem, reloading the app does not fix the
> problem.. Nothing is being
> logged during and right before this problem.
>
> Does anyone have suggestions to further debug this
> problem ?






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can't access database after timcat idle for several hours

2006-04-28 Thread james edwards

Opps, sorry I forgot to mention that I am running continuous pings between
the tomcat and database server  and not seeing any drops.

james


Re: can't access database after timcat idle for several hours

2006-04-28 Thread james edwards

No, different machines. But, it works all day and works right after a
restart of tomcat.

j

On 4/28/06, ALEX HYDE <[EMAIL PROTECTED]> wrote:


Are they on the same machine? If not it could be a
firewall issue? It could be alot of things but that's
a start.

--- james edwards <[EMAIL PROTECTED]>
wrote:

> I am running 3 servers; Apache, Tomcat (5.5.16, java
> version "1.5.0_06",
> Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
> After the app has been idle for several hours tomcat
> cannot access the
> database. Netstat shows not connections to the
> database
> and tcpdump shows no traffic at all going the
> database when queries are made
> to the app (which would cause the database to be
> consulted)
> At first it seemed that the overnight backup of the
> database was causing
> this problem but restarting tomcat after the backup
> only fixes this problem
> for a few more hours.
> I wrote a loop to wget url's that cause the database
> to be consulted every
> 60 sec but after several hours this problem happens
> again. Tomcat seems to
> be fine, I can load the
> management page and restart the app. Only restarting
> tomcat fixes this
> problem, reloading the app does not fix the
> problem.. Nothing is being
> logged during and right before this problem.
>
> Does anyone have suggestions to further debug this
> problem ?
>
> --
> James H. Edwards
> Network Systems Administrator
> Judicial Information Division
> [EMAIL PROTECTED]
>




___
Switch an email account to Yahoo! Mail, you could win FIFA World Cup
tickets. http://uk.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
James H. Edwards
Network Systems Administrator
Judicial Information Division
[EMAIL PROTECTED]


Re: can't access database after timcat idle for several hours

2006-04-28 Thread ALEX HYDE
Are they on the same machine? If not it could be a
firewall issue? It could be alot of things but that's
a start.

--- james edwards <[EMAIL PROTECTED]>
wrote:

> I am running 3 servers; Apache, Tomcat (5.5.16, java
> version "1.5.0_06",
> Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
> After the app has been idle for several hours tomcat
> cannot access the
> database. Netstat shows not connections to the
> database
> and tcpdump shows no traffic at all going the
> database when queries are made
> to the app (which would cause the database to be
> consulted)
> At first it seemed that the overnight backup of the
> database was causing
> this problem but restarting tomcat after the backup
> only fixes this problem
> for a few more hours.
> I wrote a loop to wget url's that cause the database
> to be consulted every
> 60 sec but after several hours this problem happens
> again. Tomcat seems to
> be fine, I can load the
> management page and restart the app. Only restarting
> tomcat fixes this
> problem, reloading the app does not fix the
> problem.. Nothing is being
> logged during and right before this problem.
> 
> Does anyone have suggestions to further debug this
> problem ?
> 
> --
> James H. Edwards
> Network Systems Administrator
> Judicial Information Division
> [EMAIL PROTECTED]
> 




___ 
Switch an email account to Yahoo! Mail, you could win FIFA World Cup tickets. 
http://uk.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet and Tomcat question:

2006-04-28 Thread Adam Lindsey

Hello,
Sorry to waste everyone's time with that previous question.
I left a print statement in my program for a boolean variable to check 
its status

while troubleshooting.  I removed it and the DOS server screen no longer
displays 'false' across the screen.  Duh.
Carry on..


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



can't access database after timcat idle for several hours

2006-04-28 Thread james edwards

I am running 3 servers; Apache, Tomcat (5.5.16, java version "1.5.0_06",
Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
After the app has been idle for several hours tomcat cannot access the
database. Netstat shows not connections to the database
and tcpdump shows no traffic at all going the database when queries are made
to the app (which would cause the database to be consulted)
At first it seemed that the overnight backup of the database was causing
this problem but restarting tomcat after the backup only fixes this problem
for a few more hours.
I wrote a loop to wget url's that cause the database to be consulted every
60 sec but after several hours this problem happens again. Tomcat seems to
be fine, I can load the
management page and restart the app. Only restarting tomcat fixes this
problem, reloading the app does not fix the problem.. Nothing is being
logged during and right before this problem.

Does anyone have suggestions to further debug this problem ?

--
James H. Edwards
Network Systems Administrator
Judicial Information Division
[EMAIL PROTECTED]


Re: Changing tomcat's group

2006-04-28 Thread Aria Bamdad

Solved!!!

The solution is to use the linux group sticky bit to force any files
created in a directory (and subdirectories) to have the same group
as the parent.  For example let's say there are two applications,
one for accounting and one for payroll.  If you create a directory
for accounting and one for payroll, each belonging to their own
group and tomcat belonging to both groups, then tomcat can read the
files in both directories but when it creates a file, it ends up
being tomcat user and tomcat group.  If you change the settings on the
two directories as follows:

chmod g+ws /accounting
chmod g+ws /payroll

then when files are created in either directory, they will have the same
group ownership as the directory.  Problem solved.

Thanks for those who commented.

Aria.
On Thu, 27 Apr 06 16:55:40 -0400 Aria Bamdad said:
>Hi,
>
>I have several applications running in different directories.  Each
>application is owned by a different linux owner/group.  In order for
>Tomcat to be able to read these files to serve them, the Tomcat has
>as it's secondary groups, the group names of each application.
>
>The problem I am having is that when any of the applications create
>a file, the file created has the owner/group tomcat:tomcat which
>prevents the application owner from accessing the file directly
>(as a logged in linux user).
>
>How do others address this problem? Is there a way to have Tomcat
>dynamically switch 'group' before serving somthing from each application?
>
>Thanks in advance.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE:Blank Page after tomcat install

2006-04-28 Thread Steven Peacock
Daren, Steve, and David,


Thanks for the response. 
1) I am just doing a straight tomcat, no web server. 
2) The logs seem to be useless in this case. However I will post them at
the end of my message.
3) I've messed around a little more and become more confused. 

First I was trying to get 5.5.17 to work, but realizing that the Tomcat
I set up a couple of weeks ago was 5.5.16, I decided that I would use
that tar and try and duplicate my earlier success. I unpacked the 5.5.16
and tried the following in the browser:
localhost:8080 --- blank page
localhost:8080/jsp-examples -- got the examples page, able to run the
examples
localhost:8080/servlets-examples - got the servlets example page
localhost:8080/webdav -- get the index list

So I stopped the 5.5.16 and restarted the 5.5.17 and tried the same
thing with the following results:
localhost:8080 --- blank page
localhost:8080/jsp-examples -- got the examples page, only can run some
examples, other give blank page
localhost:8080/servlets-examples - blank page
localhost:8080/webdav -- blank page

So I decided that I would try what I was really after, and work on the
JSF tutorial that I found via the my-faces page using 5.5.16 since it
seemed to work better than ...17. I installed the my-faces examples and
they worked, and I did part of the tutorial and it works. So I can
server up jsp's with no problem apparently, just not the first one 

To get the logs below I emptied the log directory. Started the 5.5.16
instance of Tomcat, opened a browser and typed in the 4 urls above. 

Thanks, 

Steven Peacock

catalina.date.log (same as catalina.out)
Apr 28, 2006 8:50:14 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the
java.library.path: 
/usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386
Apr 28, 2006 8:50:14 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 28, 2006 8:50:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1972 ms
Apr 28, 2006 8:50:14 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 28, 2006 8:50:14 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.16
Apr 28, 2006 8:50:15 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 28, 2006 8:50:15 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive simple.war
Apr 28, 2006 8:50:16 AM org.apache.myfaces.config.FacesConfigurator
feedStandardConfig
INFO: Reading standard config
org/apache/myfaces/resource/standard-faces-config.xml
Apr 28, 2006 8:50:16 AM org.apache.myfaces.config.FacesConfigurator
feedClassloaderConfigurations
INFO: Reading config
jar:file:/sharetwo/java_apps/apache-tomcat-5.5.16/webapps/simple/WEB-INF/lib/sandbox.jar!/META-INF/faces-config.xml
Apr 28, 2006 8:50:16 AM org.apache.myfaces.config.FacesConfigurator
feedClassloaderConfigurations
INFO: Reading config
jar:file:/sharetwo/java_apps/apache-tomcat-5.5.16/webapps/simple/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml
Apr 28, 2006 8:50:16 AM org.apache.myfaces.config.FacesConfigurator
feedContextSpecifiedConfig
INFO: Reading config /WEB-INF/examples-config.xml
Apr 28, 2006 8:50:16 AM org.apache.myfaces.util.LocaleUtils toLocale
SEVERE: Locale name null or empty, ignoring
Apr 28, 2006 8:50:17 AM
org.apache.myfaces.webapp.StartupServletContextListener initFaces
INFO: ServletContext
'/sharetwo/java_apps/apache-tomcat-5.5.16/webapps/simple/' initialized.
Apr 28, 2006 8:50:18 AM org.apache.myfaces.config.FacesConfigurator
feedStandardConfig
INFO: Reading standard config
org/apache/myfaces/resource/standard-faces-config.xml
Apr 28, 2006 8:50:18 AM org.apache.myfaces.config.FacesConfigurator
feedClassloaderConfigurations
INFO: Reading config
jar:file:/sharetwo/java_apps/apache-tomcat-5.5.16/webapps/trymyface/WEB-INF/lib/myfaces-all.jar!/META-INF/faces-config.xml
Apr 28, 2006 8:50:18 AM org.apache.myfaces.config.FacesConfigurator
feedContextSpecifiedConfig
INFO: Reading config /WEB-INF/faces-config.xml
Apr 28, 2006 8:50:18 AM org.apache.myfaces.config.FacesConfigurator
feedWebAppConfig
INFO: Reading config /WEB-INF/faces-config.xml
Apr 28, 2006 8:50:18 AM org.apache.myfaces.util.LocaleUtils toLocale
SEVERE: Locale name null or empty, ignoring
Apr 28, 2006 8:50:19 AM
org.apache.myfaces.webapp.StartupServletContextListener initFaces
INFO: ServletContext
'/sharetwo/java_apps/apache-tomcat-5.5.16/webapps/trymyface/'
initialized.
Apr 28, 2006 8:50:19 AM org.apache.coyote.http11.Http11BaseProtocol
start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 28, 2006 8:50:19 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 28, 2006 8:50:19 AM org.apache.jk.server.JkMain start
INFO: Jk runnin

Re: Changing tomcat's group [OT]

2006-04-28 Thread Aria Bamdad
On Thu, 27 Apr 2006 20:09:44 -0700 (PDT) Bob Hall said:
>
>How about making each application owner a member
>of the 'tomcat' group.

Bob, making each app owner a member of the tomcat group will allow different
app owners to look at each other's files.  For security, I need to keep each
applications files secure from the other.  So, I can't add each owner to the
tomcat group.  Even so, the application owner needs to have read/write access
to the files created which makes matters more complicated.

What I need is to either have tomcat create the files using the appropriate
group by maybe having tomcat do a 'newgrp' before executing an application
request.  Is this possible?  Is there a way to do a post- or pre- script
before running a request in tomcat?

Thanks.
Aria.

>
>Then set the group permissions as read-only on
>the dirs/files:
>
>$ chmod -R g-w 
>
>If you want to share the ability to write to
>a given app's dirs/files then you need to do more:
>
># allow members of tomcat group to write
>$ chmod -R g+w 
>
># set group "sticky-bit"
>$ find . -type d | xargs chmod -R g+s 
>
>You'll also need to somehow require that all
>app owners set their umask to 002 so that files
>and dirs created by them in the tomcat group app
>dirs are writeable by other tomcat group members.
>
>$ umask 002
>
>Overall, it's much simpler if the app owners
>only have read rights.
>
>-Bob
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing tomcat's group

2006-04-28 Thread Aria Bamdad
On Thu, 27 Apr 2006 19:08:27 -0500 you said:
>On Thu, Apr 27, 2006 at 04:55:40PM -0400, Aria Bamdad wrote:
>> I have several applications running in different directories.  Each
>> application is owned by a different linux owner/group.  In order for
>> Tomcat to be able to read these files to serve them, the Tomcat has
>> as it's secondary groups, the group names of each application.
>>
>> The problem I am having is that when any of the applications create
>> a file, the file created has the owner/group tomcat:tomcat which
>> prevents the application owner from accessing the file directly
>> (as a logged in linux user).
>>
>> How do others address this problem? Is there a way to have Tomcat
>> dynamically switch 'group' before serving somthing from each application?
>
>   If the files are in separate directories, it might work to just
>make sure the directory is owned by the appropriate group.  Under NetBSD
>that seems to ensure that any files created are owned appropriately,
>but I'm not sure how it works under linux.  You might need to do a
>"chmod g+s" on the directory.
>
>eric


Eric,

Thanks for your note.  The files are in separate directories and each apps
root directory is owned by the group that owns the app, however, when the
application creates a file (using tomcat) the files newly created have
tomcat-tomcat owner/group.  Tomcat belongs to the groups for all the
different applications but the application owners do not belong to the
tomcat group.  Setting the directory group ownership on Linux does not seem
to force the files within it to have the same ownership.

Aria.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Restricting access to Tomcat

2006-04-28 Thread Tim Lucia
This is a networking exercise. 

-Original Message-
From: Chris Lear [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 8:20 AM
To: Tomcat Users List
Subject: Re: Restricting access to Tomcat

* Edward Quick wrote (28/04/06 13:07):
>>* Edward Quick wrote (28/04/06 10:53):
>> >
>> >> >
>> >> > I have an Apache mod_jk Tomcat server set up on the same host, 
>> >> > and
[...]
> 
> Thanks, I know what you mean but my problem is the Apache is not on 
> the same box as the Tomcat.

Sorry. I misunderstood your original post. I thought you meant they were on
the same machine.

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restricting access to Tomcat

2006-04-28 Thread Chris Lear
* Edward Quick wrote (28/04/06 13:07):
>>* Edward Quick wrote (28/04/06 10:53):
>> >
>> >> >
>> >> > I have an Apache mod_jk Tomcat server set up on the same host, and 
[...]
> 
> Thanks, I know what you mean but my problem is the Apache is not on the same 
> box as the Tomcat.

Sorry. I misunderstood your original post. I thought you meant they were
on the same machine.

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restricting access to Tomcat

2006-04-28 Thread Edward Quick



* Edward Quick wrote (28/04/06 10:53):
>
>> > Hi,
>> >
>> > I have an Apache mod_jk Tomcat server set up on the same host, and 
want

>>to
>> > restrict access to the Tomcat so that only the Apache on the 
localhost

>>can
>> > connect to port 8009.
>> >
>> > I tried using org.apache.catalina.valves.RemoteAddrValve, with
>> > allow="127.0.0.1", but the issue is that Tomcat picks up the IP 
address

>>of
>> > the client, and not the Apache which is passing traffic onto it.
>> >
>> > Is there a way round this?
>>
>>
>>>address="127.0.0.1">
>>
>>Won't that do it?
>>
>>Chris
>>
>
> I don't think so because that's saying, bind the ajp listener to the
> localhost. It's not saying restrict access to the ajp listener to 
localhost.


If it's bound to the loopback interface only, then only local
applications will be able to connect to it. Nothing else can access
127.0.0.1.
Try it, and then try using
telnet i.p.add.ress 8009 from a different machine
You should get connection refused. I'm fairly confident that this solves
your problem.

Chris



Thanks, I know what you mean but my problem is the Apache is not on the same 
box as the Tomcat.


Ed.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Servlet and Tomcat question

2006-04-28 Thread Franck Borel

Hi Adam,



Hello,
I noticed something with Tomcat that is probably obvious to everyone 
but me, but I gotta ask about it.

Im a total novice at programming so please be patient.
After starting up Tomcat today I began writing a script to use on 
Tomcat without being connected to the
web.  The dos window was sitting in on my toolbar for a while until I 
finished the program.  I ran the servlet
via Tomcat and it appeared to work as expected.  I maximized the dos 
window for my instance of Tomcat
and noticed the screen was filled with 'false' statements.  It looks 
like a bunch of print statements of a boolean
variable that I do not think I coded in my program.  Was I just 
programming for a while, and Tomcat is just
pinging itself in a way.. or did I do something wrong?  Any help would 
be much appreciated.

Thanks!


Can you please send this error statements?

-- Franck

--

Dipl.-Hyd. Franck Borel   Universitaetsbibliothek Freiburg
EMail: [EMAIL PROTECTED]   EDV-Dezernat
Tel. : +49-761 / 203-3908 Werthmannplatz 2 | Postfach 1629
Fax  : +49-761 / 203-3987 79098 Freiburg   | 79016 Freiburg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is there a clean way to add Custom protocol endpoint to tomcat 5.5

2006-04-28 Thread David Gagnon

Bill Barker wrote:

"David Gagnon" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
 


Hi all,

I need to have my tomcat servers to broadcast their state (custom 
information) in order for them to collaborate.


I look into the cluster code, org.apache.catalina.cluster.mcast.* it a 
good example of what I need : send a multicast message each X seconds and 
keep a member list with their public info.


My problem is to fin a way to starts MY protocol endpoint when Tomcat 
boots.  I don't want to put the code in my webApp, since I can have 
several webapps on the same server.


I looked into server.xml to find a way to starts it... I tought Connector 
would be suitable for my needs but it seems strictly related to HTTP 
request handling.


   



In theory, you can write a ProtocolHandler for any protocol you like and 
plug it into the Connector.  However, you are right that this is for Request 
processing.
 

Is server.xml supports a custom protocol Handler? For what I looked it 
seem to be predefined connector one for HTTP, HTTPS and AJP/1.3.
If it possible in some way to hook by there I can live whith the fact 
that is not the way that supposed to be used :-)




  enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />





You could take a look at Tribes (container/modules/groupcom in the 5.5.17+ 
source distro/SVN co).  It's still a work-in-progress, but it may let you do 
what you want.
 


Thanks for the info I'll look into it!

Best Regards
/David

 


I hope to find a way without changing the tomcat code base.

Thanks for your help.
Best Regards
/David 
   






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: i want to know load on Tomcat

2006-04-28 Thread David Smith

As I remember, the same is true of of Tomcat 4.1

-- David

tang jie wrote:

On 4/27/06, Tim Lucia <[EMAIL PROTECTED]> wrote:
  


Rajeev i need some more Help, I searched in my Tomcat manager but did not
find any link of 'server status'. Can u tell where it resides!, i am
  

using


Tomcat 4.1 ver.
  



In  Tomcat5,I  use  www.xxx.com/manager/html, the username and pwd are
stored in tomcat-users.xml.I don't know Tomcat4.1.Maybe they are the same?

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restricting access to Tomcat

2006-04-28 Thread Chris Lear
* Edward Quick wrote (28/04/06 10:53):
> 
>> > Hi,
>> >
>> > I have an Apache mod_jk Tomcat server set up on the same host, and want 
>>to
>> > restrict access to the Tomcat so that only the Apache on the localhost 
>>can
>> > connect to port 8009.
>> >
>> > I tried using org.apache.catalina.valves.RemoteAddrValve, with
>> > allow="127.0.0.1", but the issue is that Tomcat picks up the IP address 
>>of
>> > the client, and not the Apache which is passing traffic onto it.
>> >
>> > Is there a way round this?
>>
>>
>>>address="127.0.0.1">
>>
>>Won't that do it?
>>
>>Chris
>>
> 
> I don't think so because that's saying, bind the ajp listener to the 
> localhost. It's not saying restrict access to the ajp listener to localhost.

If it's bound to the loopback interface only, then only local
applications will be able to connect to it. Nothing else can access
127.0.0.1.
Try it, and then try using
telnet i.p.add.ress 8009 from a different machine
You should get connection refused. I'm fairly confident that this solves
your problem.

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restricting access to Tomcat

2006-04-28 Thread Edward Quick




> Hi,
>
> I have an Apache mod_jk Tomcat server set up on the same host, and want 
to
> restrict access to the Tomcat so that only the Apache on the localhost 
can

> connect to port 8009.
>
> I tried using org.apache.catalina.valves.RemoteAddrValve, with
> allow="127.0.0.1", but the issue is that Tomcat picks up the IP address 
of

> the client, and not the Apache which is passing traffic onto it.
>
> Is there a way round this?




Won't that do it?

Chris



I don't think so because that's saying, bind the ajp listener to the 
localhost. It's not saying restrict access to the ajp listener to localhost.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restricting access to Tomcat

2006-04-28 Thread Chris Lear
* Edward Quick wrote (28/04/06 09:09):
> Hi,
> 
> I have an Apache mod_jk Tomcat server set up on the same host, and want to 
> restrict access to the Tomcat so that only the Apache on the localhost can 
> connect to port 8009.
> 
> I tried using org.apache.catalina.valves.RemoteAddrValve, with 
> allow="127.0.0.1", but the issue is that Tomcat picks up the IP address of 
> the client, and not the Apache which is passing traffic onto it.
> 
> Is there a way round this?




Won't that do it?

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Restricting access to Tomcat

2006-04-28 Thread Edward Quick

Hi,

I have an Apache mod_jk Tomcat server set up on the same host, and want to 
restrict access to the Tomcat so that only the Apache on the localhost can 
connect to port 8009.


I tried using org.apache.catalina.valves.RemoteAddrValve, with 
allow="127.0.0.1", but the issue is that Tomcat picks up the IP address of 
the client, and not the Apache which is passing traffic onto it.


Is there a way round this?

Thanks,

Ed.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 4.1.30 - Languages of messages are mixed up

2006-04-28 Thread Fleissner Helmut
After starting Tomcat 4.1.30 the language of messages are mixed up
(between English/German) in the Web-Application (s).
This problem occurs not always, but sometimes!
The Web-Application uses struts. The standard-language is German
(msg.properties).

The Server is installed in English (Windows 2000 SP4). Tomcat is
installed as service.

Are there some ideas how to fix tis problem?

Helmut



--
Diese Nachricht wurde auf Computerviren überprüft.
Verwendete Anti-Virus Software: McAfee Groupshield 6.0