1
votes

I am currently trying to deploy and run an Ace Target on an IBM Bluemix CloudFoundry Java/Liberty buildpack but without much success.

Symptoms: During the deploy/re-stage procedure, the ACE Launcher's internal server is started with a preset port number (default or set manually via cfg) whilst the Bluemix container is dynamically assigned a random port number. Port binding between both entities times-out and launch procedure fails.

Option: The Bluemix random port is accessible via a sys. env. variable $PORT.

Question: What would be the best/simplest approach to assign the freshly generated Bluemix's random port number to ACE Launcher's internal server?

2

2 Answers

1
votes

You can start the ACE launcher like this:

java -jar org.apache.ace.agent.launcher.felix.jar -v -s http://server:${PORT}

Where:

-v -- verbose, mainly so you can better diagnose what is going on
-s URL -- provides the launcher with the URL (which includes the port) of the server
0
votes

It depends on how ACE takes arguments. The documentation for the Java Buildpack explains how to provide custom JVM arguments that may be able to provide ACE with what it needs (perhaps -s http://localhost:$PORT as suggested by others).