From: Conrad H. <co...@cg...> - 2014-01-15 23:01:14
|
Opal is now working fine for me with tomcat6 when I run it on a single host. My next step is to turn it into a cluster service (Redhat Enterprise Linux 6 clustering). Using the exact same Opal configuration except changing: tomcat.url=http://crick.cgl.ucsf.edu:8080 to tomcat.url=http://webservices.rbvi.ucsf.edu in etc/opal.properties, I get the error message in the attached catalina.out file. It appears to be a permissions problem, and I have a guess at what it might be. webservices.rbvi.ucsf.edu:80 is actually an Apache instance configured to forward requests to opal2/* to tomcat. I'm guessing that somehow the opal/tomcat instance can tell whether the deployment request came from itself. In the crick:8080 case, it did, and everything worked; in the webservices:80 case, it did not, and resulted in the rejection. What I do not know is where this permission check occurs (in tomcat or opal). A couple hours of research suggested that I need to have a <Valve className="org.apache.catalina.valves.RemoteAddrValve" ... statement somewhere, but I really do not know tomcat or opal well enough to figure it out. Any suggestions? Thanks. Conrad On 1/10/2014 12:47 PM, Conrad Huang wrote: > Ah, that was just stupidity on my part. I moved tomcat6 and forgot to > update hibernate-opal.cfg.xml. Sorry about the silly question. > > Conrad > > On 1/10/2014 12:34 PM, Luca Clementi wrote: >> On Fri, Jan 10, 2014 at 12:08 PM, Conrad Huang <co...@cg...> wrote: >>> Hi, Luca. Sorry to reopen the thread, but... >>> >>> Just to make sure I can reproduce things, I removed everything and started >>> over. I changed the tomcat startup script so that tomcat starts in >>> $CATALINA_HOME. I reset opal.deploy.path back to simply "deploy" instead of >>> the absolute path. I copied the tomcat6 files and reinstalled Opal 2.5. >>> Unfortunately, when I start tomcat, I'm getting these strange database >>> timeouts again. I've attached logs/catalina.out. >>> >>> The Opal server does eventually serve up pages. Service deployment works >>> (copying file to "deploy" directory makes it show up in dashboard "List of >>> Application"). Clicking on the dashboard Statistics tab does not work and >>> generates the errors towards the end of catalina.out. >>> >>> Any suggestions? Thanks. >> >> >> What kind of database are you using? >> The problem is probably located in your hibernate file: >> etc/hibernate-opal.cfg.xml >> >> You have a communication problem (if you use hsql tomcat probably you >> can't write to the file in connection.url: >> <property name="connection.url">jdbc:hsqldb:file:/home/clem/projects/opaltoolkit/apache-tomcat-7.0.27/webapps/opal2/WEB-INF/data/opaldb</property>) >> >> >> Luca >> >> >> >>> On 1/9/2014 2:36 PM, Conrad Huang wrote: >>>> >>>> On 1/9/2014 2:22 PM, Luca Clementi wrote: >>>>> >>>>> On Thu, Jan 9, 2014 at 1:45 PM, Conrad Huang <co...@cg...> wrote: >>>>>> >>>>>> On 1/9/2014 11:35 AM, Luca Clementi wrote: >>>>>>> >>>>>>> >>>>> [...] >>>>>> >>>>>> The debug code clears it up a bit. Here's the end of catalina.out >>>>>> (adding >>>>>> debugging code but leaving deploy as "deploy"): >>>>>> >>>>>>> INFO: Server startup in 2609 ms >>>>>>> 2014-01-09 13:28:08,074 INFO >>>>>>> >>>>>>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:160) >>>>>>> - initDeployServlet: axis URL: >>>>>>> http://xxx.xxx.ucsf.edu:8080/opal2/servlet/AxisServlet >>>>>>> 2014-01-09 13:28:08,075 INFO >>>>>>> >>>>>>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:161) >>>>>>> - initDeployServlet: deploy path: deploy >>>>>>> 2014-01-09 13:28:08,075 INFO >>>>>>> >>>>>>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:162) >>>>>>> - initDeployServlet: deploy path: /var/www/deploy >>>>>>> >>>>>>> Exception in thread "OpalDeployer" java.lang.NullPointerException >>>>>>> at >>>>>>> >>>>>>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:178) >>>>>> >>>>>> >>>>>> >>>>>> The full deploy path is relative to /var/www, which is the home >>>>>> directory of >>>>>> user "apache" which is the account we use for running this instance of >>>>>> tomcat. I guess tomcat6 does not change directory from where it was >>>>>> started >>>>>> to $CATALINA_HOME. Our startup script uses "su - apache -c ..." to >>>>>> start >>>>>> tomcat, so it starts in ~apache or /var/www. Specifying the full path in >>>>>> etc/opal.properties makes everything work. I have one service deployed! >>>>>> >>>>> >>>>> That does not make much sense to me :-( >>>>> It should not use the current working directory (that was my first test). >>>>> What script do you use to start up tomcat? >>>>> You should use the $CATALINA_HOME/bin/startup.sh which sets the proper >>>>> working directory: >>>>> clem@hermes:~/projects/opaltoolkit$ apache-tomcat-6.0.37/bin/startup.sh >>>>> Using CATALINA_BASE: >>>>> /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37 >>>>> Using CATALINA_HOME: >>>>> /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37 >>>>> Using CATALINA_TMPDIR: >>>>> /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/temp >>>>> Using JRE_HOME: /usr >>>>> Using CLASSPATH: >>>>> /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/bin/bootstrap.jar >>>>> >>>>> No matter where I start it from.... >>>>> I tried to reproduce your problem but still no luck >>>>> cd /tmp >>>>> su - clem -c >>>>> /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/bin/startup.sh >>>>> >>>>> >>>>> Luca >>>>> >>>> >>>> We're on Redhat Enterprise Linux 6. There is no startup.sh in >>>> /usr/share/tomcat6/bin. I copied the startup file from >>>> /etc/init.d/tomcat6. In that script it invokes /usr/sbin/tomcat6, which >>>> ultimately runs java with no intervening chdir: >>>> >>>> /usr/lib/jvm/java/bin/java >>>> >>>> -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory >>>> -classpath >>>> >>>> :/usr/local/opal-tomcat6/bin/bootstrap.jar:/usr/local/opal-tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar >>>> -Dcatalina.base=/usr/local/opal-tomcat6 >>>> -Dcatalina.home=/usr/local/opal-tomcat6 -Djava.endorsed.dirs= >>>> -Djava.io.tmpdir=/usr/local/opal-tomcat6/temp >>>> >>>> -Djava.util.logging.config.file=/usr/local/opal-tomcat6/conf/logging.properties >>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager >>>> org.apache.catalina.startup.Bootstrap start >>>> >>>> Conrad >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For >>>> Critical Workloads, Development Environments & Everything In Between. >>>> Get a Quote or Start a Free Trial Today. >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >>>> >>>> _______________________________________________ >>>> Opaltoolkit-users mailing list >>>> Opa...@li... >>>> https://lists.sourceforge.net/lists/listinfo/opaltoolkit-users >>>> >>> > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Opaltoolkit-users mailing list > Opa...@li... > https://lists.sourceforge.net/lists/listinfo/opaltoolkit-users > |