You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Srikanth Hugar <sr...@gmail.com> on 2014/09/17 06:13:46 UTC

How to run karaf webconsole in different port

Hello,

   I am using 3.0.x version of karaf and i have jetty with multiple
connectors specified in jetty.xml file.
I am installing the webconsole feature. But i would like to provide access
to webconsole with specific jetty coonector port.

How to configure to run webconsole with provided jetty connector?


-- 
 Srikanth
www. <http://www.srikanthugar.in>gharki.com

Re: How to run karaf webconsole in different port

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

guess that is missing in the blog, but if you don't specify a WebConnector
in the manifest of your bundle it will be available to all Connectors
defined in the jetty.xml. This is the default behavior, [1][2]. If you want
to change that behavior for the webconsole you'll need to either adapt it
yourself and re-build it, or create a fragment-bundle containing only the
require manifest entry and attach it to the webconsole bundle. At [3] you
can find a sample on how a fragment bundle looks like.


regards, Achim

[1] -
http://notizblog.nierbeck.de/2013/01/bind-certain-web-applications-to-specific-httpconnectors/
[2] -
http://notizblog.nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/
[3] -
http://notizblog.nierbeck.de/2011/08/adding-custom-log-appender-to-pax-logging/


2014-09-17 7:04 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:

> Thank you for quick reply. I tried mentioned option already with port 8181
> (org.osgi.service.http.port=8181). But once again that runs webconsole in
> all the ports, 8181,8081,9081. Please find details below.
>
> My connector configurations in jetty.xml is below. Basically 8081 and 9081
> ports both with https(SSL).
>
> My plan is to run the different REST services with different ports, so
> that we can block one port from outside access.
>
> So basically now i want to run the webconsole with only 9081 port. But
> currently it is accessible from both 8081 and 9081 ports, not configuration
> helped me.
> If i configure org.osgi.service.http.port=8181, webconsole is accessable
> from all the ports, 8181,8081,9081.
>
> <Call name="addConnector">
>      <Arg>
>        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>          <Arg>
>            <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>             ........................................................
>            </New>
>          </Arg>
>          <Set name="port">8081</Set>
>          <Set name="maxIdleTime">30000</Set>
>  <Set name="name">https-user</Set>
>        </New>
>      </Arg>
>    </Call>
>
>    <Call name="addConnector">
>      <Arg>
>        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>          <Arg>
>            <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>
> .......................................................................
>          </Arg>
>          <Set name="port">9081</Set>
>          <Set name="maxIdleTime">30000</Set>
>  <Set name="name">https-admin</Set>
>        </New>
>      </Arg>
>    </Call>
>
> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi Srikanth,
>>
>> By default, the webconsole uses the default HTTP connector.
>>
>> To change it, you can add:
>>
>> etc/org.ops4j.pax.web.cfg
>>
>> file and set:
>>
>> org.osgi.service.http.port=9999
>>
>> The webconsole will be on port 9999 instead of the default 8181.
>>
>> You can also use a etc/jetty.xml to specify connector and target some
>> application on this connector.
>>
>> You can take a look on this blog explaining this:
>>
>> http://blog.nanthrax.net/2013/02/multiple-http-connectors-
>> in-apache-karaf/
>>
>> Regards
>> JB
>>
>>
>> On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>>
>>> Hello,
>>>
>>>     I am using 3.0.x version of karaf and i have jetty with multiple
>>> connectors specified in jetty.xml file.
>>> I am installing the webconsole feature. But i would like to provide
>>> access to webconsole with specific jetty coonector port.
>>>
>>> How to configure to run webconsole with provided jetty connector?
>>>
>>>
>>> --
>>>   Srikanth
>>> www. <http://www.srikanthugar.in>gharki.com <http://gharki.com>
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
>  Srikanth
> www.srikanthugar.in
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Re: How to run karaf webconsole in different port

Posted by Srikanth Hugar <sr...@gmail.com>.
Thank you. I will try the options specified and get back for any
clarifications.

On Wed, Sep 17, 2014 at 1:03 PM, Achim Nierbeck <bc...@googlemail.com>
wrote:

> Nope, it's not mandatory, it's only mandatory to have the WebContext-Path
> as Manifest header in it to be regarded as WebApplicationBundle (WAB).
> But I think it will still fail cause the WebConnector Manifest entry only
> works for WABs. So you'll need to make use the second approach which is
> described in detail here [1].
> Which still might not work, cause I think the WebConsole isn't setup as a
> Whiteboard application. In that case you'll need to add a jetty-web.xml to
> the WebConsole bundle. This jetty-web.xml needs to point to one of your
> connectors as virtual host. [2]
>
> regards, Achim
>
> [1] -
> http://notizblog.nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/
> [2] -
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/war-jetty-web/src/main/webapp/WEB-INF/jetty-web.xml
>
>
> 2014-09-17 9:24 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
>
>> Got it. Thanks.
>>
>> webconsole is a *jar *file. Is it mandatory to have as *.war* file to
>> add We-Connectors header?
>>
>> Asking because i tried in the past and i doubt it works with jar file.
>>
>> On Wed, Sep 17, 2014 at 12:12 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>> Yes, it's the default behavior.
>>>
>>> You have to set WebConnector header in the manifest of WebConsole to
>>> specify the connector to use.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 09/17/2014 07:04 AM, Srikanth Hugar wrote:
>>>
>>>> Thank you for quick reply. I tried mentioned option already with port
>>>> 8181 (org.osgi.service.http.port=8181). But once again that runs
>>>> webconsole in all the ports, 8181,8081,9081. Please find details below.
>>>>
>>>> My connector configurations in jetty.xml is below. Basically 8081 and
>>>> 9081 ports both with https(SSL).
>>>>
>>>> My plan is to run the different REST services with different ports, so
>>>> that we can block one port from outside access.
>>>>
>>>> So basically now i want to run the webconsole with only 9081 port. But
>>>> currently it is accessible from both 8081 and 9081 ports, not
>>>> configuration helped me.
>>>> If i configure org.osgi.service.http.port=8181, webconsole is
>>>> accessable
>>>> from all the ports, 8181,8081,9081.
>>>>
>>>> <Call name="addConnector">
>>>>       <Arg>
>>>>         <New class="org.eclipse.jetty.server.ssl.
>>>> SslSelectChannelConnector">
>>>>           <Arg>
>>>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>>>              ........................................................
>>>>             </New>
>>>>           </Arg>
>>>>           <Set name="port">8081</Set>
>>>>           <Set name="maxIdleTime">30000</Set>
>>>> <Set name="name">https-user</Set>
>>>>         </New>
>>>>       </Arg>
>>>>     </Call>
>>>>     <Call name="addConnector">
>>>>       <Arg>
>>>>         <New class="org.eclipse.jetty.server.ssl.
>>>> SslSelectChannelConnector">
>>>>           <Arg>
>>>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>>>
>>>> .......................................................................
>>>>           </Arg>
>>>>           <Set name="port">9081</Set>
>>>>           <Set name="maxIdleTime">30000</Set>
>>>> <Set name="name">https-admin</Set>
>>>>         </New>
>>>>       </Arg>
>>>>     </Call>
>>>>
>>>> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>> <ma...@nanthrax.net>> wrote:
>>>>
>>>>     Hi Srikanth,
>>>>
>>>>     By default, the webconsole uses the default HTTP connector.
>>>>
>>>>     To change it, you can add:
>>>>
>>>>     etc/org.ops4j.pax.web.cfg
>>>>
>>>>     file and set:
>>>>
>>>>     org.osgi.service.http.port=__9999
>>>>
>>>>     The webconsole will be on port 9999 instead of the default 8181.
>>>>
>>>>     You can also use a etc/jetty.xml to specify connector and target
>>>>     some application on this connector.
>>>>
>>>>     You can take a look on this blog explaining this:
>>>>
>>>>     http://blog.nanthrax.net/2013/__02/multiple-http-connectors-
>>>> __in-apache-karaf/
>>>>     <http://blog.nanthrax.net/2013/02/multiple-http-
>>>> connectors-in-apache-karaf/>
>>>>
>>>>     Regards
>>>>     JB
>>>>
>>>>
>>>>     On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>>>>
>>>>         Hello,
>>>>
>>>>              I am using 3.0.x version of karaf and i have jetty with
>>>>         multiple
>>>>         connectors specified in jetty.xml file.
>>>>         I am installing the webconsole feature. But i would like to
>>>> provide
>>>>         access to webconsole with specific jetty coonector port.
>>>>
>>>>         How to configure to run webconsole with provided jetty
>>>> connector?
>>>>
>>>>
>>>>         --
>>>>            Srikanth
>>>>         www. <http://www.srikanthugar.in>gh__arki.com
>>>>         <http://gharki.com> <http://gharki.com>
>>>>
>>>>
>>>>
>>>>     --
>>>>     Jean-Baptiste Onofré
>>>>     jbonofre@apache.org <ma...@apache.org>
>>>>     http://blog.nanthrax.net
>>>>     Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>   Srikanth
>>>> www.srikanthugar.in <http://www.srikanthugar.in>
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>>
>> --
>>  Srikanth
>> www.srikanthugar.in
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> Software Architect / Project Manager / Scrum Master
>
>


-- 
 Srikanth
www.srikanthugar.in

Re: How to run karaf webconsole in different port

Posted by Achim Nierbeck <bc...@googlemail.com>.
Nope, it's not mandatory, it's only mandatory to have the WebContext-Path
as Manifest header in it to be regarded as WebApplicationBundle (WAB).
But I think it will still fail cause the WebConnector Manifest entry only
works for WABs. So you'll need to make use the second approach which is
described in detail here [1].
Which still might not work, cause I think the WebConsole isn't setup as a
Whiteboard application. In that case you'll need to add a jetty-web.xml to
the WebConsole bundle. This jetty-web.xml needs to point to one of your
connectors as virtual host. [2]

regards, Achim

[1] -
http://notizblog.nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/
[2] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/war-jetty-web/src/main/webapp/WEB-INF/jetty-web.xml


2014-09-17 9:24 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:

> Got it. Thanks.
>
> webconsole is a *jar *file. Is it mandatory to have as *.war* file to add
> We-Connectors header?
>
> Asking because i tried in the past and i doubt it works with jar file.
>
> On Wed, Sep 17, 2014 at 12:12 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Yes, it's the default behavior.
>>
>> You have to set WebConnector header in the manifest of WebConsole to
>> specify the connector to use.
>>
>> Regards
>> JB
>>
>>
>> On 09/17/2014 07:04 AM, Srikanth Hugar wrote:
>>
>>> Thank you for quick reply. I tried mentioned option already with port
>>> 8181 (org.osgi.service.http.port=8181). But once again that runs
>>> webconsole in all the ports, 8181,8081,9081. Please find details below.
>>>
>>> My connector configurations in jetty.xml is below. Basically 8081 and
>>> 9081 ports both with https(SSL).
>>>
>>> My plan is to run the different REST services with different ports, so
>>> that we can block one port from outside access.
>>>
>>> So basically now i want to run the webconsole with only 9081 port. But
>>> currently it is accessible from both 8081 and 9081 ports, not
>>> configuration helped me.
>>> If i configure org.osgi.service.http.port=8181, webconsole is accessable
>>> from all the ports, 8181,8081,9081.
>>>
>>> <Call name="addConnector">
>>>       <Arg>
>>>         <New class="org.eclipse.jetty.server.ssl.
>>> SslSelectChannelConnector">
>>>           <Arg>
>>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>>              ........................................................
>>>             </New>
>>>           </Arg>
>>>           <Set name="port">8081</Set>
>>>           <Set name="maxIdleTime">30000</Set>
>>> <Set name="name">https-user</Set>
>>>         </New>
>>>       </Arg>
>>>     </Call>
>>>     <Call name="addConnector">
>>>       <Arg>
>>>         <New class="org.eclipse.jetty.server.ssl.
>>> SslSelectChannelConnector">
>>>           <Arg>
>>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>>
>>> .......................................................................
>>>           </Arg>
>>>           <Set name="port">9081</Set>
>>>           <Set name="maxIdleTime">30000</Set>
>>> <Set name="name">https-admin</Set>
>>>         </New>
>>>       </Arg>
>>>     </Call>
>>>
>>> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> <ma...@nanthrax.net>> wrote:
>>>
>>>     Hi Srikanth,
>>>
>>>     By default, the webconsole uses the default HTTP connector.
>>>
>>>     To change it, you can add:
>>>
>>>     etc/org.ops4j.pax.web.cfg
>>>
>>>     file and set:
>>>
>>>     org.osgi.service.http.port=__9999
>>>
>>>     The webconsole will be on port 9999 instead of the default 8181.
>>>
>>>     You can also use a etc/jetty.xml to specify connector and target
>>>     some application on this connector.
>>>
>>>     You can take a look on this blog explaining this:
>>>
>>>     http://blog.nanthrax.net/2013/__02/multiple-http-connectors-
>>> __in-apache-karaf/
>>>     <http://blog.nanthrax.net/2013/02/multiple-http-
>>> connectors-in-apache-karaf/>
>>>
>>>     Regards
>>>     JB
>>>
>>>
>>>     On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>>>
>>>         Hello,
>>>
>>>              I am using 3.0.x version of karaf and i have jetty with
>>>         multiple
>>>         connectors specified in jetty.xml file.
>>>         I am installing the webconsole feature. But i would like to
>>> provide
>>>         access to webconsole with specific jetty coonector port.
>>>
>>>         How to configure to run webconsole with provided jetty connector?
>>>
>>>
>>>         --
>>>            Srikanth
>>>         www. <http://www.srikanthugar.in>gh__arki.com
>>>         <http://gharki.com> <http://gharki.com>
>>>
>>>
>>>
>>>     --
>>>     Jean-Baptiste Onofré
>>>     jbonofre@apache.org <ma...@apache.org>
>>>     http://blog.nanthrax.net
>>>     Talend - http://www.talend.com
>>>
>>>
>>>
>>>
>>> --
>>>   Srikanth
>>> www.srikanthugar.in <http://www.srikanthugar.in>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
>  Srikanth
> www.srikanthugar.in
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Re: How to run karaf webconsole in different port

Posted by Srikanth Hugar <sr...@gmail.com>.
Got it. Thanks.

webconsole is a *jar *file. Is it mandatory to have as *.war* file to add
We-Connectors header?

Asking because i tried in the past and i doubt it works with jar file.

On Wed, Sep 17, 2014 at 12:12 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Yes, it's the default behavior.
>
> You have to set WebConnector header in the manifest of WebConsole to
> specify the connector to use.
>
> Regards
> JB
>
>
> On 09/17/2014 07:04 AM, Srikanth Hugar wrote:
>
>> Thank you for quick reply. I tried mentioned option already with port
>> 8181 (org.osgi.service.http.port=8181). But once again that runs
>> webconsole in all the ports, 8181,8081,9081. Please find details below.
>>
>> My connector configurations in jetty.xml is below. Basically 8081 and
>> 9081 ports both with https(SSL).
>>
>> My plan is to run the different REST services with different ports, so
>> that we can block one port from outside access.
>>
>> So basically now i want to run the webconsole with only 9081 port. But
>> currently it is accessible from both 8081 and 9081 ports, not
>> configuration helped me.
>> If i configure org.osgi.service.http.port=8181, webconsole is accessable
>> from all the ports, 8181,8081,9081.
>>
>> <Call name="addConnector">
>>       <Arg>
>>         <New class="org.eclipse.jetty.server.ssl.
>> SslSelectChannelConnector">
>>           <Arg>
>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>              ........................................................
>>             </New>
>>           </Arg>
>>           <Set name="port">8081</Set>
>>           <Set name="maxIdleTime">30000</Set>
>> <Set name="name">https-user</Set>
>>         </New>
>>       </Arg>
>>     </Call>
>>     <Call name="addConnector">
>>       <Arg>
>>         <New class="org.eclipse.jetty.server.ssl.
>> SslSelectChannelConnector">
>>           <Arg>
>>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>>
>> .......................................................................
>>           </Arg>
>>           <Set name="port">9081</Set>
>>           <Set name="maxIdleTime">30000</Set>
>> <Set name="name">https-admin</Set>
>>         </New>
>>       </Arg>
>>     </Call>
>>
>> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>>     Hi Srikanth,
>>
>>     By default, the webconsole uses the default HTTP connector.
>>
>>     To change it, you can add:
>>
>>     etc/org.ops4j.pax.web.cfg
>>
>>     file and set:
>>
>>     org.osgi.service.http.port=__9999
>>
>>     The webconsole will be on port 9999 instead of the default 8181.
>>
>>     You can also use a etc/jetty.xml to specify connector and target
>>     some application on this connector.
>>
>>     You can take a look on this blog explaining this:
>>
>>     http://blog.nanthrax.net/2013/__02/multiple-http-connectors-
>> __in-apache-karaf/
>>     <http://blog.nanthrax.net/2013/02/multiple-http-
>> connectors-in-apache-karaf/>
>>
>>     Regards
>>     JB
>>
>>
>>     On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>>
>>         Hello,
>>
>>              I am using 3.0.x version of karaf and i have jetty with
>>         multiple
>>         connectors specified in jetty.xml file.
>>         I am installing the webconsole feature. But i would like to
>> provide
>>         access to webconsole with specific jetty coonector port.
>>
>>         How to configure to run webconsole with provided jetty connector?
>>
>>
>>         --
>>            Srikanth
>>         www. <http://www.srikanthugar.in>gh__arki.com
>>         <http://gharki.com> <http://gharki.com>
>>
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbonofre@apache.org <ma...@apache.org>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>>   Srikanth
>> www.srikanthugar.in <http://www.srikanthugar.in>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
 Srikanth
www.srikanthugar.in

Re: How to run karaf webconsole in different port

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, it's the default behavior.

You have to set WebConnector header in the manifest of WebConsole to 
specify the connector to use.

Regards
JB

On 09/17/2014 07:04 AM, Srikanth Hugar wrote:
> Thank you for quick reply. I tried mentioned option already with port
> 8181 (org.osgi.service.http.port=8181). But once again that runs
> webconsole in all the ports, 8181,8081,9081. Please find details below.
>
> My connector configurations in jetty.xml is below. Basically 8081 and
> 9081 ports both with https(SSL).
>
> My plan is to run the different REST services with different ports, so
> that we can block one port from outside access.
>
> So basically now i want to run the webconsole with only 9081 port. But
> currently it is accessible from both 8081 and 9081 ports, not
> configuration helped me.
> If i configure org.osgi.service.http.port=8181, webconsole is accessable
> from all the ports, 8181,8081,9081.
>
> <Call name="addConnector">
>       <Arg>
>         <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>           <Arg>
>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>              ........................................................
>             </New>
>           </Arg>
>           <Set name="port">8081</Set>
>           <Set name="maxIdleTime">30000</Set>
> <Set name="name">https-user</Set>
>         </New>
>       </Arg>
>     </Call>
>     <Call name="addConnector">
>       <Arg>
>         <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>           <Arg>
>             <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>
> .......................................................................
>           </Arg>
>           <Set name="port">9081</Set>
>           <Set name="maxIdleTime">30000</Set>
> <Set name="name">https-admin</Set>
>         </New>
>       </Arg>
>     </Call>
>
> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi Srikanth,
>
>     By default, the webconsole uses the default HTTP connector.
>
>     To change it, you can add:
>
>     etc/org.ops4j.pax.web.cfg
>
>     file and set:
>
>     org.osgi.service.http.port=__9999
>
>     The webconsole will be on port 9999 instead of the default 8181.
>
>     You can also use a etc/jetty.xml to specify connector and target
>     some application on this connector.
>
>     You can take a look on this blog explaining this:
>
>     http://blog.nanthrax.net/2013/__02/multiple-http-connectors-__in-apache-karaf/
>     <http://blog.nanthrax.net/2013/02/multiple-http-connectors-in-apache-karaf/>
>
>     Regards
>     JB
>
>
>     On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>
>         Hello,
>
>              I am using 3.0.x version of karaf and i have jetty with
>         multiple
>         connectors specified in jetty.xml file.
>         I am installing the webconsole feature. But i would like to provide
>         access to webconsole with specific jetty coonector port.
>
>         How to configure to run webconsole with provided jetty connector?
>
>
>         --
>            Srikanth
>         www. <http://www.srikanthugar.in>gh__arki.com
>         <http://gharki.com> <http://gharki.com>
>
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>
>
>
> --
>   Srikanth
> www.srikanthugar.in <http://www.srikanthugar.in>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: How to run karaf webconsole in different port

Posted by Srikanth Hugar <sr...@gmail.com>.
Thank you for quick reply. I tried mentioned option already with port
8181 (org.osgi.service.http.port=8181).
But once again that runs webconsole in all the ports, 8181,8081,9081.
Please find details below.

My connector configurations in jetty.xml is below. Basically 8081 and 9081
ports both with https(SSL).

My plan is to run the different REST services with different ports, so that
we can block one port from outside access.

So basically now i want to run the webconsole with only 9081 port. But
currently it is accessible from both 8081 and 9081 ports, not configuration
helped me.
If i configure org.osgi.service.http.port=8181, webconsole is accessable
from all the ports, 8181,8081,9081.

<Call name="addConnector">
     <Arg>
       <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
         <Arg>
           <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
            ........................................................
           </New>
         </Arg>
         <Set name="port">8081</Set>
         <Set name="maxIdleTime">30000</Set>
 <Set name="name">https-user</Set>
       </New>
     </Arg>
   </Call>

   <Call name="addConnector">
     <Arg>
       <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
         <Arg>
           <New class="org.eclipse.jetty.http.ssl.SslContextFactory">

.......................................................................
         </Arg>
         <Set name="port">9081</Set>
         <Set name="maxIdleTime">30000</Set>
 <Set name="name">https-admin</Set>
       </New>
     </Arg>
   </Call>

On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Srikanth,
>
> By default, the webconsole uses the default HTTP connector.
>
> To change it, you can add:
>
> etc/org.ops4j.pax.web.cfg
>
> file and set:
>
> org.osgi.service.http.port=9999
>
> The webconsole will be on port 9999 instead of the default 8181.
>
> You can also use a etc/jetty.xml to specify connector and target some
> application on this connector.
>
> You can take a look on this blog explaining this:
>
> http://blog.nanthrax.net/2013/02/multiple-http-connectors-in-apache-karaf/
>
> Regards
> JB
>
>
> On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>
>> Hello,
>>
>>     I am using 3.0.x version of karaf and i have jetty with multiple
>> connectors specified in jetty.xml file.
>> I am installing the webconsole feature. But i would like to provide
>> access to webconsole with specific jetty coonector port.
>>
>> How to configure to run webconsole with provided jetty connector?
>>
>>
>> --
>>   Srikanth
>> www. <http://www.srikanthugar.in>gharki.com <http://gharki.com>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
 Srikanth
www.srikanthugar.in

Re: How to run karaf webconsole in different port

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Srikanth,

By default, the webconsole uses the default HTTP connector.

To change it, you can add:

etc/org.ops4j.pax.web.cfg

file and set:

org.osgi.service.http.port=9999

The webconsole will be on port 9999 instead of the default 8181.

You can also use a etc/jetty.xml to specify connector and target some 
application on this connector.

You can take a look on this blog explaining this:

http://blog.nanthrax.net/2013/02/multiple-http-connectors-in-apache-karaf/

Regards
JB

On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
> Hello,
>
>     I am using 3.0.x version of karaf and i have jetty with multiple
> connectors specified in jetty.xml file.
> I am installing the webconsole feature. But i would like to provide
> access to webconsole with specific jetty coonector port.
>
> How to configure to run webconsole with provided jetty connector?
>
>
> --
>   Srikanth
> www. <http://www.srikanthugar.in>gharki.com <http://gharki.com>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com