karaf examples in DDF release

49 views
Skip to first unread message

Hobo Joe

unread,
Aug 15, 2019, 9:18:32 AM8/15/19
to ddf-users
I am unable to get the karaf-rest-example running in DDF, I get

Error executing command: Connection refused (Connection refused)

when trying to hit the REST endpoint. For some reason DDF doesn't bring up the jetty instance.

I am new to OSGi & DDF so I don't know if this is a stupid question or not. Should I expect the karaf examples to run?

thx.

Ryan Schachte

unread,
Aug 15, 2019, 11:20:06 AM8/15/19
to ddf-users
Hi Hobo,

Slight chance this could be related to CSRF. Can you try flipping this value to false?

Cheers,
Schachte

Hobo Joe

unread,
Aug 15, 2019, 11:38:46 AM8/15/19
to ddf-users
Thanks Ryan, I flipped it and restarted ddf but still no love. It almost seems like a permissions thing. I found another example project that tries to read a properties file, it gets permission errors trying to read the file. When I try the examples in regular apache karaf they just work, so it must be how my ddf is configured.

Scott Tustison

unread,
Aug 15, 2019, 11:57:46 AM8/15/19
to ddf-users
DDF uses the Java security manager and it is likely failing on an AccessControlException, if you look in the log. You'd need to modify the policy to get the example to run properly.

Scott

Hobo Joe

unread,
Aug 15, 2019, 12:20:05 PM8/15/19
to ddf-users
Scott!  That's it I just noticed this in the logs.

2019-08-15T12:17:46,988 | ERROR | onfig-2-thread-5 | HttpServiceStarted               | vice.internal.HttpServiceStarted  255 | 286 - org.ops4j.pax.web.pax-web-runtime - 7.2.5 | Could not start the servlet context for context path []
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "createClassLoader")

Could I trouble you for any hints on how to modify the policy?

Scott Tustison

unread,
Aug 15, 2019, 12:28:11 PM8/15/19
to ddf-users
We have a custom built debugger that will give you some options that you can copy and paste into the policy file: https://github.com/codice/acdebugger
Run DDF with debugging enabled and then start ACDebugger
Paste one of the options to resolve the access control issue into <ddf>/security/default.policy

Scott

Hobo Joe

unread,
Aug 15, 2019, 1:15:21 PM8/15/19
to ddf-users
Ok, stupid question I know but, I can't find how to start DDF with debugging enabled?

Hobo Joe

unread,
Aug 15, 2019, 1:31:52 PM8/15/19
to ddf-users
Found it, sorry.
Reply all
Reply to author
Forward
0 new messages