You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Derek Baum (JIRA)" <ji...@apache.org> on 2011/01/09 11:41:46 UTC

[jira] Created: (FELIX-2772) setting http.port=-1 should disable service rather than throw exception

setting http.port=-1 should disable service rather than throw exception
-----------------------------------------------------------------------

                 Key: FELIX-2772
                 URL: https://issues.apache.org/jira/browse/FELIX-2772
             Project: Felix
          Issue Type: Improvement
          Components: HTTP Service
            Reporter: Derek Baum
            Priority: Minor


I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.

I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT

It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:

 [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
[WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1

[ERROR] Exception while initializing Jetty.
java.lang.IllegalArgumentException: port out of range:-1
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)

The Equinox http service is disabled if http.port=-1




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2772) setting http.port=-1 should disable service rather than throw exception

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved FELIX-2772.
--------------------------------------

    Resolution: Fixed

Implemented in Rev. 1056994: The JettyConfig.isUseHttp() and JettyConfig.isUseHttps() methods only return true if both the service is enabled (as per FELIX_HTTP[S]_ENABLE) and the configured port (as per HTTP[S]_PORT) is higher than zero.

> setting http.port=-1 should disable service rather than throw exception
> -----------------------------------------------------------------------
>
>                 Key: FELIX-2772
>                 URL: https://issues.apache.org/jira/browse/FELIX-2772
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http-2.0.4
>            Reporter: Derek Baum
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: http-2.0.6
>
>
> I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.
> I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT
> It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:
>  [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
> [WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1
> [ERROR] Exception while initializing Jetty.
> java.lang.IllegalArgumentException: port out of range:-1
>         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
> The Equinox http service is disabled if http.port=-1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2772) setting http.port=-1 should disable service rather than throw exception

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-2772:
-------------------------------------

    Affects Version/s: http-2.0.4
        Fix Version/s: http-2.0.6

Sounds reasonable. Scheduling for next release

> setting http.port=-1 should disable service rather than throw exception
> -----------------------------------------------------------------------
>
>                 Key: FELIX-2772
>                 URL: https://issues.apache.org/jira/browse/FELIX-2772
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http-2.0.4
>            Reporter: Derek Baum
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: http-2.0.6
>
>
> I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.
> I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT
> It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:
>  [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
> [WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1
> [ERROR] Exception while initializing Jetty.
> java.lang.IllegalArgumentException: port out of range:-1
>         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
> The Equinox http service is disabled if http.port=-1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2772) setting http.port=-1 should disable service rather than throw exception

Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Derek Baum closed FELIX-2772.
-----------------------------


great! thanks for resolving this so quickly.

> setting http.port=-1 should disable service rather than throw exception
> -----------------------------------------------------------------------
>
>                 Key: FELIX-2772
>                 URL: https://issues.apache.org/jira/browse/FELIX-2772
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http-2.0.4
>            Reporter: Derek Baum
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: http-2.0.6
>
>
> I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.
> I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT
> It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:
>  [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
> [WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1
> [ERROR] Exception while initializing Jetty.
> java.lang.IllegalArgumentException: port out of range:-1
>         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
> The Equinox http service is disabled if http.port=-1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-2772) setting http.port=-1 should disable service rather than throw exception

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned FELIX-2772:
----------------------------------------

    Assignee: Felix Meschberger

> setting http.port=-1 should disable service rather than throw exception
> -----------------------------------------------------------------------
>
>                 Key: FELIX-2772
>                 URL: https://issues.apache.org/jira/browse/FELIX-2772
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http-2.0.4
>            Reporter: Derek Baum
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: http-2.0.6
>
>
> I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.
> I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT
> It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:
>  [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
> [WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1
> [ERROR] Exception while initializing Jetty.
> java.lang.IllegalArgumentException: port out of range:-1
>         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
> The Equinox http service is disabled if http.port=-1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.