1

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?

eLeMenCy
  • 11
  • 1
  • 2

2 Answers2

1

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
Marcel Offermans
  • 3,313
  • 1
  • 15
  • 23
  • Thank you for your suggestion - I am not sure if it is actually possible to use the java command directly on the remote cloud node other than possibly via an embeded script in a self exe JAR but maybe you were hinting at something else which I am overlooking? – eLeMenCy Oct 31 '16 at 23:36
0

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).

DeejUK
  • 12,891
  • 19
  • 89
  • 169