[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Cannot determine tomcat version from Apache Tomcat/5.0  XML
Forum Index -> Terracotta for Web Sessions Go to Page: Previous  1, 2
Author Message
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

here are attached the screenshot of the java console so you can see the clients connected and the tc-config file.
 Filename tc-config.xml [Disk] Download
 Description tc-config
 Filesize 2 Kbytes
 Downloaded:  399 time(s)

[Thumb - admin.png]
 Filename admin.png [Disk] Download
 Description Screen Shot of java console
 Filesize 62 Kbytes
 Downloaded:  405 time(s)

Tim Eck

journeyman
[Avatar]
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline

If indeed what you're trying to share are the HttpSession objects for your web application, the other thing I can think of is that the <web-applications> section of your tc-config.xml is not correct.

The value you want to use for <web-application> is the context root of your application. From the config file attached, your application would need to reside at http://<your_web_server>/site/* (note: the "site" in that URL)

If your application resides in the root context (ie. http://<your_web_server>/*), use the value "ROOT" in tc-config.xml

hope this helps
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

Well I finally figured it out.. Thanks in advance for all your help!

This was missing from tc-config.xml
<additional-boot-jar-classes>
<include>java.util.Locale</include>
<include>java.util.Random</include>
</additional-boot-jar-classes>


I found that out through the sessions-configurator.sh

I started the site just fine but when i logged into the site I would get the error on the site and on the console and the console will ask if you want to load this module in and essentially recreate boot.jar ..

I initially was just testing with me reading logs and hitting the site, I did not realize that the xonsole will also add the correct modules to tc-config.
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

New config.....
 Filename tc-config.xml [Disk] Download
 Description
 Filesize 3 Kbytes
 Downloaded:  463 time(s)

asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

just noticed this when i log in to the site the data is not persistent .......
I log in successfully and then it still shows me logged out.... I'm confused as why this is happening.....

I see data in the graphs now and it seem like we are right there on having this product work
with our site but session data seems not to be working.
Also while I have your attention how does terracotta work with apache as the front end to tomcat???

What we want out of Terracotta and the only reason we are not going with tomcat 6.0 is that you handle sessions much quicker then tomcat does... But as I see it now none of the session data is working not even on the box I login as myself.
Tim Eck

journeyman
[Avatar]
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline

Not quite sure what is going on, but stepping through things in systematic way can usually shed some light....restart your browser, the terracotta server and your tomcat server(s). This should ensure you are stating with a clean slate.

You're saying that as soon as you login to the application, something on the page is indicating that you are not really logged in? The only way to trace that is to look into how the application makes that decision and trace it from there (again this where a clean slate can help)

It shouldn't matter, but how many tomcat servers are involved when you are running this test? Does using a single tomcat server make the problem go away?

With regards to using apache in front of tomcat, thing should work, but not very efficiently (as least not out of the box). I'm assuming you're talking about mod_jk? If so, the problem is that our JSESSIONID values are not currently in a format that mod_jk can use to make sticky routing decisions.

Some more info (and a workaround) for this issue:
http://forums.terracotta.org/forums/posts/list/202.page
http://jira.terracotta.org/jira/browse/CDV-233

p.s. The posts where you mention the boot jar classes that you needed to add -- was that just to let us know, or is there a question in there?
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

Thanks for all your help again, i was able to get terracoota to work with our setup for a brief time though... The reason sessions werent saving was because I had to put change site to ROOT

<web-application>ROOT</web-application>

once I did that all was well... but then this started to happen...


May 10, 2007 9:35:12 AM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
May 10, 2007 9:35:16 AM org.apache.coyote.tomcat5.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.AssertionError: Precondition Failed
at com.terracotta.session.util.Assert.pre(Assert.java:9)
at com.tc.tomcat50.session.SessionValve50.makeWebAppConfig(SessionValve50.java:98)
at com.tc.tomcat50.session.SessionValve50.createManager(SessionValve50.java:80)
at com.tc.tomcat50.session.SessionValve50.findOrCreateManager(SessionValve50.java:72)
at com.tc.tomcat50.session.SessionValve50.tcInvoke(SessionValve50.java:56)
at com.tc.tomcat50.session.SessionValve50.invoke(SessionValve50.java:48)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Tim Eck

journeyman
[Avatar]
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline

I'll look into that Assertion error -- for some reason the context for request is null, not sure why that would be.

Do you know the exact version of tomcat you are running? If the version is unknown (or known to be older than 5.0.28), trying to reproduce this issue with 5.0.28+ would be helpful.
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

now I recreated my boot.jar... then started up terracotta and now I do not see those errors at all but not I can no longer see the classes..... :(

FYI.. config hasn't changed from my last posting.
asanabria6910

journeyman

Joined: 05/03/2007 11:22:24
Messages: 14
Offline

5.0.30 is the version we are using
Tim Eck

journeyman
[Avatar]
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline

After looking over some of the tomcat code, it's not immediately obvious why the context in your request is null. Two things we can try:

1) If possible, I'd like to see your tomcat config files (conf/server.xml, any context files inside your war, etc). I'm mostly wondering if some form of virtual host or something is messing up our code. If there is any sensitivity with those files (please either use the private message button or sanitize before posting)

2) If you're comfortable/able to hook up a debugger to your tomcat instance, I'd very interested to know why the request context is null. The call that should make it non-null I believe is on line 281 of org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(), the line looks like:Code:
   request.setContext((Context) request.getMappingData().context);

http://svn.apache.org/repos/asf/tomcat/container/tags/tc5.0.x/TOMCAT_5_0_30/catalina/src/share/org/apache/coyote/tomcat5/CoyoteAdapter.java
 
Forum Index -> Terracotta for Web Sessions Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.7 © JForum Team