Version 15 (modified by ibaldin, 9 years ago)

--

Q: Where is antlib.xml?

A: Install maven ant tasks (you can download and install maven-ant-tasks-2.1.0.jar directly from apache.com and in Linux put it in /usr/share/ant/lib/). See Prerequisites.


Q: Maven complains about heap space while doing "mvn install", what's this about?

A:

$ export MAVEN_OPTS="-XX:MaxPermSize=512m -Xmx1024m"
$ mvn install

Q: Webapp complains about not being able to find container.properties

A: As of Anacortes 1.2 ORCA no longer packages container.properties with the webapp. Create a directory (e.g. /opt/orca), make sure tomcat has a definition of $ORCA_HOME in its start.sh pointing to it (e.g. add 'export ORCA_HOME=/opt/orca') to tomcat start.sh, then copy container.properties in $ORCA_HOME/config/ and try again.


Q: My node agent randomly quits

A: Nodeagents ship with remote debugging port open by default. Port scans on that port tend to kill the NA. Reconfigure the NA not to use remote debugging (/root/na/bin/httpserver.sh):

# Uncomment this line to turn on debugging. Note that a port scan on the debug port will kill the
# JVM. This is a known bug in Java 1.5.
#DEBUG_OPTIONS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${DEBUG_PORT}"

Q: My webapp randomly quits

A: You may have opened debug port in tomcat/start.sh. Close it by commenting out the long CATALINA_OPTS declaration and uncommenting the short one:

declare -x CATALINA_OPTS="-Xmx1024m"
#declare -x CATALINA_OPTS="-ea -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=11111 -Xmx1024m"

Q: How do I modify the path to Java executables used by ORCA?

A: Different ORCA components deal with it differently. For command-line testing, it is enough that your shell environment has proper $PATH and $JAVA_HOME settings. For container deployments, you can prepend tomcat/start.sh with

export JAVA_HOME=<new path to java installation>
export PATH=$JAVA_HOME/bin:$PATH

For node agents, you can prepend the /etc/init.d/na script after the node agent is deployed to a host:

export JAVA_HOME=<new path to java installation>
export PATH=$JAVA_HOME/bin:$PATH

Q: What do I need to do to cancel a lease in Bella 2.x?

A: A controller injects a reservation object in the system by calling the service manager's demand(IReservation) method. All you need to cancel the lease is to call close() on that same reservation object.

You can close a reservation at any time. The internal state machine is designed to handle this and should do the right thing.


Q: I'm confused about all the steps needed to build ORCA?

A: The correct sequence when starting with a fresh orca installation is:

 ant get.all
 ant prepare.build
 mvn install
 ant prepare.use

ant get.all will check the code out from the different subversion projects that constitute ORCA

ant prepare.build will create Maven pom files at the top level of each project

mvn install will compile the jars and place them in target/ of each project and in ~/.m2/repository

ant prepare.use executes the following script: build-all/use.sh. If you take a look at this script, you will see that it executes ant get.packages in tools/cmdline.

The story about ant get.packages is as follows: when Orca starts it loads all extensions under $ORCA_HOME/startup. ant get.packages places the default extensions there. It should be rerun every time one of these extensions changes, so that $ORCA_HOME/startup would contain the most recent version of that extension. These versions come from the Maven repository (~/.m2/repository)