BUG-8117: fix jetty/pax-web configuration mismatch 11/54611/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 10 Apr 2017 16:16:45 +0000 (18:16 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 10 Apr 2017 16:31:33 +0000 (18:31 +0200)
Karaf 4 uses pax-web as the jetty configuration bridge, which
compares the jetty configuration with its directives. If a port
or address mismatch is found, this leads to duplicate ports being
used and hence preventing successful jetty startup.

Change-Id: Ia5b71621ba0474481dab738232ebac778540a258
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
karaf/opendaylight-karaf4-resources/src/main/resources/etc/jetty.xml
karaf/opendaylight-karaf4-resources/src/main/resources/etc/org.ops4j.pax.web.cfg [new file with mode: 0644]

index ac172ea01bd1b3b6454935f627668538c1b78443..df22f9d23f36d84317fcb92b37ab4d6ca50e043d 100644 (file)
@@ -80,7 +80,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
                     </Array>
                 </Arg>
                 <Set name="host">
-                    <Property name="jetty.host" default="localhost"/>
+                    <Property name="jetty.host"/>
                 </Set>
                 <Set name="port">
                     <Property name="jetty.port" default="8181"/>
@@ -111,7 +111,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
                     </Array>
                 </Arg>
                 <Set name="host">
-                    <Property name="jetty.host" default="localhost"/>
+                    <Property name="jetty.host"/>
                 </Set>
                 <Set name="port">
                     <Property name="jetty.port" default="8080"/>
diff --git a/karaf/opendaylight-karaf4-resources/src/main/resources/etc/org.ops4j.pax.web.cfg b/karaf/opendaylight-karaf4-resources/src/main/resources/etc/org.ops4j.pax.web.cfg
new file mode 100644 (file)
index 0000000..13c66bd
--- /dev/null
@@ -0,0 +1,5 @@
+javax.servlet.context.tempdir = data/pax-web-jsp
+org.ops4j.pax.web.config.file = etc/jetty.xml
+org.osgi.service.http.port = 8181
+#org.osgi.service.http.port.secure = 8543
+#org.osgi.service.http.secure.enabled = true