You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by dr...@apache.org on 2017/06/16 15:22:01 UTC

[21/28] brooklyn-docs git commit: Put osgi mode debugging in separate section

Put osgi mode debugging in separate section

Add JAVA_DEBUG_PORT description.

Recommend up to date JAVA_DEBUG_OPTS flags
Those are the same used with bin/karaf debug

(cherry picked from commit f9e0ffb68f7d9644e0717598f2386184e21d428c)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/12231b5e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/12231b5e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/12231b5e

Branch: refs/heads/0.11.x
Commit: 12231b5ee0215729f3f41cd411e412f464ba1c09
Parents: f6f87ae
Author: Valentin Aitken <bo...@gmail.com>
Authored: Tue May 9 15:32:30 2017 +0300
Committer: Richard Downer <ri...@apache.org>
Committed: Wed May 31 15:32:22 2017 +0100

----------------------------------------------------------------------
 guide/ops/osgi.md | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/12231b5e/guide/ops/osgi.md
----------------------------------------------------------------------
diff --git a/guide/ops/osgi.md b/guide/ops/osgi.md
index 915539b..97becec 100644
--- a/guide/ops/osgi.md
+++ b/guide/ops/osgi.md
@@ -5,10 +5,8 @@ children:
 - osgi-configuration.md
 ---
 
-# Running Apache Brooklyn inside Karaf container
-
 The Apache Brooklyn Karaf based distribution lives in brooklyn-dist/karaf/apache-brooklyn folder.
-It's still in a testing stage so some features might not work as expected. Please contact us on the 
+Please contact us on the
 [mailing list](mailto:dev@brooklyn.apache.org) if you find any problems.
 
 ## Building
@@ -33,6 +31,17 @@ This will launch the [Karaf console](https://karaf.apache.org/manual/latest/user
 where you can interact with the running instance. Note that Brooklyn has already started at this point
 and is reachable at the usual web console url.
 
+Start the instance as a server in the background using the following command
+
+{% highlight bash %}
+bin/start
+{% endhighlight %}
+
+The Karaf container will keep state such as installed bundles and configuration between restarts.
+To reset any changes add **clean** to the cli arguments.
+
+## Debugging
+
 To start in debug mode use
 
 {% highlight bash %}
@@ -41,23 +50,22 @@ bin/karaf debug
 
 and connect to port 5005 using your normal Java debugger.
 
-To pause startup until the debugger is connected you can use
+If you want to change dt_socket port you can pass `JAVA_DEBUG_PORT` environment variable
 
-{% highlight bash %}
-JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005' bin/karaf debug
+{%highlight bash %}
+JAVA_DEBUG_PORT=5006 bin/karaf debug
 {% endhighlight %}
 
-
-Start the instance as a server in the background using the following command
+To pause startup until the debugger is connected you can use
 
 {% highlight bash %}
-bin/start
+JAVA_DEBUG_OPTS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005' bin/karaf debug
 {% endhighlight %}
 
-The Karaf container will keep state such as installed bundles and configuration between restarts.
-To reset any changes add **clean** to the cli arguments.
+For other options please check your JVM JPDA documentation.
+Hotspot JPDA:  https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/
 
 ## Configuring
 
-Configuration of Brooklyn when running under Karaf is largely done through standard Karaf mechanisms. 
+Configuration of Brooklyn when running under Karaf is largely done through standard Karaf mechanisms.
 See the page on [OSGI Configuration](osgi-configuration.html) for details.
\ No newline at end of file