Category Archives: apache-ace

Apache Ace has an error: Unable to handle server responsecode: 500

My steps are as follows:

  1. Start the ACE server

C:\ace\server-allinone

java -Dorg.osgi.service.http.port=9000  -Dorg.apache.ace.server=localhost:9000  -Dorg.apache.ace.obr=localhost:9000      -jar server-allinone.jar
  1. Start an ACE target

C:\ace\target\bin
java    -Dagent.identification.agentid=target123   -Dagent.discovery.serverurls=http://127.0.0.1:9000  -Ddiscovery=http://127.0.0.1:9000  -jar ace-launcher.jar  fwOption=org.osgi.service.http.port=5678 
  1. Provisioning software
    • Go to the ACE web-based UI. If your target is up and running, it should be displayed in the "Targets" column with a name of target123;
    • To persist the changes, you can use the Store button at the top of the screen.

[ERROR] 15:26:59 (controller) Deployment update aborted due to Exception.
java.io.IOException: Unable to handle server responsecode: 500, for
 http://127.0.0.1:9000/deployment/target123/versions/
        at org.apache.ace.agent.impl.ConnectionUtil.checkConnectionResponse(Conn
ectionUtil.java:67)

How do I fix this?

Apache Ace as a Service

I am trying to setup/configure Apache ACE for the first time. It seems like I got everything running correctly but I would like to have ACE startup automatically when the Linux box starts. I created the init.d script below which does starts up ACE however it drops me in an OSGI console and when I leave the console ACE shuts down. Is there a way to start ACE without having the OSGI console so I do not have to keep my session open to keep ACE running?

#! /bin/bash

BIN_DIR=/opt/ace-current/server-allinone
PATH=/bin:/usr/bin:/sbin:/usr/sbin
JAVA_HOME=/usr/lib/jvm/default-java

if [ `id -u` -ne 0 ]; then
        echo "You need root privileges to run this script"
        exit 1
fi

. /lib/lsb/init-functions

if [ -r /etc/default/rcS ]; then
        . /etc/default/rcS
fi

case $1 in
        start)
                cd $BIN_DIR
                java -Dorg.apache.ace.server=localhost:11868 -Dorg.osgi.service.http.port=11868 -Dorg.apache.ace.obr=localhost:11868 -jar server-allinone.jar 
        ;;

        stop)
                pid=`ps aux | grep server-allinone | awk '{print $2}'`
                kill -9 $pid
        ;;

        restart)
                $0 stop
                $0 start
        ;;
esac
exit 0