[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]
Messages posted by: mfor  XML
Profile for mfor -> Messages posted by mfor [6]
Author Message
Hello Sreeni and Tim,

Thanks to both of you for your responses.

I've successfully got one of our webapps running on two instances of tomcat clustered with terracotta on my computer (win xp using cygwin).
in my tomcat catalina.sh:
Code:
JAVA_HOME="c:\PROGRA~1\Java\JRE15~3.0_0"
 CATALINA_BASE="."
 CATALINA_HOME="..\apache-tomcat-5.5.17"
 JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:C:\java\_terracotta\dso-boot-hotspot_win32_150_09.jar"
 JAVA_OPTS="$JAVA_OPTS -Dtc.install-root=C:\PROGRA~1\TERRAC~1\TERRAC~1.1"
 JAVA_OPTS="$JAVA_OPTS -Dtc.config=mfortin.omp.loc:9510"
 JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
 

Most of the issues I've had were caused by not following the instructions (duuh). We'll probably start some load testing within the next couple of days on our production servers. Now that I have it running it raise some other questions.

Do all the clients and/or the terrocotta server have to be running the same major and/or minor version of java? does the client and/server platforms have to be homoginous?

I noticed the jsessionid's format changed with a '!' and channelId appended to it. I assume that points to the client instance, correct? I haven't seen anything in your docs about this.

My understanding of how terracotta worked is that when I access an object in the shared heap, I accessing the same instance, but when I output the value of the object in a jsp page it had a different object id (com.package.SomeClass@objid(values...)) but the same values. Shouldn't that object id be the same on both clients?

After some testing I discovered what my original error was in the Configurator. I was trying to save a hibernate proxy and it contained classes that were in the instrumented-classes exclude list. I imagine it's not a good idea to persist hibernate proxies, right?

Lastly, the terracotta adminstrator console lists the classes persisted in serverName --> DSO --> Classes. I imagine that's a good reference to use to setup the tc-config.xml instrumented-classes or can I leave it as *..*? In other words, do I gain any performance by updating the instrumented classes?

Thanks again
Michael
Hello again,

I rebuilt the boot jar as described and restarted. On startup I get the following:
Code:
 java.lang.ExceptionInInitializerError
         at com.tc.management.AbstractTerracottaMBean.<init>(AbstractTerracottaMBean.java:52)
         at com.tc.management.AbstractTerracottaMBean.<init>(AbstractTerracottaMBean.java:43)
         at com.tc.management.beans.logging.TCLoggingBroadcaster.<init>(TCLoggingBroadcaster.java:32)
         at com.tc.logging.TCAppender.<init>(TCAppender.java:28)
         at com.tc.logging.TCLogging.<clinit>(TCLogging.java:390)
         at com.tc.object.bytecode.hook.impl.DSOContextImpl.<clinit>(DSOContextImpl.java:43)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.createGlobalContext(ClassProcessorHelper.java:380)
         at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.init(ClassProcessorHelper.java:274)
         at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:407)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.util.logging.LogManager$1.run(LogManager.java:163)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.util.logging.LogManager.<clinit>(LogManager.java:156)
         at java.util.logging.Logger.getLogger(Logger.java:274)
         at sun.management.snmp.util.MibLogger.<init>(MibLogger.java:57)
         at sun.management.snmp.util.MibLogger.<init>(MibLogger.java:42)
         at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:584)
         at sun.management.Agent.startAgent(Agent.java:135)
         at sun.management.Agent.startAgent(Agent.java:239)
 Caused by: java.lang.NullPointerException
         at java.util.logging.Logger.getLogger(Logger.java:275)
 


Any thoughts

Thanks
Michael
Hi

I'm still having no luck getting our webapp to run. This is what I've tried:

tomcat version 5.5.17

$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)

I've setup tomcat with 2 tomcat_base directories, and I can get them to run without tc. When I tried to add tc I get the following error in catalina.out:
Code:
 java.lang.NoSuchMethodError: java.util.Arrays.copyOf([BI)[B
         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
         at java.util.jar.JarVerifier.update(JarVerifier.java:183)
         at java.util.jar.JarFile.initializeVerifier(JarFile.java:320)
         at java.util.jar.JarFile.getInputStream(JarFile.java:386)
         at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:689)
         at sun.misc.Resource.cachedInputStream(Resource.java:59)
         at sun.misc.Resource.getByteBuffer(Resource.java:154)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:234)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225)
         at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205)
         at sun.security.jca.ProviderList.loadAll(ProviderList.java:264)
         at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:281)
         at sun.security.jca.Providers.getFullProviderList(Providers.java:132)
         at java.security.Security.getProviders(Security.java:421)
         at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.<clinit>(ClassProcessorHelper.java:77)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 



I'm running tomcat from cygwin so I added the following to my catalina.sh

Code:
 CATALINA_BASE="."
 CATALINA_HOME="..\apache-tomcat-5.5.17"
 
 JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:C:\java\_tomcat1\tc\dso-boot-hotspot_win32_150_09.jar -Dtc.install-root=C:\PROGRA~1\TERRAC~1\TERRAC~1.1"
 JAVA_OPTS="$JAVA_OPTS -server -Dcom.sun.management.jmxremote -Xms64m -Xmx512m -XX:MaxPermSize=256m"
 JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
 


I've put my tc-config.xml in the same directory as the boot jar, when I start the tc server, it seems to start fine, but tomcat doesn't connect.


By the way, can terracotta run with tomcat 6.0.10? How about java 6?
Thanks again
Michael

Hi Sreeni,
Thanks for the response, sorry to took so long for me to get back to you. I have the usual work distractions as I'm sure you can imagine.

To answer your question, yes we're hoping to use that setup in our production environment and that would be a deal breaker. We have about 40 webapps each load balanced to 3 servers. Each server is running between 3 and 12 webapps.

Before we can test a production setup I need to test one of our webapps in the configurator. I am using the nightly snapshot from about 3 weeks ago per your suggestion. I have our war imported and it starts and runs fine without terracotta session enabled. When I enable them and start the server, it appears ok until I go to the home page and I get an error saying it must include a type 'java.lang.ref.ReferenceQueue' in the boot jar. When I hit ok, it stops all the servers but then never come back up. It acts as if it ran out of memory. I've tried to increased the memory in bin/start-tc-server.bat with no affect. Any tips on getting our webapp to run?

Thanks again,
Michael
Hi siyer,
thanks for your response.
For multiple hosts, I mean a tomcat instance with many domain names. ie a tomcat server.xml like:
Code:
<Server port="8005" shutdown="SHUTDOWN">
 <Service name="Catalina">
  <Engine name="Catalina" defaultHost="domain.com">
         <Host name="domain.com"  appBase="webapps-domain">
         <Context path="/" />
         </Host>
         <Host name="special.domain.com"  appBase="webapps-special.domain">
         <Context path="/" />
         </Host>
         <Host name="special2.domain.com"  appBase="webapps-special2.domain">
         <Context path="/" />
         </Host>
  </Engine>
  </Service>
 </Server>


each host is cluster and load balanced separately but using the same code base. Since each webapp is named ROOT would there be any issues using terracotta to cluster them? I haven't found anything in the documentation regarding this kind of setup.

Thanks again.
Mike

Hello, I can see where each webapp needs to be configured in the tc-config.xml, but how do I setup multiple hosts (all with one webapp named ROOT) in one tomcat instance and have them be clustered with terracotta?

Also I've been trying to run one of our apps in the configurator and it keeps coming back with 'cannot share an instance of type org.apache.commons.collections.ReferenceMap...'. When I click ok and it restarts I get the same error. I can see where it's getting added to the tc-config.xml but it doesn't seem to have any effect. We never use commons collections directly, could that be coming from hibernate?

Thanks
Mike
 
Profile for mfor -> Messages posted by mfor [6]
Go to:   
Powered by JForum 2.1.7 © JForum Team