RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-08 Thread Kevin Williams


 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 07, 2005 10:04 PM
 To: Tomcat Users List
 Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
 [bcc][faked-from][bayes]
 Importance: Low
 
  From: Kevin Williams [mailto:[EMAIL PROTECTED]
  Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
 
  The two Xeon CPU's are hyperthreaded to represent 4 CPU's
  on the machine.  I'm not sure exactly how tomcat/java
  interact with this, but it was not favorable.
 
 Other than for determining the number of threads to use for parallel
GC,
 the JVM does not care how many CPUs there are.  I don't know what
Windows
 returns for the number of CPUs installed when hyperthreading is
enabled,
 but you can determine that with the Runtime.availableProcessors()
method.
 
 You really should be measuring performance by some measurement of
actual
 workload completed, not CPU utilization.  Turning off hyperthreading
may
 actually reduce your overall throughput.  (Then again, it might make
it
 better - very application dependent.)
 
 

You're right.  I was measuring average response time.  The CPU was just
the bottleneck.  My average response time under a specified user load
actually decreased with hyperthreading off.  My next step is to start
analyzing the code:)

Thanks for the pointer!

Kevin Williams

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



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-07 Thread Kevin Williams
Ok,

Thanks all for the help.  I further optimized the environment while
troubleshooting.  In case anyone else is in a similar issue, I'll list
the solution that worked for me--turn off hyperthreading.  The two Xeon
CPU's are hyperthreaded to represent 4 CPU's on the machine.  I'm not
sure exactly how tomcat/java interact with this, but it was not
favorable.  A coworker mentioned that the windows performance monitor
often records total CPU utilization incorrectly due to the logical split
of the CPU's acting as 4 instead of 2.  Disabling the hyperthreading in
the system bios shot the CPU utilization up to 70%-90% (I imagine the
other 10% of CPU is being reserved by other applications).

Thanks again for the help,

Kevin Williams


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic
Sent: Thursday, February 03, 2005 9:09 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

You could be DB bound or LAN bound.
What is the switch telling you LAN utilization is?
What is the DB stress test telling you?
.V

Kevin Williams wrote:

Hello,

 

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

 

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is
there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

 

Thanks in advance!

 

Kevin


  



-- 
Forums, Boards, Blogs and News in RiA http://www.boardVU.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: tomcat CPU utilization pegged...total CPU only 50%

2005-02-03 Thread Kevin Williams
Ok,

I've done some more digging and am still stumped.  I don't think it's a
garbage collector.  The machine runs on 2 Gigs of Ram.  I set the -Xmx
and -Xms value to 1024m and the younger generation values as
-XX:NewSize=386m -XX:MaxNewSize=386m -XX:SurvivorRatio=4.

Watching the system in task manager, the memory used doesn't exceed
300Mb.  Which leads me to believe that it's not gc.

The 2 cpu's are 2 Xeon 3.20 Processors (incorrectly stated 3.06 before I
believe).  Talking with the developer, he thinks that it's hovering
around 50% because of hyperthreading.  I've watched it go up to 80%
(during the first run it peaks there briefly before settling in to the
standard 45%-55% range, so I don't think that's the issue.

I was thinking maybe it's a database issue, but if that was the case,
wouldn't the tomcat processor percent drop off while waiting for the db
response?  Or could this be from using connections?

Also, I noticed that the thread count for the tomcat process is 44.  I
couldn't pass that no matter what I tried.  Does this mean anything?
How can I get more than 44 threads running?

Thanks in advance for any help on this frustrating problem!

Kevin Williams

-Original Message-
From: Kevin Williams [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:48 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

Charles,

My client has installed two instances of tomcat (each as a service).
I'm not really sure how they did it (they have the standard C:/Program
Files/Apache Group/Tomcat 4.1 folder, but the apps and conf files are in
D:/instances/instance1/conf, D:/instances/instance1/app,
D:/instances/instance1/work, D:/instances/instance1/log).  I'll talk to
the guy who configured this so I can emulate one of the instances in
batch mode.  I'll let you know how it goes after I make the changes!

Kevin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:00 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from]
Importance: Low

 From: Kevin Williams [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
 
 1.  Yes, tomcat is running as a service.

You might want to shutdown that service and run it from a command-line
window, at least for testing purposes.  Easier to fiddle with heap size
options and the like.

 2.  I am not aware of any CPU affinity settings.

They won't show up in Task Manager.  Not sure if the plain Windows
Server supports affinity; my experience with that capability was on a
32-CPU Advanced (Enterprise?) Server system which I no longer have
access to.  There's an mmc plug in Admin Tools that lets you play with
associating processes with CPUs, if it's available in your OS.

 3.  I'm not sure what options are set with the jvm (I didn't 
 install the service).

IIRC, the default heap size for the 1.4.1 JVM on Windows is only 64 MB,
and that's really not enough for any serious work.  I suspect that
you're spending much of your time in garbage collection.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
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]



tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Hello,

 

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

 

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

 

Thanks in advance!

 

Kevin



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Doug,

Here you go:

Tomcat Version: 4.1
JVM Version: 1.4.1_07
2 processors: P4 Xeon 3.06 Ghz

Thanks,

Kevin Williams

-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]

Sent: Tuesday, February 01, 2005 8:38 PM
To: Tomcat Users List
Subject: Re: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]

Is this on a dual processor machine?

What version of Tomcat and JVM?

Doug

- Original Message - 
From: Kevin Williams [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Tuesday, February 01, 2005 11:25 PM
Subject: tomcat CPU utilization pegged...total CPU only 50%


Hello,

 

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

 

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

 

Thanks in advance!

 

Kevin




-
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: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Charles,

Thanks for the help, here are your answers:

I am using perfmon to monitor the % CPU Utilization (total and for the
tomcat process).  I added the tomcat process % CPU Utilization by doing
the following:
a.  Within perfmon, Add an additional monitor.
b.  In the popup drop down list select process.
c.  Select % CPU Time
d.  Select the tomcat process.


1.  Yes, tomcat is running as a service.
2.  I am not aware of any CPU affinity settings.  I tried to check these
in Task Manager (never heard of them before you mentioned it--I'm new to
this), but didn't have access.  Looking into that, I found an article
that stated you could only set this if the process is NOT running as a
service.  If this isn't the case, please let me know how to set/check
it!
3.  I'm not sure what options are set with the jvm (I didn't install the
service).  I can check with the individual who created the service
tomorrow, and reset it to include the verbose:gc option though.

Thanks!

Kevin Williams

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 8:56 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

 From: Kevin Williams [mailto:[EMAIL PROTECTED]
 Subject: tomcat CPU utilization pegged...total CPU only 50%

 Using performance monitor, the Tomcat % Processor Time pegs out
 at 100% for the duration that total CPU utilization is at 50%.

I'm confused.  What tool or monitoring mechanism is telling you that
total CPU utilization is 50% at the same time that PerfMon says it's
100%?

Additional questions:
1) Are you running Tomcat as a service?
2) Are you using CPU affinity settings that would restrict Tomcat to one
CPU?
3) Are you going into garbage collection frequently enough to prevent
use of both CPUs? (Turn on -verbose:gc to check.)

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Charles,

My client has installed two instances of tomcat (each as a service).
I'm not really sure how they did it (they have the standard C:/Program
Files/Apache Group/Tomcat 4.1 folder, but the apps and conf files are in
D:/instances/instance1/conf, D:/instances/instance1/app,
D:/instances/instance1/work, D:/instances/instance1/log).  I'll talk to
the guy who configured this so I can emulate one of the instances in
batch mode.  I'll let you know how it goes after I make the changes!

Kevin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:00 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from]
Importance: Low

 From: Kevin Williams [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
 
 1.  Yes, tomcat is running as a service.

You might want to shutdown that service and run it from a command-line
window, at least for testing purposes.  Easier to fiddle with heap size
options and the like.

 2.  I am not aware of any CPU affinity settings.

They won't show up in Task Manager.  Not sure if the plain Windows
Server supports affinity; my experience with that capability was on a
32-CPU Advanced (Enterprise?) Server system which I no longer have
access to.  There's an mmc plug in Admin Tools that lets you play with
associating processes with CPUs, if it's available in your OS.

 3.  I'm not sure what options are set with the jvm (I didn't 
 install the service).

IIRC, the default heap size for the 1.4.1 JVM on Windows is only 64 MB,
and that's really not enough for any serious work.  I suspect that
you're spending much of your time in garbage collection.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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



mod jk2 default app only set

2004-01-21 Thread Kevin Williams
Hi,

I have Apache and Tomcat 4 (I can upgrade if necessary) running on a
server where I want everything from 1 application going to tomcat.  I
configured the mod_jk2 so this can happen for an application in the
following manner (workers2.properties file):

[uri:/support/*]
info=Map the support webapp
worker=ajp13:localhost:8009

The problem I have is that I want my DEFAULT application to forward to
tomcat and every other application to stay in Apache.  So, when I type: 
www.mycompany.com  it forwards to Tomcat, and when I type
www.mycompany.com/upload it goes to the upload application in Apache.

If I do my mapping in the workers2.properties file like above, I'd use
uri: /*  The problem is that this statement forwards everything
including the upload application (which I don't want forwarded).  Does
anyone know of an aliasing trick, or something else that allows me to
set an application as my default app, and have it ONLY forward to
Tomcat?

Thanks in advance,

Kevin Williams


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



Re: https -- http session problem

2003-11-17 Thread Kevin Williams
I read this post and have a question...and maybe I'm not understanding
https correctly, but why is your login PAGE secure?  I wouldn't care if
someone sees an empty page with a prompt for the username and password. 
The post should be secure though...  In other words... can't you have a
page http://www.example.com/login.jsp post to something like
https://www.example.com/login.do (this would be the url in the form tag)
with the actual login action being secure?  My understanding is that on
the post, a secure session will be established and THEN the username and
password will be posted.  Then users would bookmark the log-in page as a
non-secure page, and still be able to login without any funky
work-around.  

If this understanding is correct, then if someone bookmars a secure
page, they should get redirected to the login page anyway since they
need to login first.

Thanks,

Kevin Williams  


On Mon, 2003-11-17 at 08:15, Andrew Mottaz wrote:
  On 11/17/2003 06:32 AM Andrew Mottaz wrote:
  http://nagoya.apache.org/bugzilla.  However, there aren't very many
  developers who like the idea of allowing you to hang yourself :).
  
  Thanks much for the tip -- I have to disagree about this not being a
  necessary change.  There are plenty of apps where people browse without
   a secure connection, but have to log in to perform some functions.
  Users like to bookmark pages -- why should I force them to bookmark only
  non-secure pages? Giving a developer control over how session cookies
  function is better than forcing a hack where you have to always redirect
  to a non-secure page to establish the session.  If you are writing an
  application where the session data is so sensitive that you have to
  protect against session hijacking, you should know about the difference
  between secure and non-secure cookies.  I've got no problem if the
  default behavior uses secure cookies when ever possible, but change the
  Session uses cookie parameter to have a flag that allows session
  cookies to always be non-secure.
  
  Andrew,
  what reason is there for preventing users from bookmarking secure pages?
  I don't follow you there.
  
  Also, as far as I can see, the java community has decided that once you
  start a secure session, you should stay in a secure session, for various
  security reasons. Are you doing a secure login and then redirecting back
  to http afterwards?
  
  Adam
 
 
 Hi Adam,
 
 If a user bookmarks a secure page, and then tries to browse a non-secure
 page, the session is lost.
 
 The decision to keep a session secure iff the FIRST access is secure does
 not make sense to me.
 
 Imagine the following scenario -- A web site has different levels of user
 access.  The difference between the users is what products they can see.
 The data is not terribly sensitive.  However, the log-in should be secure
 for several reasons -- 1) For the users perception -- people do not like the
 This form is not secure message when logging in.  2)  Capturing a user id
 and password is worse than hijacking one session.
 
 Now -- I have a web site with hundreds of pages of product data, and
 thousands of users.  Many of these users bookmark the page
 https://www.example.com/jsp/login.jsp
 
 So -- if I want to allow users to bookmark this page, they will create a
 secure session.  When they then browse the pages, I have two options:
 
 1)  Keep all of the links secure
 
 2) Redirect them to a non-secure page (To establish a non-secure session),
 and then send them back to the secure log-in page.
 
 
 Option 1 is unacceptable -- the overhead of having all of these connections
 encrypted is not a viable option.
 
 Option 2 is a hacky workaround -- cookies have a Secure=yes flag so that it
 can be set and un-set as appropriate.
 
 
 Also -- this is the standard for Tomcat -- not Java --( it may be in the
 servlet/jsp spec -- but if so, it is a new addition).  Other Java based app
 servers treat this differently.
 
 Finally -- I know that ASP used to have the OPPOSITE implementation --
 session cookies were always non-secure.  This is worse than Tomcat, but both
 are wrong.  The developer needs to make the decision about what is
 appropriate.
 
 
 
 Again -- Just my 2 cents -- Is there a security issue I'm missing?  If the
 argument is that you should NEVER go from secure to non-secure, the Tomcat
 solution does not assure that. It only means that you have to go non-secure,
 secure, and then non-secure.  That seems quite arbitrary to me.
 
 
 Thanks,
 
 Andrew
 
 
 --
 Andrew Mottaz
 Site 9 :: Internet Business Solutions
 116 W. Illinois, Ste 6E
 Chicago, Illinois 60610
 312.670.8469
 www.site9.net 
 
 
 
 -
 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

Re: How to get mod_jk 2.0 for redhat

2003-11-12 Thread Kevin Williams
Michel,

I strongly recommend building the connector from source.  The reason for
this is that the connector depends on the version of Apache you are
using (at least that's my conclusion after many failed binary
installs).  I tried using binary versions, but wasn't able to.  I
finally did a source build on both Apache and and the mod connector and
it worked great!


Just my 2 cents...

Kevin Williams

On Wed, 2003-11-12 at 10:05, Michel Cote wrote:
 Hello,
 
  
 
 I'm looking for the BINARY distribution of the Tomcat web server connector
 (mod_jk 2.0) for Linux RedHat  On the mirror sites i can connect on, i only
 find windows or solaris release. I tried to build from the source
 distribution but as i'm not a developper, i didn't manage...
 
  
 
 Thank in advance for any help.
 
  
 
 Michel COTE.
 
  
 
 PS : Sorry for my bad english.
 
  
 
  
 
  
 
  
 


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



RE: how to make a scheduled event on tomcat

2003-08-27 Thread Kevin Williams
Or if you're on a linux environment, just use crontab by itself.  I've
heard there's something similar in the windows environment as well.

On Tue, 2003-08-26 at 13:25, Shapira, Yoav wrote:
 
 Howdy,
 Like JCrontab? http://jcrontab.sourceforge.net/index.shtml ;)
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Vladimer Shioshvili [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 26, 2003 4:15 PM
 To: Tomcat Users List
 Subject: how to make a scheduled event on tomcat
 
 i would like to have a method that would run every-so-often (let's say
 two
 weeks). i am guessing listener could be an option.. is there a better
 solution to achieve this?
 
 thanks
 Vlad
 
 
 Vladimer Shioshvili
 
 QRC Division of Macro International Inc.
 7315 Wisconsin Avenue, Suite 400W
 Bethesda, MD 20814
 
 Phone: (301) 657 3077 ext. 155
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 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]



null pointer exception when running mail example

2003-02-14 Thread Kevin Williams
Hi all,

I am hoping someone can tell me why this happens!  When I installed
Tomcat, my mail example did not work.  I got the following error:

java.lang.NullPointerException
at java.net.InetAddress.cacheAddress(InetAddress.java:648)
at java.net.InetAddress.cacheAddress(InetAddress.java:633)
at
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016)
at java.net.InetAddress.getLocalHost(InetAddress.java:1125)
at
javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:474)


When I run the EXACT same code from my client IDE as a test it works fine!
 To make it work from the web though, I had to add 127.0.0.1 machineName
to my hosts file.  My question is, WHY?  Why does it work different from
within Tomcat than straight from my test app?  IS it looking up via
machine name instead of localhost?  What exactly is happening here?  I am
running on Redhat 8.0 and using JSDK 1.4.1.

Thanks for any help on this strange phenomenon!

Kevin



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




Re: null pointer exception when running mail example

2003-02-14 Thread Kevin Williams
How I'm invoking the mail example is by entering the following as the URL:
http://localhost:8080/examples/jsp/mail/sendmail.jsp

If this were kwilliamsLinux (my machine name) instead of localhost, I'd
definitely see that as the potential source of the problem (although I
didn't think of that until I read your email).

I searched the internet, and they all said to ensure that 127.0.0.1  
localdomain.localhost   localhost was in my hosts file, which it was. 
What I had to add was the 127.0.0.1   kwilliamsLinux  I can't figure out
why tomcat is needing that when running from a command line (and removing
tomcat from the equation) doesn't.  I think this issue is specific for
linux as well.

Kevin

 My two cents follow.  Make sure that your invoking your services
 consistently.
 Something like:

 localhost/MyWebApp/jsp_or_servlet

 or:

 127.0.0.1/MyWebApp/jsp_or_servlet

 or:

 128.43.10.19/MyWebApp/jsp_or_servlet

 Inconsistencies like these, can bring you headaches.
 since the default session management specs bind sessions
 to the url.  If you change the url then you loose the session and
 hence you get errors like the ones you listed below.

 Best,
 -Francisco Bido


 On Friday, February 14, 2003, at 12:41  PM, Kevin Williams wrote:

 Hi all,

 I am hoping someone can tell me why this happens!  When I installed
 Tomcat, my mail example did not work.  I got the following error:

 java.lang.NullPointerException
 at java.net.InetAddress.cacheAddress(InetAddress.java:648) at
 java.net.InetAddress.cacheAddress(InetAddress.java:633) at
 java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016)
 at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at
 javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.jav
  a:474)


 When I run the EXACT same code from my client IDE as a test it works
 fine!
  To make it work from the web though, I had to add 127.0.0.1
 machineName
 to my hosts file.  My question is, WHY?  Why does it work different
 from
 within Tomcat than straight from my test app?  IS it looking up via
 machine name instead of localhost?  What exactly is happening here?  I
   am
 running on Redhat 8.0 and using JSDK 1.4.1.

 Thanks for any help on this strange phenomenon!

 Kevin



 -
 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]




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




mod_webapp on Linux - EAPI?

2002-02-23 Thread Kevin Williams

I downloaded the mod_webapp Linux binary for Tomcat 4.0.1 (I'm actually
running 4.0.2 though, if that matters) and installed it.  When Apache starts
up, I get the warning about needing to re-compile mod_webapp with -DEAPI...

Is there a mod_webapp binary available somewhere that has been compiled with
the EAPI option?  I've tried building it myself...  (./support/buildconf.sh
followed by ./configure) but when I run configure, I'm getting an error:
cannot find or execute './configure' in 'webapp-module-1.0.1-tc401/apr'.
Aparently, my Debian unstable system doesn't quite have everything that's
needed for this build...

So, if I could just download a prebuilt binary from somewhere, it would just
be a lot easier. smile

Thanks!
-Zak


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]