You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2015/04/30 23:35:13 UTC

Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property. 

Is this:
   1 - Bug, because it should be configurable property 
   2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
   3 - Documentation bug
   4 - Enhancement with the expected behavior of ___ (1 or 2)

Paul Spencer



Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Paul Spencer <pa...@apache.org>.
JB,
More information about the installation:

Apache Karaf (3.0.3)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit 'system:shutdown' to shutdown Karaf.
Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.

karaf@repository()> feature:list -i
Name                | Version          | Installed | Repository              | Description                                       
---------------------------------------------------------------------------------------------------------------------------------
cave-server         | 3.0.0            | x         | karaf-cave-3.0.0        |                                                   
pax-jetty           | 8.1.15.v20140411 | x         | org.ops4j.pax.web-3.1.4 | Provide Jetty engine support                      
pax-http            | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Implementation of the OSGI HTTP Service           
pax-http-whiteboard | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Provide HTTP Whiteboard pattern support           
pax-war             | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Provide support of a full WebContainer            
standard            | 3.0.3            | x         | standard-3.0.3          | Karaf standard feature                            
obr                 | 3.0.3            | x         | standard-3.0.3          | Provide OSGi Bundle Repository (OBR) support      
config              | 3.0.3            | x         | standard-3.0.3          | Provide OSGi ConfigAdmin support                  
region              | 3.0.3            | x         | standard-3.0.3          | Provide Region Support                            
package             | 3.0.3            | x         | standard-3.0.3          | Package commands and mbeans                       
http                | 3.0.3            | x         | standard-3.0.3          | Implementation of the OSGI HTTP Service           
war                 | 3.0.3            | x         | standard-3.0.3          | Turn Karaf as a full WebContainer                 
kar                 | 3.0.3            | x         | standard-3.0.3          | Provide KAR (KARaf archive) support               
ssh                 | 3.0.3            | x         | standard-3.0.3          | Provide a SSHd server on Karaf                    
management          | 3.0.3            | x         | standard-3.0.3          | Provide a JMX MBeanServer and a set of MBeans in K
karaf@repository()> bundle:list
START LEVEL 100 , List Threshold: 50
ID | State  | Lvl | Version | Name                                        
---------------------------------------------------------------------------
103 | Active |  80 | 2.4.0   | Commons IO                                  
104 | Active |  80 | 4.3.2   | Apache Apache HttpCore OSGi bundle          
105 | Active |  80 | 4.3.4   | Apache Apache HttpClient OSGi bundle        
106 | Active |  80 | 1.7.3   | jsoup                                       
107 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: API       
108 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Storage   
109 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Management
110 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Command   
111 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: HTTP      
karaf@repository()> 


Paul Spencer


> On May 1, 2015, at 1:04 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Cave 3.0.0 doesn't install it. I'm pretty sure it comes from cxf/pax-web feature.
> 
> Let me try with Karaf 3.0.0 and Cave 3.0.0.
> 
> Regards
> JB
> 
> On 05/01/2015 06:53 PM, Paul Spencer wrote:
>> JB,
>> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
>> 
>> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>> 
>> ***
>> * From Karaf.log
>> ***
>> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
>> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
>> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
>> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
>> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
>> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
>> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
>> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
>> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
>> 
>> ***
>> * Grep for port number in etc/*
>> ***
>> [etc]$ grep 8181 *
>> [etc]$ grep 9191 *
>> jetty.xml:                    <Property name="jetty.port" default="9191" />
>> [etc]$
>> 
>> 
>> ***
>> * Steps to recreate
>> ***
>> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
>> - Connect to the root instance of Karaf
>> bin/client -u karaf
>> 
>> - Create and start an instance called repository while connected to the root instance.
>> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
>> instance:start repository
>> 
>> - Connect to the repository instance and install cave then create a repository.
>> instance:connect -u karaf -p karaf repository
>> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
>> feature:install cave-server
>> cave:repository-create app_patching
>> cave:repositories
>> 
>> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
>> 
>> Paul Spencer
>> 
>> 
>> 
>>> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>> 
>>> Hi Paul,
>>> 
>>> both are possible: it depends of the org.ops4j.pax.web.cfg file.
>>> 
>>> The org.osgi.service.http.port contains the port.
>>> 
>>> For instance, containing 8888.
>>> 
>>> In the jetty.xml, you have something like:
>>> 
>>>            <Set name="port">
>>>                <Property name="jetty.port" default="8181"/>
>>>            </Set>
>>> 
>>> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
>>> 
>>> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
>>> 
>>> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
>>> 
>>> Thanks,
>>> Regards
>>> JB
>>> 
>>> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>>>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>>>> 
>>>> Is this:
>>>> 1 - Bug, because it should be configurable property
>>>> 2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>>> 3 - Documentation bug
>>>> 4 - Enhancement with the expected behavior of ___ (1 or 2)
>>>> 
>>>> Paul Spencer
>>>> 
>>>> 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Paul Spencer <pa...@apache.org>.
JB,
More information about the installation:

 Apache Karaf (3.0.3)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit 'system:shutdown' to shutdown Karaf.
Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.

karaf@repository()> feature:list -i
Name                | Version          | Installed | Repository              | Description                                       
---------------------------------------------------------------------------------------------------------------------------------
cave-server         | 3.0.0            | x         | karaf-cave-3.0.0        |                                                   
pax-jetty           | 8.1.15.v20140411 | x         | org.ops4j.pax.web-3.1.4 | Provide Jetty engine support                      
pax-http            | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Implementation of the OSGI HTTP Service           
pax-http-whiteboard | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Provide HTTP Whiteboard pattern support           
pax-war             | 3.1.4            | x         | org.ops4j.pax.web-3.1.4 | Provide support of a full WebContainer            
standard            | 3.0.3            | x         | standard-3.0.3          | Karaf standard feature                            
obr                 | 3.0.3            | x         | standard-3.0.3          | Provide OSGi Bundle Repository (OBR) support      
config              | 3.0.3            | x         | standard-3.0.3          | Provide OSGi ConfigAdmin support                  
region              | 3.0.3            | x         | standard-3.0.3          | Provide Region Support                            
package             | 3.0.3            | x         | standard-3.0.3          | Package commands and mbeans                       
http                | 3.0.3            | x         | standard-3.0.3          | Implementation of the OSGI HTTP Service           
war                 | 3.0.3            | x         | standard-3.0.3          | Turn Karaf as a full WebContainer                 
kar                 | 3.0.3            | x         | standard-3.0.3          | Provide KAR (KARaf archive) support               
ssh                 | 3.0.3            | x         | standard-3.0.3          | Provide a SSHd server on Karaf                    
management          | 3.0.3            | x         | standard-3.0.3          | Provide a JMX MBeanServer and a set of MBeans in K
karaf@repository()> bundle:list
START LEVEL 100 , List Threshold: 50
ID | State  | Lvl | Version | Name                                        
---------------------------------------------------------------------------
103 | Active |  80 | 2.4.0   | Commons IO                                  
104 | Active |  80 | 4.3.2   | Apache Apache HttpCore OSGi bundle          
105 | Active |  80 | 4.3.4   | Apache Apache HttpClient OSGi bundle        
106 | Active |  80 | 1.7.3   | jsoup                                       
107 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: API       
108 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Storage   
109 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Management
110 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: Command   
111 | Active |  80 | 3.0.0   | Apache Karaf :: Cave :: Server :: HTTP      
karaf@repository()> 


Paul Spencer


> On May 1, 2015, at 1:04 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Cave 3.0.0 doesn't install it. I'm pretty sure it comes from cxf/pax-web feature.
> 
> Let me try with Karaf 3.0.0 and Cave 3.0.0.
> 
> Regards
> JB
> 
> On 05/01/2015 06:53 PM, Paul Spencer wrote:
>> JB,
>> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
>> 
>> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>> 
>> ***
>> * From Karaf.log
>> ***
>> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
>> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
>> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
>> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
>> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
>> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
>> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
>> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
>> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
>> 
>> ***
>> * Grep for port number in etc/*
>> ***
>> [etc]$ grep 8181 *
>> [etc]$ grep 9191 *
>> jetty.xml:                    <Property name="jetty.port" default="9191" />
>> [etc]$
>> 
>> 
>> ***
>> * Steps to recreate
>> ***
>> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
>> - Connect to the root instance of Karaf
>> bin/client -u karaf
>> 
>> - Create and start an instance called repository while connected to the root instance.
>> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
>> instance:start repository
>> 
>> - Connect to the repository instance and install cave then create a repository.
>> instance:connect -u karaf -p karaf repository
>> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
>> feature:install cave-server
>> cave:repository-create app_patching
>> cave:repositories
>> 
>> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
>> 
>> Paul Spencer
>> 
>> 
>> 
>>> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>> 
>>> Hi Paul,
>>> 
>>> both are possible: it depends of the org.ops4j.pax.web.cfg file.
>>> 
>>> The org.osgi.service.http.port contains the port.
>>> 
>>> For instance, containing 8888.
>>> 
>>> In the jetty.xml, you have something like:
>>> 
>>>             <Set name="port">
>>>                 <Property name="jetty.port" default="8181"/>
>>>             </Set>
>>> 
>>> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
>>> 
>>> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
>>> 
>>> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
>>> 
>>> Thanks,
>>> Regards
>>> JB
>>> 
>>> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>>>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>>>> 
>>>> Is this:
>>>> 1 - Bug, because it should be configurable property
>>>> 2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>>> 3 - Documentation bug
>>>> 4 - Enhancement with the expected behavior of ___ (1 or 2)
>>>> 
>>>> Paul Spencer
>>>> 
>>>> 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Cave 3.0.0 doesn't install it. I'm pretty sure it comes from cxf/pax-web 
feature.

Let me try with Karaf 3.0.0 and Cave 3.0.0.

Regards
JB

On 05/01/2015 06:53 PM, Paul Spencer wrote:
> JB,
> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
>
> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>
> ***
> * From Karaf.log
> ***
> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
>
> ***
> * Grep for port number in etc/*
> ***
> [etc]$ grep 8181 *
> [etc]$ grep 9191 *
> jetty.xml:                    <Property name="jetty.port" default="9191" />
> [etc]$
>
>
> ***
> * Steps to recreate
> ***
> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
> - Connect to the root instance of Karaf
> bin/client -u karaf
>
> - Create and start an instance called repository while connected to the root instance.
> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
> instance:start repository
>
> - Connect to the repository instance and install cave then create a repository.
> instance:connect -u karaf -p karaf repository
> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
> feature:install cave-server
> cave:repository-create app_patching
> cave:repositories
>
> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
>
> Paul Spencer
>
>
>
>> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>
>> Hi Paul,
>>
>> both are possible: it depends of the org.ops4j.pax.web.cfg file.
>>
>> The org.osgi.service.http.port contains the port.
>>
>> For instance, containing 8888.
>>
>> In the jetty.xml, you have something like:
>>
>>               <Set name="port">
>>                   <Property name="jetty.port" default="8181"/>
>>               </Set>
>>
>> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
>>
>> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
>>
>> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>>>
>>> Is this:
>>>   1 - Bug, because it should be configurable property
>>>   2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>>   3 - Documentation bug
>>>   4 - Enhancement with the expected behavior of ___ (1 or 2)
>>>
>>> Paul Spencer
>>>
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

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

Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Correct, and I checked the etc/jetty.xml is provided by pax-web features.

Regards
JB

On 05/01/2015 09:54 PM, Achim Nierbeck wrote:
> Hi,
>
> creating an additional connector via the jetty.xml isn't a bug.
> The port for pax-web is set in the org.ops4j.pax.web.cfg
> which doesn't necessarily be in a configuration file.
> You'll find this configuration with the config:* commands.
> There you'll find the config
> org.osgi.service.http.port=8181
>
> regards, Achim
>
> 2015-05-01 18:53 GMT+02:00 Paul Spencer <paulsp@apache.org
> <ma...@apache.org>>:
>
>     JB,
>     In my use case etc/jetty.xml was created by feature:install
>     cave-server and org.osgi.service.http.port does not exist in etc/*.
>
>     What is interesting, when the port in etc/jetty.xml is changed to
>     9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>
>     ***
>     * From Karaf.log
>     ***
>     2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator
>                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4
>     | EventAdmin support is not available, no servlet events will be posted!
>     2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator
>                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4
>     | LogService support enabled, log events will be created.
>     2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator
>                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4
>     | Pax Web started
>     2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server
>                       | 77 -
>     org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
>     jetty-8.1.15.v20140411
>     2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  |
>     AbstractConnector                | 77 -
>     org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
>     Started SelectChannelConnector@0.0.0.0:9191
>     <http://SelectChannelConnector@0.0.0.0:9191>
>     2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  |
>     JettyServerImpl                  | 86 -
>     org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at
>     [0.0.0.0]:[9191]
>     2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  |
>     JettyServerImpl                  | 86 -
>     org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at
>     [0.0.0.0]:[8181]
>     2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  |
>     AbstractConnector                | 77 -
>     org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
>     Started NIOSocketConnectorWrapper@0.0.0.0:8181
>     <http://NIOSocketConnectorWrapper@0.0.0.0:8181>
>     2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  |
>     HttpServiceFactoryImpl           | 85 -
>     org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle:
>     [org.apache.karaf.cave.server.http [111]] to http service
>
>     ***
>     * Grep for port number in etc/*
>     ***
>     [etc]$ grep 8181 *
>     [etc]$ grep 9191 *
>     jetty.xml:                    <Property name="jetty.port"
>     default="9191" />
>     [etc]$
>
>
>     ***
>     * Steps to recreate
>     ***
>     Steps to I used to install a cave instance and "app_patching"
>     repostory in Karaf 3.0.3.
>     - Connect to the root instance of Karaf
>     bin/client -u karaf
>
>     - Create and start an instance called repository while connected to
>     the root instance.
>     instance:create --location ${user.home}/cave-repository --ssh-port
>     8106 repository
>     instance:start repository
>
>     - Connect to the repository instance and install cave then create a
>     repository.
>     instance:connect -u karaf -p karaf repository
>     feature:repo-add
>     mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
>     feature:install cave-server
>     cave:repository-create app_patching
>     cave:repositories
>
>     At this point you can shutdown the repository instance and update
>     the port in ${user.home}/cave-repository/etc/jetty.xml
>
>     Paul Spencer
>
>
>
>      > On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré
>     <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>      >
>      > Hi Paul,
>      >
>      > both are possible: it depends of the org.ops4j.pax.web.cfg file.
>      >
>      > The org.osgi.service.http.port contains the port.
>      >
>      > For instance, containing 8888.
>      >
>      > In the jetty.xml, you have something like:
>      >
>      >              <Set name="port">
>      >                  <Property name="jetty.port" default="8181"/>
>      >              </Set>
>      >
>      > In that case, the 8181 port number is not used, instead it's the
>     8888 (as defined in the property).
>      >
>      > Anyway, Cave server itself doesn't provision etc/jetty.xml (just
>     a CXF config file).
>      >
>      > Can you check that this jetty.xml doesn't come from another
>     feature (or your provisioning) ?
>      >
>      > Thanks,
>      > Regards
>      > JB
>      >
>      > On 04/30/2015 11:35 PM, Paul Spencer wrote:
>      >> I noticed the TCP port opened by the Cave HTTP server is defined
>     in /etc/jetty.xml instead of a configured property.
>      >>
>      >> Is this:
>      >>  1 - Bug, because it should be configurable property
>      >>  2 - Bug, because it should us the pax-web port ( pid =
>     org.ops4j.pax.web property = org.osgi.service.http.port)
>      >>  3 - Documentation bug
>      >>  4 - Enhancement with the expected behavior of ___ (1 or 2)
>      >>
>      >> Paul Spencer
>      >>
>      >>
>      >
>      > --
>      > Jean-Baptiste Onofré
>      > jbonofre@apache.org <ma...@apache.org>
>      > http://blog.nanthrax.net
>      > Talend - http://www.talend.com
>
>
>
>
> --
>
> 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/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>

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

Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Paul Spencer <pa...@intekon.com>.
JB,
I did not realize the property org.osgi.service.http.port defaulted to 8181 even when the property file org.ops4j.pax.web.cfg did not exist. Now I know :)

Paul Spencer


> On May 4, 2015, at 11:00 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> It's what I said in a previous e-mail:
> 
> "The org.osgi.service.http.port contains the port."
> 
> Not sure I understood your issue ;)
> 
> Regards
> JB
> 
> On 05/04/2015 04:55 PM, Paul Spencer wrote:
>> Achim,
>> Setting the property org.osgi.service.http.port worked.  Now Cave is listening on one port, 9191.
>> 
>> karaf@repository()> config
>> karaf@repository(config)> edit org.ops4j.pax.web
>> karaf@repository(config)> property-set org.osgi.service.http.port 9191
>> karaf@repository(config)> property-list
>>    org.osgi.service.http.port = 9191
>> karaf@repository(config)> update
>> karaf@repository(config)> exit
>> 
>> 
>> Paul Spencer
>> 
>>> On May 1, 2015, at 3:54 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
>>> 
>>> Hi,
>>> 
>>> creating an additional connector via the jetty.xml isn't a bug.
>>> The port for pax-web is set in the org.ops4j.pax.web.cfg
>>> which doesn't necessarily be in a configuration file.
>>> You'll find this configuration with the config:* commands.
>>> There you'll find the config
>>> org.osgi.service.http.port=8181
>>> 
>>> regards, Achim
>>> 
>>> 2015-05-01 18:53 GMT+02:00 Paul Spencer <pa...@apache.org>:
>>> JB,
>>> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
>>> 
>>> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>>> 
>>> ***
>>> * From Karaf.log
>>> ***
>>> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
>>> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
>>> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
>>> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
>>> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
>>> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
>>> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
>>> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
>>> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
>>> 
>>> ***
>>> * Grep for port number in etc/*
>>> ***
>>> [etc]$ grep 8181 *
>>> [etc]$ grep 9191 *
>>> jetty.xml:                    <Property name="jetty.port" default="9191" />
>>> [etc]$
>>> 
>>> 
>>> ***
>>> * Steps to recreate
>>> ***
>>> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
>>> - Connect to the root instance of Karaf
>>> bin/client -u karaf
>>> 
>>> - Create and start an instance called repository while connected to the root instance.
>>> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
>>> instance:start repository
>>> 
>>> - Connect to the repository instance and install cave then create a repository.
>>> instance:connect -u karaf -p karaf repository
>>> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
>>> feature:install cave-server
>>> cave:repository-create app_patching
>>> cave:repositories
>>> 
>>> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
>>> 
>>> Paul Spencer
>>> 
>>> 
>>> 
>>>> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>> 
>>>> Hi Paul,
>>>> 
>>>> both are possible: it depends of the org.ops4j.pax.web.cfg file.
>>>> 
>>>> The org.osgi.service.http.port contains the port.
>>>> 
>>>> For instance, containing 8888.
>>>> 
>>>> In the jetty.xml, you have something like:
>>>> 
>>>>              <Set name="port">
>>>>                  <Property name="jetty.port" default="8181"/>
>>>>              </Set>
>>>> 
>>>> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
>>>> 
>>>> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
>>>> 
>>>> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
>>>> 
>>>> Thanks,
>>>> Regards
>>>> JB
>>>> 
>>>> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>>>>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>>>>> 
>>>>> Is this:
>>>>>  1 - Bug, because it should be configurable property
>>>>>  2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>>>>  3 - Documentation bug
>>>>>  4 - Enhancement with the expected behavior of ___ (1 or 2)
>>>>> 
>>>>> Paul Spencer
>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>> 
>>> 
>>> 
>>> 
>>> --
>>> 
>>> 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/>
>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>> 
>>> Software Architect / Project Manager / Scrum Master
>>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It's what I said in a previous e-mail:

"The org.osgi.service.http.port contains the port."

Not sure I understood your issue ;)

Regards
JB

On 05/04/2015 04:55 PM, Paul Spencer wrote:
> Achim,
> Setting the property org.osgi.service.http.port worked.  Now Cave is listening on one port, 9191.
>
> karaf@repository()> config
> karaf@repository(config)> edit org.ops4j.pax.web
> karaf@repository(config)> property-set org.osgi.service.http.port 9191
> karaf@repository(config)> property-list
>     org.osgi.service.http.port = 9191
> karaf@repository(config)> update
> karaf@repository(config)> exit
>
>
> Paul Spencer
>
>> On May 1, 2015, at 3:54 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
>>
>> Hi,
>>
>> creating an additional connector via the jetty.xml isn't a bug.
>> The port for pax-web is set in the org.ops4j.pax.web.cfg
>> which doesn't necessarily be in a configuration file.
>> You'll find this configuration with the config:* commands.
>> There you'll find the config
>> org.osgi.service.http.port=8181
>>
>> regards, Achim
>>
>> 2015-05-01 18:53 GMT+02:00 Paul Spencer <pa...@apache.org>:
>> JB,
>> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
>>
>> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
>>
>> ***
>> * From Karaf.log
>> ***
>> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
>> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
>> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
>> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
>> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
>> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
>> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
>> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
>> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
>>
>> ***
>> * Grep for port number in etc/*
>> ***
>> [etc]$ grep 8181 *
>> [etc]$ grep 9191 *
>> jetty.xml:                    <Property name="jetty.port" default="9191" />
>> [etc]$
>>
>>
>> ***
>> * Steps to recreate
>> ***
>> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
>> - Connect to the root instance of Karaf
>> bin/client -u karaf
>>
>> - Create and start an instance called repository while connected to the root instance.
>> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
>> instance:start repository
>>
>> - Connect to the repository instance and install cave then create a repository.
>> instance:connect -u karaf -p karaf repository
>> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
>> feature:install cave-server
>> cave:repository-create app_patching
>> cave:repositories
>>
>> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
>>
>> Paul Spencer
>>
>>
>>
>>> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>
>>> Hi Paul,
>>>
>>> both are possible: it depends of the org.ops4j.pax.web.cfg file.
>>>
>>> The org.osgi.service.http.port contains the port.
>>>
>>> For instance, containing 8888.
>>>
>>> In the jetty.xml, you have something like:
>>>
>>>               <Set name="port">
>>>                   <Property name="jetty.port" default="8181"/>
>>>               </Set>
>>>
>>> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
>>>
>>> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
>>>
>>> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>>>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>>>>
>>>> Is this:
>>>>   1 - Bug, because it should be configurable property
>>>>   2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>>>   3 - Documentation bug
>>>>   4 - Enhancement with the expected behavior of ___ (1 or 2)
>>>>
>>>> Paul Spencer
>>>>
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>>
>> 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/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>

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

Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Paul Spencer <pa...@apache.org>.
Achim,
Setting the property org.osgi.service.http.port worked.  Now Cave is listening on one port, 9191.

karaf@repository()> config
karaf@repository(config)> edit org.ops4j.pax.web
karaf@repository(config)> property-set org.osgi.service.http.port 9191
karaf@repository(config)> property-list
   org.osgi.service.http.port = 9191
karaf@repository(config)> update
karaf@repository(config)> exit


Paul Spencer

> On May 1, 2015, at 3:54 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi, 
> 
> creating an additional connector via the jetty.xml isn't a bug. 
> The port for pax-web is set in the org.ops4j.pax.web.cfg
> which doesn't necessarily be in a configuration file. 
> You'll find this configuration with the config:* commands. 
> There you'll find the config
> org.osgi.service.http.port=8181
> 
> regards, Achim 
> 
> 2015-05-01 18:53 GMT+02:00 Paul Spencer <pa...@apache.org>:
> JB,
> In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.
> 
> What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug?
> 
> ***
> * From Karaf.log
> ***
> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service
> 
> ***
> * Grep for port number in etc/*
> ***
> [etc]$ grep 8181 *
> [etc]$ grep 9191 *
> jetty.xml:                    <Property name="jetty.port" default="9191" />
> [etc]$
> 
> 
> ***
> * Steps to recreate
> ***
> Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3.
> - Connect to the root instance of Karaf
> bin/client -u karaf
> 
> - Create and start an instance called repository while connected to the root instance.
> instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
> instance:start repository
> 
> - Connect to the repository instance and install cave then create a repository.
> instance:connect -u karaf -p karaf repository
> feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
> feature:install cave-server
> cave:repository-create app_patching
> cave:repositories
> 
> At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml
> 
> Paul Spencer
> 
> 
> 
> > On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> >
> > Hi Paul,
> >
> > both are possible: it depends of the org.ops4j.pax.web.cfg file.
> >
> > The org.osgi.service.http.port contains the port.
> >
> > For instance, containing 8888.
> >
> > In the jetty.xml, you have something like:
> >
> >              <Set name="port">
> >                  <Property name="jetty.port" default="8181"/>
> >              </Set>
> >
> > In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
> >
> > Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
> >
> > Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 04/30/2015 11:35 PM, Paul Spencer wrote:
> >> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
> >>
> >> Is this:
> >>  1 - Bug, because it should be configurable property
> >>  2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
> >>  3 - Documentation bug
> >>  4 - Enhancement with the expected behavior of ___ (1 or 2)
> >>
> >> Paul Spencer
> >>
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> 
> 
> 
> 
> -- 
> 
> 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/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

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

creating an additional connector via the jetty.xml isn't a bug.
The port for pax-web is set in the org.ops4j.pax.web.cfg
which doesn't necessarily be in a configuration file.
You'll find this configuration with the config:* commands.
There you'll find the config
org.osgi.service.http.port=8181

regards, Achim

2015-05-01 18:53 GMT+02:00 Paul Spencer <pa...@apache.org>:

> JB,
> In my use case etc/jetty.xml was created by feature:install cave-server
> and org.osgi.service.http.port does not exist in etc/*.
>
> What is interesting, when the port in etc/jetty.xml is changed to 9191,
> cave http wrapper responds on port 8181 and 9191.  Bug?
>
> ***
> * From Karaf.log
> ***
> 2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator
>             | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin
> support is not available, no servlet events will be posted!
> 2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator
>             | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService
> support enabled, log events will be created.
> 2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator
>             | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web
> started
> 2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server
>            | 77 - org.eclipse.jetty.aggregate.jetty-all-server -
> 8.1.15.v20140411 | jetty-8.1.15.v20140411
> 2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector
>             | 77 - org.eclipse.jetty.aggregate.jetty-all-server -
> 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
> 2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl
>             | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web
> available at [0.0.0.0]:[9191]
> 2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl
>             | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web
> available at [0.0.0.0]:[8181]
> 2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector
>             | 77 - org.eclipse.jetty.aggregate.jetty-all-server -
> 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
> 2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  |
> HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime -
> 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http
> service
>
> ***
> * Grep for port number in etc/*
> ***
> [etc]$ grep 8181 *
> [etc]$ grep 9191 *
> jetty.xml:                    <Property name="jetty.port" default="9191" />
> [etc]$
>
>
> ***
> * Steps to recreate
> ***
> Steps to I used to install a cave instance and "app_patching" repostory in
> Karaf 3.0.3.
> - Connect to the root instance of Karaf
> bin/client -u karaf
>
> - Create and start an instance called repository while connected to the
> root instance.
> instance:create --location ${user.home}/cave-repository --ssh-port 8106
> repository
> instance:start repository
>
> - Connect to the repository instance and install cave then create a
> repository.
> instance:connect -u karaf -p karaf repository
> feature:repo-add
> mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features
> feature:install cave-server
> cave:repository-create app_patching
> cave:repositories
>
> At this point you can shutdown the repository instance and update the port
> in ${user.home}/cave-repository/etc/jetty.xml
>
> Paul Spencer
>
>
>
> > On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
> >
> > Hi Paul,
> >
> > both are possible: it depends of the org.ops4j.pax.web.cfg file.
> >
> > The org.osgi.service.http.port contains the port.
> >
> > For instance, containing 8888.
> >
> > In the jetty.xml, you have something like:
> >
> >              <Set name="port">
> >                  <Property name="jetty.port" default="8181"/>
> >              </Set>
> >
> > In that case, the 8181 port number is not used, instead it's the 8888
> (as defined in the property).
> >
> > Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF
> config file).
> >
> > Can you check that this jetty.xml doesn't come from another feature (or
> your provisioning) ?
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 04/30/2015 11:35 PM, Paul Spencer wrote:
> >> I noticed the TCP port opened by the Cave HTTP server is defined in
> /etc/jetty.xml instead of a configured property.
> >>
> >> Is this:
> >>  1 - Bug, because it should be configurable property
> >>  2 - Bug, because it should us the pax-web port ( pid =
> org.ops4j.pax.web property = org.osgi.service.http.port)
> >>  3 - Documentation bug
> >>  4 - Enhancement with the expected behavior of ___ (1 or 2)
> >>
> >> Paul Spencer
> >>
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
>
>


-- 

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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

Posted by Paul Spencer <pa...@apache.org>.
JB,
In my use case etc/jetty.xml was created by feature:install cave-server and org.osgi.service.http.port does not exist in etc/*.  

What is interesting, when the port in etc/jetty.xml is changed to 9191, cave http wrapper responds on port 8181 and 9191.  Bug? 

***
* From Karaf.log
***
2015-05-01 11:28:52,175 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support is not available, no servlet events will be posted!
2015-05-01 11:28:52,186 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support enabled, log events will be created.
2015-05-01 11:28:52,195 | INFO  | FelixStartLevel  | Activator                        | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
2015-05-01 11:28:52,495 | INFO  | pool-6-thread-1  | Server                           | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | jetty-8.1.15.v20140411
2015-05-01 11:28:52,659 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started SelectChannelConnector@0.0.0.0:9191
2015-05-01 11:28:52,660 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[9191]
2015-05-01 11:28:52,661 | INFO  | pool-6-thread-1  | JettyServerImpl                  | 86 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at [0.0.0.0]:[8181]
2015-05-01 11:28:52,668 | INFO  | pool-6-thread-1  | AbstractConnector                | 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | Started NIOSocketConnectorWrapper@0.0.0.0:8181
2015-05-01 11:28:53,446 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl           | 85 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle: [org.apache.karaf.cave.server.http [111]] to http service

***
* Grep for port number in etc/*
***
[etc]$ grep 8181 *
[etc]$ grep 9191 *
jetty.xml:                    <Property name="jetty.port" default="9191" />
[etc]$ 


***
* Steps to recreate
***
Steps to I used to install a cave instance and "app_patching" repostory in Karaf 3.0.3. 
- Connect to the root instance of Karaf
bin/client -u karaf

- Create and start an instance called repository while connected to the root instance.
instance:create --location ${user.home}/cave-repository --ssh-port 8106 repository
instance:start repository 

- Connect to the repository instance and install cave then create a repository.
instance:connect -u karaf -p karaf repository 
feature:repo-add mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/xml/features   
feature:install cave-server
cave:repository-create app_patching
cave:repositories

At this point you can shutdown the repository instance and update the port in ${user.home}/cave-repository/etc/jetty.xml

Paul Spencer



> On May 1, 2015, at 12:09 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Hi Paul,
> 
> both are possible: it depends of the org.ops4j.pax.web.cfg file.
> 
> The org.osgi.service.http.port contains the port.
> 
> For instance, containing 8888.
> 
> In the jetty.xml, you have something like:
> 
>              <Set name="port">
>                  <Property name="jetty.port" default="8181"/>
>              </Set>
> 
> In that case, the 8181 port number is not used, instead it's the 8888 (as defined in the property).
> 
> Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF config file).
> 
> Can you check that this jetty.xml doesn't come from another feature (or your provisioning) ?
> 
> Thanks,
> Regards
> JB
> 
> On 04/30/2015 11:35 PM, Paul Spencer wrote:
>> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>> 
>> Is this:
>>  1 - Bug, because it should be configurable property
>>  2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>>  3 - Documentation bug
>>  4 - Enhancement with the expected behavior of ___ (1 or 2)
>> 
>> Paul Spencer
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Cave 3.0.0 HTTP port is configured in /etc/jetty.xml

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

both are possible: it depends of the org.ops4j.pax.web.cfg file.

The org.osgi.service.http.port contains the port.

For instance, containing 8888.

In the jetty.xml, you have something like:

                 <Set name="port">
                     <Property name="jetty.port" default="8181"/>
                 </Set>

In that case, the 8181 port number is not used, instead it's the 8888 
(as defined in the property).

Anyway, Cave server itself doesn't provision etc/jetty.xml (just a CXF 
config file).

Can you check that this jetty.xml doesn't come from another feature (or 
your provisioning) ?

Thanks,
Regards
JB

On 04/30/2015 11:35 PM, Paul Spencer wrote:
> I noticed the TCP port opened by the Cave HTTP server is defined in /etc/jetty.xml instead of a configured property.
>
> Is this:
>     1 - Bug, because it should be configurable property
>     2 - Bug, because it should us the pax-web port ( pid = org.ops4j.pax.web property = org.osgi.service.http.port)
>     3 - Documentation bug
>     4 - Enhancement with the expected behavior of ___ (1 or 2)
>
> Paul Spencer
>
>

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