Quantcast

Way to bind qpid to a different IP?

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)

I am just curious if there is a way to bind qpid to an IP such as 127.1.244.129

The reason I ask is I'm looking to deploy many instances to a PaaS and will need multiple running instances. This is not possible if everything tries to bind to localhost:8080.

Does anyone know of a way to configure this? I could not find in the qpid documentation.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Gordon Sim
On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>
> I am just curious if there is a way to bind qpid to an IP such as 127.1.244.129
>
> The reason I ask is I'm looking to deploy many instances to a PaaS and will need multiple running instances. This is not possible if everything tries to bind to localhost:8080.
>
> Does anyone know of a way to configure this? I could not find in the qpid documentation.

Yes, you can use --interface to restrict the interfaces qpidd will bind on.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
Hi. I did this and I got the error: Unrecognized option: --interface

On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:

>On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>
>> I am just curious if there is a way to bind qpid to an IP such as
>>127.1.244.129
>>
>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>will need multiple running instances. This is not possible if everything
>>tries to bind to localhost:8080.
>>
>> Does anyone know of a way to configure this? I could not find in the
>>qpid documentation.
>
>Yes, you can use --interface to restrict the interfaces qpidd will bind
>on.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Ted Ross
Kyle,

That feature was added in release 0.20
(https://issues.apache.org/jira/browse/QPID-3351).  You may be using an
older version.

-Ted

On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:

> Hi. I did this and I got the error: Unrecognized option: --interface
>
> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>
>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>> I am just curious if there is a way to bind qpid to an IP such as
>>> 127.1.244.129
>>>
>>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>> will need multiple running instances. This is not possible if everything
>>> tries to bind to localhost:8080.
>>>
>>> Does anyone know of a way to configure this? I could not find in the
>>> qpid documentation.
>> Yes, you can use --interface to restrict the interfaces qpidd will bind
>> on.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
Hi Ted. I am using version 0.22. I actually got qpid from tar:
qpid-java-broker-0.22.tar.gz

On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:

>Kyle,
>
>That feature was added in release 0.20
>(https://issues.apache.org/jira/browse/QPID-3351).  You may be using an
>older version.
>
>-Ted
>
>On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>> Hi. I did this and I got the error: Unrecognized option: --interface
>>
>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>>
>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>>> I am just curious if there is a way to bind qpid to an IP such as
>>>> 127.1.244.129
>>>>
>>>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>>> will need multiple running instances. This is not possible if
>>>>everything
>>>> tries to bind to localhost:8080.
>>>>
>>>> Does anyone know of a way to configure this? I could not find in the
>>>> qpid documentation.
>>> Yes, you can use --interface to restrict the interfaces qpidd will bind
>>> on.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Ted Ross
Sorry Kyle,

Gordon and I are giving you information about the C++ broker, not the
Java broker.  I will need to defer to one of the Java broker folks to
answer for that component.

-Ted

On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:

> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> qpid-java-broker-0.22.tar.gz
>
> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>
>> Kyle,
>>
>> That feature was added in release 0.20
>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be using an
>> older version.
>>
>> -Ted
>>
>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>>> Hi. I did this and I got the error: Unrecognized option: --interface
>>>
>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>>>
>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>> I am just curious if there is a way to bind qpid to an IP such as
>>>>> 127.1.244.129
>>>>>
>>>>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>>>> will need multiple running instances. This is not possible if
>>>>> everything
>>>>> tries to bind to localhost:8080.
>>>>>
>>>>> Does anyone know of a way to configure this? I could not find in the
>>>>> qpid documentation.
>>>> Yes, you can use --interface to restrict the interfaces qpidd will bind
>>>> on.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Gordon Sim
In reply to this post by Kyle Crumpton (kcrumpto)
On 12/19/2013 09:03 PM, Kyle Crumpton (kcrumpto) wrote:
> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> qpid-java-broker-0.22.tar.gz

Sorry, my mistake! I should have realised from the 8080 port.

I'm not sure about setting the interface, but one other way around the
problem you described is to specify different ports for each of the
broker instances.

E.g. qpid-server -prop "qpid.amqp_port=10000" -prop
"qpid.http_port=10001" -prop "qpid.rmi_port=10002" -prop
"qpid.jmx_port=10003" -prop "qpid.work_dir=/path/to/broker1"

then

qpid-server -prop "qpid.amqp_port=11000" -prop "qpid.http_port=11001"
-prop "qpid.rmi_port=11002" -prop "qpid.jmx_port=11003" -prop
"qpid.work_dir=/path/to/broker2"

etc


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
Hi gordon. This is an option I considered, but I am actually looking to
bind the host instead of port because I am running this on a PaaS. So
basically it would need to be useable by more than one person on one
machine. They would spin up an app, and add a qpid broker to it.
The PaaS allocates different ip's for applications which exist as CNAME
aliases on the host node. So app name qpid may exist on node: "node1" as
qpid with an IP of 127.1.34.2 (random ip) and would need to bind to that
IP. The apps are in linux containers. So I know there is a possibility
here. I was desperately looking through the qpid documentation to see if
there's a way to do this on the java end.

Greatly appreciate the help, though.

Kyle

On 12/19/13 5:04 PM, "Gordon Sim" <[hidden email]> wrote:

>On 12/19/2013 09:03 PM, Kyle Crumpton (kcrumpto) wrote:
>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>> qpid-java-broker-0.22.tar.gz
>
>Sorry, my mistake! I should have realised from the 8080 port.
>
>I'm not sure about setting the interface, but one other way around the
>problem you described is to specify different ports for each of the
>broker instances.
>
>E.g. qpid-server -prop "qpid.amqp_port=10000" -prop
>"qpid.http_port=10001" -prop "qpid.rmi_port=10002" -prop
>"qpid.jmx_port=10003" -prop "qpid.work_dir=/path/to/broker1"
>
>then
>
>qpid-server -prop "qpid.amqp_port=11000" -prop "qpid.http_port=11001"
>-prop "qpid.rmi_port=11002" -prop "qpid.jmx_port=11003" -prop
>"qpid.work_dir=/path/to/broker2"
>
>etc
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

rgodfrey
In reply to this post by Ted Ross
Hi Kyle,

the Java Broker uses a number of different ports, depending on which
plugins are enabled.  If I remember correctly there are some ports which
can be bound to only certain interfaces, but others (HTTP and JMX
management) which we cannot so restrict. As well as port conflicts you are
going to want to ensure that if you are running multiple broker instances
on the same server, each has its own locations for config files, password
files, etc.

The Java Broker stores all its configuration in a config file
${qpid.work_dir}/config.json (where ${qpid.work_dir} is the user's home
directory by default).  The initial broker config is taken from a template
inside the broker binaries and ultimately from static defaults (for things
like the HTTP management port being 8080).

The following sections of the documentation are probably useful here:

http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Getting-Started-CommandLine.html
http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Configuring-And-Managing.html#Java-Broker-Configuring-And-Managing-Configuration-Store

Using the above you should be able to see how you can create configurations
so that you avoid port number clashes.

For binding on the same port, this is possible for the AMQP port, but not
for management (JMX or HTTP)... So you'd either need to disable these
plugins (and have no easy way to manage your broker) or have different
ports for each interface.

For the AMQP port you need to set the bindingAddress parameter for the
port, e.g.:

{
    "authenticationProvider" : "passwordFile",
    "bindingAddress" : "192.168.105.83",
    "id" : "7236a3e5-9e74-440b-888b-2fdfcbe21695",
    "name" : "AMQP",
    "port" : 5672
  }

is how that section looks in my config file right now on one broker I'm
running, while the other broker instance had a different bindingAddress.

I'm aware of people who are doing similar things for PaaS type
infrastructures who basically use a template initial config and then write
out different concrete values for the ports/etc for the initial config file
to be used for each new instance of a broker that is created.  After you'd
run your script to genearte the template for the new instance, you'd then
start up the broker with the --initial-config-path option to point at your
newly generated template. You might also want to consider other aspects
you's want in your initial config (such as authentication mechanisms, etc.).

I'm not sure whether there's any way we can fix the HTTP or JMX ports in
future ... possibly more of a chance with the HTTP management... but I'd
need to look into how jetty does its binding.

Hope this helps,
Rob


(As an aside: one enhancement here that would be really useful for these
PaaS scenarios (and I know someone raised a JIRA for it previously) is to
have some sort of mDNS registration in the broker so that a new instance's
ports could be resolved by name rather than having to add a separate
mechanism to propogoate the port numbers in use by an instance to clients
which wish to connect... however that doesn't exist yet).




On 19 December 2013 22:18, Ted Ross <[hidden email]> wrote:

> Sorry Kyle,
>
> Gordon and I are giving you information about the C++ broker, not the Java
> broker.  I will need to defer to one of the Java broker folks to answer for
> that component.
>
> -Ted
>
>
> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
>
>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>> qpid-java-broker-0.22.tar.gz
>>
>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>>
>>  Kyle,
>>>
>>> That feature was added in release 0.20
>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be using an
>>> older version.
>>>
>>> -Ted
>>>
>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>>>
>>>> Hi. I did this and I got the error: Unrecognized option: --interface
>>>>
>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>>>>
>>>>  On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>>
>>>>>> I am just curious if there is a way to bind qpid to an IP such as
>>>>>> 127.1.244.129
>>>>>>
>>>>>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>>>>> will need multiple running instances. This is not possible if
>>>>>> everything
>>>>>> tries to bind to localhost:8080.
>>>>>>
>>>>>> Does anyone know of a way to configure this? I could not find in the
>>>>>> qpid documentation.
>>>>>>
>>>>> Yes, you can use --interface to restrict the interfaces qpidd will bind
>>>>> on.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Keith Wall
In reply to this post by Ted Ross
Hello Kyle,

Yes, this is supported.  You can make the AMQP port bind to a
particular interface using the binding address attribute.     Use the
Web Management Console to edit the AMQP port and specify a binding
address (127.1.244.129 in your case).  Once done, restart the Broker
for that change to take effect.

The Java Broker docs describe the process of editing the port.

http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Ports.html#Java-Broker-Ports-Configuring

You can't yet specify a binding address for HTTP Management or JMX.

Hope this helps.




On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:

> Sorry Kyle,
>
> Gordon and I are giving you information about the C++ broker, not the Java
> broker.  I will need to defer to one of the Java broker folks to answer for
> that component.
>
> -Ted
>
>
> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
>>
>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>> qpid-java-broker-0.22.tar.gz
>>
>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>>
>>> Kyle,
>>>
>>> That feature was added in release 0.20
>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be using an
>>> older version.
>>>
>>> -Ted
>>>
>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>
>>>> Hi. I did this and I got the error: Unrecognized option: --interface
>>>>
>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>>>>
>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>>>
>>>>>> I am just curious if there is a way to bind qpid to an IP such as
>>>>>> 127.1.244.129
>>>>>>
>>>>>> The reason I ask is I'm looking to deploy many instances to a PaaS and
>>>>>> will need multiple running instances. This is not possible if
>>>>>> everything
>>>>>> tries to bind to localhost:8080.
>>>>>>
>>>>>> Does anyone know of a way to configure this? I could not find in the
>>>>>> qpid documentation.
>>>>>
>>>>> Yes, you can use --interface to restrict the interfaces qpidd will bind
>>>>> on.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Robbie Gemmell
Administrator
In reply to this post by Kyle Crumpton (kcrumpto)
It is not currently possible to specify an interface for the Java brokers
HTTP ports to bind (though it could be made possible...), it is only
possible to specify the port number currently. It does not bind just
localhost, it will listen on all interfaces.

Same for the JMX ports (though with the subtle restriction that even though
it listens on all interfaces JMX itself only supports advertising a single
ip/host for the JMXConnectorServer stub, without performing some extreme
compatibility-breaking hackery that is).

It is possible to configure an interface for the AMQP ports...

...I'm going to stop now as I see Rob and Keith have said everything I was
planning on. Thanks :)

Robbie

On 19 December 2013 23:07, Kyle Crumpton (kcrumpto) <[hidden email]>wrote:

> Hi gordon. This is an option I considered, but I am actually looking to
> bind the host instead of port because I am running this on a PaaS. So
> basically it would need to be useable by more than one person on one
> machine. They would spin up an app, and add a qpid broker to it.
> The PaaS allocates different ip's for applications which exist as CNAME
> aliases on the host node. So app name qpid may exist on node: "node1" as
> qpid with an IP of 127.1.34.2 (random ip) and would need to bind to that
> IP. The apps are in linux containers. So I know there is a possibility
> here. I was desperately looking through the qpid documentation to see if
> there's a way to do this on the java end.
>
> Greatly appreciate the help, though.
>
> Kyle
>
> On 12/19/13 5:04 PM, "Gordon Sim" <[hidden email]> wrote:
>
> >On 12/19/2013 09:03 PM, Kyle Crumpton (kcrumpto) wrote:
> >> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> >> qpid-java-broker-0.22.tar.gz
> >
> >Sorry, my mistake! I should have realised from the 8080 port.
> >
> >I'm not sure about setting the interface, but one other way around the
> >problem you described is to specify different ports for each of the
> >broker instances.
> >
> >E.g. qpid-server -prop "qpid.amqp_port=10000" -prop
> >"qpid.http_port=10001" -prop "qpid.rmi_port=10002" -prop
> >"qpid.jmx_port=10003" -prop "qpid.work_dir=/path/to/broker1"
> >
> >then
> >
> >qpid-server -prop "qpid.amqp_port=11000" -prop "qpid.http_port=11001"
> >-prop "qpid.rmi_port=11002" -prop "qpid.jmx_port=11003" -prop
> >"qpid.work_dir=/path/to/broker2"
> >
> >etc
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [hidden email]
> >For additional commands, e-mail: [hidden email]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
In reply to this post by Keith Wall
Hi Keith, Rob.

Thank you for your replies.
I am actually at a point where I am trying to get qpid running on a PaaS
instance in a linux container.

Scenario is
User creates app: test in namespace test
domain is example.com
so you create this app on your PaaS which exists on your server:
"node1.example.com"
So what will happen is you have a bind server which will create an entry:
test-test.example.com CNAME IN node1.example.com
This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP which
will allow the user to bind to that IP instead of 127.0.0.1 which would
just steal the port from the host machine.
So for example, test-test.example.com could have an IP 127.1.2.3;
Another user could create their own app too, say "test2" which would also
be allocated a different IP address on the node1.example.com machine.
This server is then treated as a gateway to your app which exists on a
linux container. From here I'd want the user to be able to "add" qpid to
the app.

So right now what would happen is, the main server, node1.example.com is
running an http interface on port 8080 already. This will fail with an
invalid port. I know you can configure the port, but that does not seem to
be the proper way to handle the problem?

Say you have 3 users who want to use qpid on their 3 respective apps.. It
seems that it'd be better to bind to the same ports on different IPs then
to different ports on the same IP.

Any thoughts?

On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:

>Hello Kyle,
>
>Yes, this is supported.  You can make the AMQP port bind to a
>particular interface using the binding address attribute.     Use the
>Web Management Console to edit the AMQP port and specify a binding
>address (127.1.244.129 in your case).  Once done, restart the Broker
>for that change to take effect.
>
>The Java Broker docs describe the process of editing the port.
>
>http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Por
>ts.html#Java-Broker-Ports-Configuring
>
>You can't yet specify a binding address for HTTP Management or JMX.
>
>Hope this helps.
>
>
>
>
>On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
>> Sorry Kyle,
>>
>> Gordon and I are giving you information about the C++ broker, not the
>>Java
>> broker.  I will need to defer to one of the Java broker folks to answer
>>for
>> that component.
>>
>> -Ted
>>
>>
>> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
>>>
>>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>>> qpid-java-broker-0.22.tar.gz
>>>
>>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>>>
>>>> Kyle,
>>>>
>>>> That feature was added in release 0.20
>>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be using
>>>>an
>>>> older version.
>>>>
>>>> -Ted
>>>>
>>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>>
>>>>> Hi. I did this and I got the error: Unrecognized option: --interface
>>>>>
>>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>>>>>
>>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>>>>>>>
>>>>>>> I am just curious if there is a way to bind qpid to an IP such as
>>>>>>> 127.1.244.129
>>>>>>>
>>>>>>> The reason I ask is I'm looking to deploy many instances to a PaaS
>>>>>>>and
>>>>>>> will need multiple running instances. This is not possible if
>>>>>>> everything
>>>>>>> tries to bind to localhost:8080.
>>>>>>>
>>>>>>> Does anyone know of a way to configure this? I could not find in
>>>>>>>the
>>>>>>> qpid documentation.
>>>>>>
>>>>>> Yes, you can use --interface to restrict the interfaces qpidd will
>>>>>>bind
>>>>>> on.
>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

rgodfrey
So it looks like it will be a completely trivial fix to allow the HTTP port
to bind to different interfaces... the JMX (as Robbie says) not so much...
however if you don't need the JMX management plugin you can disable it.

If we patch up the HTTP management then all you'll need to do is change the
initial config file to be populated with something like "bindingAddress":
"${openshift.app_ip}" and then modify the qpid start script to set that
config parameter from the environment.

Obviously if you are giving the users access to the http management then
they might try to do things like add more ports to the broker, and then if
they don't similarly restrict themselves to binding to only their given
address then you'd get conflicts... You could - I imagine prevent this
either through locking down the Qpid config somewhat, or maybe at the Linux
level...

If you're willing to run a patched version of the code I can probably send
you a patch by tmr which will allow the HTTP port to be bound to a specific
address in the same way that the AMQP port is.

Hope this helps,
Rob


On 20 December 2013 00:26, Kyle Crumpton (kcrumpto) <[hidden email]>wrote:

> Hi Keith, Rob.
>
> Thank you for your replies.
> I am actually at a point where I am trying to get qpid running on a PaaS
> instance in a linux container.
>
> Scenario is
> User creates app: test in namespace test
> domain is example.com
> so you create this app on your PaaS which exists on your server:
> "node1.example.com"
> So what will happen is you have a bind server which will create an entry:
> test-test.example.com CNAME IN node1.example.com
> This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP which
> will allow the user to bind to that IP instead of 127.0.0.1 which would
> just steal the port from the host machine.
> So for example, test-test.example.com could have an IP 127.1.2.3;
> Another user could create their own app too, say "test2" which would also
> be allocated a different IP address on the node1.example.com machine.
> This server is then treated as a gateway to your app which exists on a
> linux container. From here I'd want the user to be able to "add" qpid to
> the app.
>
> So right now what would happen is, the main server, node1.example.com is
> running an http interface on port 8080 already. This will fail with an
> invalid port. I know you can configure the port, but that does not seem to
> be the proper way to handle the problem?
>
> Say you have 3 users who want to use qpid on their 3 respective apps.. It
> seems that it'd be better to bind to the same ports on different IPs then
> to different ports on the same IP.
>
> Any thoughts?
>
> On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
>
> >Hello Kyle,
> >
> >Yes, this is supported.  You can make the AMQP port bind to a
> >particular interface using the binding address attribute.     Use the
> >Web Management Console to edit the AMQP port and specify a binding
> >address (127.1.244.129 in your case).  Once done, restart the Broker
> >for that change to take effect.
> >
> >The Java Broker docs describe the process of editing the port.
> >
> >
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Por
> >ts.html#Java-Broker-Ports-Configuring
> >
> >You can't yet specify a binding address for HTTP Management or JMX.
> >
> >Hope this helps.
> >
> >
> >
> >
> >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
> >> Sorry Kyle,
> >>
> >> Gordon and I are giving you information about the C++ broker, not the
> >>Java
> >> broker.  I will need to defer to one of the Java broker folks to answer
> >>for
> >> that component.
> >>
> >> -Ted
> >>
> >>
> >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
> >>>
> >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> >>> qpid-java-broker-0.22.tar.gz
> >>>
> >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
> >>>
> >>>> Kyle,
> >>>>
> >>>> That feature was added in release 0.20
> >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be using
> >>>>an
> >>>> older version.
> >>>>
> >>>> -Ted
> >>>>
> >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
> >>>>>
> >>>>> Hi. I did this and I got the error: Unrecognized option: --interface
> >>>>>
> >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
> >>>>>
> >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
> >>>>>>>
> >>>>>>> I am just curious if there is a way to bind qpid to an IP such as
> >>>>>>> 127.1.244.129
> >>>>>>>
> >>>>>>> The reason I ask is I'm looking to deploy many instances to a PaaS
> >>>>>>>and
> >>>>>>> will need multiple running instances. This is not possible if
> >>>>>>> everything
> >>>>>>> tries to bind to localhost:8080.
> >>>>>>>
> >>>>>>> Does anyone know of a way to configure this? I could not find in
> >>>>>>>the
> >>>>>>> qpid documentation.
> >>>>>>
> >>>>>> Yes, you can use --interface to restrict the interfaces qpidd will
> >>>>>>bind
> >>>>>> on.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [hidden email]
> >>>>>> For additional commands, e-mail: [hidden email]
> >>>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: [hidden email]
> >>>>> For additional commands, e-mail: [hidden email]
> >>>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [hidden email]
> >>>> For additional commands, e-mail: [hidden email]
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [hidden email]
> >>> For additional commands, e-mail: [hidden email]
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [hidden email]
> >For additional commands, e-mail: [hidden email]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Robbie Gemmell
Administrator
On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:

> So it looks like it will be a completely trivial fix to allow the HTTP port
> to bind to different interfaces... the JMX (as Robbie says) not so much...
> however if you don't need the JMX management plugin you can disable it.
>

It shouldnt be too much harder to implement for the JMX ports either, it
would likely just need use of some custom RMIServerSocketFactory
implementations, something we already do for other reasons (e.g
QpidSslRMIServerSocketFactory to allow use of SSL config other than the JVM
default)

The bit I was speaking to earlier is that the interfaces JMX listens on are
completely distinct from the single IP/host it can actually advertise the
JMXConnectorServer as being available at in the registry.


>
> If we patch up the HTTP management then all you'll need to do is change the
> initial config file to be populated with something like "bindingAddress":
> "${openshift.app_ip}" and then modify the qpid start script to set that
> config parameter from the environment.
>
>
You can pass "-Dfoo=bar" type values via the QPID_OPTS environment variable
the script makes available.


> Obviously if you are giving the users access to the http management then
> they might try to do things like add more ports to the broker, and then if
> they don't similarly restrict themselves to binding to only their given
> address then you'd get conflicts... You could - I imagine prevent this
> either through locking down the Qpid config somewhat, or maybe at the Linux
> level...
>
> If you're willing to run a patched version of the code I can probably send
> you a patch by tmr which will allow the HTTP port to be bound to a specific
> address in the same way that the AMQP port is.
>
> Hope this helps,
> Rob
>
>
> On 20 December 2013 00:26, Kyle Crumpton (kcrumpto) <[hidden email]
> >wrote:
>
> > Hi Keith, Rob.
> >
> > Thank you for your replies.
> > I am actually at a point where I am trying to get qpid running on a PaaS
> > instance in a linux container.
> >
> > Scenario is
> > User creates app: test in namespace test
> > domain is example.com
> > so you create this app on your PaaS which exists on your server:
> > "node1.example.com"
> > So what will happen is you have a bind server which will create an entry:
> > test-test.example.com CNAME IN node1.example.com
> > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP which
> > will allow the user to bind to that IP instead of 127.0.0.1 which would
> > just steal the port from the host machine.
> > So for example, test-test.example.com could have an IP 127.1.2.3;
> > Another user could create their own app too, say "test2" which would also
> > be allocated a different IP address on the node1.example.com machine.
> > This server is then treated as a gateway to your app which exists on a
> > linux container. From here I'd want the user to be able to "add" qpid to
> > the app.
> >
> > So right now what would happen is, the main server, node1.example.com is
> > running an http interface on port 8080 already. This will fail with an
> > invalid port. I know you can configure the port, but that does not seem
> to
> > be the proper way to handle the problem?
> >
> > Say you have 3 users who want to use qpid on their 3 respective apps.. It
> > seems that it'd be better to bind to the same ports on different IPs then
> > to different ports on the same IP.
> >
> > Any thoughts?
> >
> > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
> >
> > >Hello Kyle,
> > >
> > >Yes, this is supported.  You can make the AMQP port bind to a
> > >particular interface using the binding address attribute.     Use the
> > >Web Management Console to edit the AMQP port and specify a binding
> > >address (127.1.244.129 in your case).  Once done, restart the Broker
> > >for that change to take effect.
> > >
> > >The Java Broker docs describe the process of editing the port.
> > >
> > >
> >
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Por
> > >ts.html#Java-Broker-Ports-Configuring
> > >
> > >You can't yet specify a binding address for HTTP Management or JMX.
> > >
> > >Hope this helps.
> > >
> > >
> > >
> > >
> > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
> > >> Sorry Kyle,
> > >>
> > >> Gordon and I are giving you information about the C++ broker, not the
> > >>Java
> > >> broker.  I will need to defer to one of the Java broker folks to
> answer
> > >>for
> > >> that component.
> > >>
> > >> -Ted
> > >>
> > >>
> > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
> > >>>
> > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> > >>> qpid-java-broker-0.22.tar.gz
> > >>>
> > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
> > >>>
> > >>>> Kyle,
> > >>>>
> > >>>> That feature was added in release 0.20
> > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
> using
> > >>>>an
> > >>>> older version.
> > >>>>
> > >>>> -Ted
> > >>>>
> > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
> > >>>>>
> > >>>>> Hi. I did this and I got the error: Unrecognized option:
> --interface
> > >>>>>
> > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
> > >>>>>
> > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
> > >>>>>>>
> > >>>>>>> I am just curious if there is a way to bind qpid to an IP such as
> > >>>>>>> 127.1.244.129
> > >>>>>>>
> > >>>>>>> The reason I ask is I'm looking to deploy many instances to a
> PaaS
> > >>>>>>>and
> > >>>>>>> will need multiple running instances. This is not possible if
> > >>>>>>> everything
> > >>>>>>> tries to bind to localhost:8080.
> > >>>>>>>
> > >>>>>>> Does anyone know of a way to configure this? I could not find in
> > >>>>>>>the
> > >>>>>>> qpid documentation.
> > >>>>>>
> > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd will
> > >>>>>>bind
> > >>>>>> on.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> >
> >>>>>>---------------------------------------------------------------------
> > >>>>>> To unsubscribe, e-mail: [hidden email]
> > >>>>>> For additional commands, e-mail: [hidden email]
> > >>>>>>
> > >>>>>
> ---------------------------------------------------------------------
> > >>>>> To unsubscribe, e-mail: [hidden email]
> > >>>>> For additional commands, e-mail: [hidden email]
> > >>>>>
> > >>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail: [hidden email]
> > >>>> For additional commands, e-mail: [hidden email]
> > >>>>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: [hidden email]
> > >>> For additional commands, e-mail: [hidden email]
> > >>>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [hidden email]
> > >> For additional commands, e-mail: [hidden email]
> > >>
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: [hidden email]
> > >For additional commands, e-mail: [hidden email]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

rgodfrey
I've created https://issues.apache.org/jira/browse/QPID-5437 and attached a
quick patch to allow for HTTP ports to be bound to a speicifc address in
the same way that AMQP ports are.  The patch is against the head of trunk
rather than 0.22, though I don't imagine it'd be too difficult to get it to
apply to that version.

Hope this helps,
Rob


On 20 December 2013 00:51, Robbie Gemmell <[hidden email]> wrote:

> On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:
>
> > So it looks like it will be a completely trivial fix to allow the HTTP
> port
> > to bind to different interfaces... the JMX (as Robbie says) not so
> much...
> > however if you don't need the JMX management plugin you can disable it.
> >
>
> It shouldnt be too much harder to implement for the JMX ports either, it
> would likely just need use of some custom RMIServerSocketFactory
> implementations, something we already do for other reasons (e.g
> QpidSslRMIServerSocketFactory to allow use of SSL config other than the JVM
> default)
>
> The bit I was speaking to earlier is that the interfaces JMX listens on are
> completely distinct from the single IP/host it can actually advertise the
> JMXConnectorServer as being available at in the registry.
>
>
> >
> > If we patch up the HTTP management then all you'll need to do is change
> the
> > initial config file to be populated with something like "bindingAddress":
> > "${openshift.app_ip}" and then modify the qpid start script to set that
> > config parameter from the environment.
> >
> >
> You can pass "-Dfoo=bar" type values via the QPID_OPTS environment variable
> the script makes available.
>
>
> > Obviously if you are giving the users access to the http management then
> > they might try to do things like add more ports to the broker, and then
> if
> > they don't similarly restrict themselves to binding to only their given
> > address then you'd get conflicts... You could - I imagine prevent this
> > either through locking down the Qpid config somewhat, or maybe at the
> Linux
> > level...
> >
> > If you're willing to run a patched version of the code I can probably
> send
> > you a patch by tmr which will allow the HTTP port to be bound to a
> specific
> > address in the same way that the AMQP port is.
> >
> > Hope this helps,
> > Rob
> >
> >
> > On 20 December 2013 00:26, Kyle Crumpton (kcrumpto) <[hidden email]
> > >wrote:
> >
> > > Hi Keith, Rob.
> > >
> > > Thank you for your replies.
> > > I am actually at a point where I am trying to get qpid running on a
> PaaS
> > > instance in a linux container.
> > >
> > > Scenario is
> > > User creates app: test in namespace test
> > > domain is example.com
> > > so you create this app on your PaaS which exists on your server:
> > > "node1.example.com"
> > > So what will happen is you have a bind server which will create an
> entry:
> > > test-test.example.com CNAME IN node1.example.com
> > > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP
> which
> > > will allow the user to bind to that IP instead of 127.0.0.1 which would
> > > just steal the port from the host machine.
> > > So for example, test-test.example.com could have an IP 127.1.2.3;
> > > Another user could create their own app too, say "test2" which would
> also
> > > be allocated a different IP address on the node1.example.com machine.
> > > This server is then treated as a gateway to your app which exists on a
> > > linux container. From here I'd want the user to be able to "add" qpid
> to
> > > the app.
> > >
> > > So right now what would happen is, the main server, node1.example.comis
> > > running an http interface on port 8080 already. This will fail with an
> > > invalid port. I know you can configure the port, but that does not seem
> > to
> > > be the proper way to handle the problem?
> > >
> > > Say you have 3 users who want to use qpid on their 3 respective apps..
> It
> > > seems that it'd be better to bind to the same ports on different IPs
> then
> > > to different ports on the same IP.
> > >
> > > Any thoughts?
> > >
> > > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
> > >
> > > >Hello Kyle,
> > > >
> > > >Yes, this is supported.  You can make the AMQP port bind to a
> > > >particular interface using the binding address attribute.     Use the
> > > >Web Management Console to edit the AMQP port and specify a binding
> > > >address (127.1.244.129 in your case).  Once done, restart the Broker
> > > >for that change to take effect.
> > > >
> > > >The Java Broker docs describe the process of editing the port.
> > > >
> > > >
> > >
> >
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Por
> > > >ts.html#Java-Broker-Ports-Configuring
> > > >
> > > >You can't yet specify a binding address for HTTP Management or JMX.
> > > >
> > > >Hope this helps.
> > > >
> > > >
> > > >
> > > >
> > > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
> > > >> Sorry Kyle,
> > > >>
> > > >> Gordon and I are giving you information about the C++ broker, not
> the
> > > >>Java
> > > >> broker.  I will need to defer to one of the Java broker folks to
> > answer
> > > >>for
> > > >> that component.
> > > >>
> > > >> -Ted
> > > >>
> > > >>
> > > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
> > > >>>
> > > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> > > >>> qpid-java-broker-0.22.tar.gz
> > > >>>
> > > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
> > > >>>
> > > >>>> Kyle,
> > > >>>>
> > > >>>> That feature was added in release 0.20
> > > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
> > using
> > > >>>>an
> > > >>>> older version.
> > > >>>>
> > > >>>> -Ted
> > > >>>>
> > > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
> > > >>>>>
> > > >>>>> Hi. I did this and I got the error: Unrecognized option:
> > --interface
> > > >>>>>
> > > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
> > > >>>>>
> > > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
> > > >>>>>>>
> > > >>>>>>> I am just curious if there is a way to bind qpid to an IP such
> as
> > > >>>>>>> 127.1.244.129
> > > >>>>>>>
> > > >>>>>>> The reason I ask is I'm looking to deploy many instances to a
> > PaaS
> > > >>>>>>>and
> > > >>>>>>> will need multiple running instances. This is not possible if
> > > >>>>>>> everything
> > > >>>>>>> tries to bind to localhost:8080.
> > > >>>>>>>
> > > >>>>>>> Does anyone know of a way to configure this? I could not find
> in
> > > >>>>>>>the
> > > >>>>>>> qpid documentation.
> > > >>>>>>
> > > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd
> will
> > > >>>>>>bind
> > > >>>>>> on.
> > > >>>>>>
> > > >>>>>>
> > > >>>>>>
> > >
> >
> >>>>>>---------------------------------------------------------------------
> > > >>>>>> To unsubscribe, e-mail: [hidden email]
> > > >>>>>> For additional commands, e-mail: [hidden email]
> > > >>>>>>
> > > >>>>>
> > ---------------------------------------------------------------------
> > > >>>>> To unsubscribe, e-mail: [hidden email]
> > > >>>>> For additional commands, e-mail: [hidden email]
> > > >>>>>
> > > >>>>
> > > >>>>
> > ---------------------------------------------------------------------
> > > >>>> To unsubscribe, e-mail: [hidden email]
> > > >>>> For additional commands, e-mail: [hidden email]
> > > >>>>
> > > >>>
> > > >>>
> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: [hidden email]
> > > >>> For additional commands, e-mail: [hidden email]
> > > >>>
> > > >>
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: [hidden email]
> > > >> For additional commands, e-mail: [hidden email]
> > > >>
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: [hidden email]
> > > >For additional commands, e-mail: [hidden email]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
Hi Rob,

Thank you a bunch I'm going to give this a try.



On 12/19/13 6:11 PM, "Rob Godfrey" <[hidden email]> wrote:

>I've created https://issues.apache.org/jira/browse/QPID-5437 and attached
>a
>quick patch to allow for HTTP ports to be bound to a speicifc address in
>the same way that AMQP ports are.  The patch is against the head of trunk
>rather than 0.22, though I don't imagine it'd be too difficult to get it
>to
>apply to that version.
>
>Hope this helps,
>Rob
>
>
>On 20 December 2013 00:51, Robbie Gemmell <[hidden email]>
>wrote:
>
>> On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:
>>
>> > So it looks like it will be a completely trivial fix to allow the HTTP
>> port
>> > to bind to different interfaces... the JMX (as Robbie says) not so
>> much...
>> > however if you don't need the JMX management plugin you can disable
>>it.
>> >
>>
>> It shouldnt be too much harder to implement for the JMX ports either, it
>> would likely just need use of some custom RMIServerSocketFactory
>> implementations, something we already do for other reasons (e.g
>> QpidSslRMIServerSocketFactory to allow use of SSL config other than the
>>JVM
>> default)
>>
>> The bit I was speaking to earlier is that the interfaces JMX listens on
>>are
>> completely distinct from the single IP/host it can actually advertise
>>the
>> JMXConnectorServer as being available at in the registry.
>>
>>
>> >
>> > If we patch up the HTTP management then all you'll need to do is
>>change
>> the
>> > initial config file to be populated with something like
>>"bindingAddress":
>> > "${openshift.app_ip}" and then modify the qpid start script to set
>>that
>> > config parameter from the environment.
>> >
>> >
>> You can pass "-Dfoo=bar" type values via the QPID_OPTS environment
>>variable
>> the script makes available.
>>
>>
>> > Obviously if you are giving the users access to the http management
>>then
>> > they might try to do things like add more ports to the broker, and
>>then
>> if
>> > they don't similarly restrict themselves to binding to only their
>>given
>> > address then you'd get conflicts... You could - I imagine prevent this
>> > either through locking down the Qpid config somewhat, or maybe at the
>> Linux
>> > level...
>> >
>> > If you're willing to run a patched version of the code I can probably
>> send
>> > you a patch by tmr which will allow the HTTP port to be bound to a
>> specific
>> > address in the same way that the AMQP port is.
>> >
>> > Hope this helps,
>> > Rob
>> >
>> >
>> > On 20 December 2013 00:26, Kyle Crumpton (kcrumpto)
>><[hidden email]
>> > >wrote:
>> >
>> > > Hi Keith, Rob.
>> > >
>> > > Thank you for your replies.
>> > > I am actually at a point where I am trying to get qpid running on a
>> PaaS
>> > > instance in a linux container.
>> > >
>> > > Scenario is
>> > > User creates app: test in namespace test
>> > > domain is example.com
>> > > so you create this app on your PaaS which exists on your server:
>> > > "node1.example.com"
>> > > So what will happen is you have a bind server which will create an
>> entry:
>> > > test-test.example.com CNAME IN node1.example.com
>> > > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP
>> which
>> > > will allow the user to bind to that IP instead of 127.0.0.1 which
>>would
>> > > just steal the port from the host machine.
>> > > So for example, test-test.example.com could have an IP 127.1.2.3;
>> > > Another user could create their own app too, say "test2" which would
>> also
>> > > be allocated a different IP address on the node1.example.com
>>machine.
>> > > This server is then treated as a gateway to your app which exists
>>on a
>> > > linux container. From here I'd want the user to be able to "add"
>>qpid
>> to
>> > > the app.
>> > >
>> > > So right now what would happen is, the main server,
>>node1.example.comis
>> > > running an http interface on port 8080 already. This will fail with
>>an
>> > > invalid port. I know you can configure the port, but that does not
>>seem
>> > to
>> > > be the proper way to handle the problem?
>> > >
>> > > Say you have 3 users who want to use qpid on their 3 respective
>>apps..
>> It
>> > > seems that it'd be better to bind to the same ports on different IPs
>> then
>> > > to different ports on the same IP.
>> > >
>> > > Any thoughts?
>> > >
>> > > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
>> > >
>> > > >Hello Kyle,
>> > > >
>> > > >Yes, this is supported.  You can make the AMQP port bind to a
>> > > >particular interface using the binding address attribute.     Use
>>the
>> > > >Web Management Console to edit the AMQP port and specify a binding
>> > > >address (127.1.244.129 in your case).  Once done, restart the
>>Broker
>> > > >for that change to take effect.
>> > > >
>> > > >The Java Broker docs describe the process of editing the port.
>> > > >
>> > > >
>> > >
>> >
>>
>>http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Po
>>r
>> > > >ts.html#Java-Broker-Ports-Configuring
>> > > >
>> > > >You can't yet specify a binding address for HTTP Management or JMX.
>> > > >
>> > > >Hope this helps.
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
>> > > >> Sorry Kyle,
>> > > >>
>> > > >> Gordon and I are giving you information about the C++ broker, not
>> the
>> > > >>Java
>> > > >> broker.  I will need to defer to one of the Java broker folks to
>> > answer
>> > > >>for
>> > > >> that component.
>> > > >>
>> > > >> -Ted
>> > > >>
>> > > >>
>> > > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>
>> > > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>> > > >>> qpid-java-broker-0.22.tar.gz
>> > > >>>
>> > > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>> > > >>>
>> > > >>>> Kyle,
>> > > >>>>
>> > > >>>> That feature was added in release 0.20
>> > > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
>> > using
>> > > >>>>an
>> > > >>>> older version.
>> > > >>>>
>> > > >>>> -Ted
>> > > >>>>
>> > > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>>>
>> > > >>>>> Hi. I did this and I got the error: Unrecognized option:
>> > --interface
>> > > >>>>>
>> > > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>> > > >>>>>
>> > > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>>>>>
>> > > >>>>>>> I am just curious if there is a way to bind qpid to an IP
>>such
>> as
>> > > >>>>>>> 127.1.244.129
>> > > >>>>>>>
>> > > >>>>>>> The reason I ask is I'm looking to deploy many instances to
>>a
>> > PaaS
>> > > >>>>>>>and
>> > > >>>>>>> will need multiple running instances. This is not possible
>>if
>> > > >>>>>>> everything
>> > > >>>>>>> tries to bind to localhost:8080.
>> > > >>>>>>>
>> > > >>>>>>> Does anyone know of a way to configure this? I could not
>>find
>> in
>> > > >>>>>>>the
>> > > >>>>>>> qpid documentation.
>> > > >>>>>>
>> > > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd
>> will
>> > > >>>>>>bind
>> > > >>>>>> on.
>> > > >>>>>>
>> > > >>>>>>
>> > > >>>>>>
>> > >
>> >
>>
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>> > > >>>>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>>>> For additional commands, e-mail: [hidden email]
>> > > >>>>>>
>> > > >>>>>
>> > ---------------------------------------------------------------------
>> > > >>>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>>> For additional commands, e-mail: [hidden email]
>> > > >>>>>
>> > > >>>>
>> > > >>>>
>> > ---------------------------------------------------------------------
>> > > >>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>> For additional commands, e-mail: [hidden email]
>> > > >>>>
>> > > >>>
>> > > >>>
>> ---------------------------------------------------------------------
>> > > >>> To unsubscribe, e-mail: [hidden email]
>> > > >>> For additional commands, e-mail: [hidden email]
>> > > >>>
>> > > >>
>> > > >>
>> > > >>
>> ---------------------------------------------------------------------
>> > > >> To unsubscribe, e-mail: [hidden email]
>> > > >> For additional commands, e-mail: [hidden email]
>> > > >>
>> > > >
>> > >
>>>---------------------------------------------------------------------
>> > > >To unsubscribe, e-mail: [hidden email]
>> > > >For additional commands, e-mail: [hidden email]
>> > > >
>> > >
>> > >
>> > >
>>---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: [hidden email]
>> > > For additional commands, e-mail: [hidden email]
>> > >
>> > >
>> >
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Kyle Crumpton (kcrumpto)
In reply to this post by rgodfrey
Hi Rob, Sorry for the really late reply / hope you remember this thread.

I got some assistance from the irc. I pulled the latest source using "svn
checkout http://svn.apache.org/repos/asf/qpid/trunk/qpid qpid"
Then I ran "patch -i QPID-5437.patch --dry-run -p0" in the Java branch.
The patch seemed successful. From there I did an "ant build" and got the
file "qpid-all.jar"
Looking for where I would go from here to get this running and bound to a
different IP?

I am finding that when I run it there is no main class specified.

On 12/19/13 6:11 PM, "Rob Godfrey" <[hidden email]> wrote:

>I've created https://issues.apache.org/jira/browse/QPID-5437 and attached
>a
>quick patch to allow for HTTP ports to be bound to a speicifc address in
>the same way that AMQP ports are.  The patch is against the head of trunk
>rather than 0.22, though I don't imagine it'd be too difficult to get it
>to
>apply to that version.
>
>Hope this helps,
>Rob
>
>
>On 20 December 2013 00:51, Robbie Gemmell <[hidden email]>
>wrote:
>
>> On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:
>>
>> > So it looks like it will be a completely trivial fix to allow the HTTP
>> port
>> > to bind to different interfaces... the JMX (as Robbie says) not so
>> much...
>> > however if you don't need the JMX management plugin you can disable
>>it.
>> >
>>
>> It shouldnt be too much harder to implement for the JMX ports either, it
>> would likely just need use of some custom RMIServerSocketFactory
>> implementations, something we already do for other reasons (e.g
>> QpidSslRMIServerSocketFactory to allow use of SSL config other than the
>>JVM
>> default)
>>
>> The bit I was speaking to earlier is that the interfaces JMX listens on
>>are
>> completely distinct from the single IP/host it can actually advertise
>>the
>> JMXConnectorServer as being available at in the registry.
>>
>>
>> >
>> > If we patch up the HTTP management then all you'll need to do is
>>change
>> the
>> > initial config file to be populated with something like
>>"bindingAddress":
>> > "${openshift.app_ip}" and then modify the qpid start script to set
>>that
>> > config parameter from the environment.
>> >
>> >
>> You can pass "-Dfoo=bar" type values via the QPID_OPTS environment
>>variable
>> the script makes available.
>>
>>
>> > Obviously if you are giving the users access to the http management
>>then
>> > they might try to do things like add more ports to the broker, and
>>then
>> if
>> > they don't similarly restrict themselves to binding to only their
>>given
>> > address then you'd get conflicts... You could - I imagine prevent this
>> > either through locking down the Qpid config somewhat, or maybe at the
>> Linux
>> > level...
>> >
>> > If you're willing to run a patched version of the code I can probably
>> send
>> > you a patch by tmr which will allow the HTTP port to be bound to a
>> specific
>> > address in the same way that the AMQP port is.
>> >
>> > Hope this helps,
>> > Rob
>> >
>> >
>> > On 20 December 2013 00:26, Kyle Crumpton (kcrumpto)
>><[hidden email]
>> > >wrote:
>> >
>> > > Hi Keith, Rob.
>> > >
>> > > Thank you for your replies.
>> > > I am actually at a point where I am trying to get qpid running on a
>> PaaS
>> > > instance in a linux container.
>> > >
>> > > Scenario is
>> > > User creates app: test in namespace test
>> > > domain is example.com
>> > > so you create this app on your PaaS which exists on your server:
>> > > "node1.example.com"
>> > > So what will happen is you have a bind server which will create an
>> entry:
>> > > test-test.example.com CNAME IN node1.example.com
>> > > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP
>> which
>> > > will allow the user to bind to that IP instead of 127.0.0.1 which
>>would
>> > > just steal the port from the host machine.
>> > > So for example, test-test.example.com could have an IP 127.1.2.3;
>> > > Another user could create their own app too, say "test2" which would
>> also
>> > > be allocated a different IP address on the node1.example.com
>>machine.
>> > > This server is then treated as a gateway to your app which exists
>>on a
>> > > linux container. From here I'd want the user to be able to "add"
>>qpid
>> to
>> > > the app.
>> > >
>> > > So right now what would happen is, the main server,
>>node1.example.comis
>> > > running an http interface on port 8080 already. This will fail with
>>an
>> > > invalid port. I know you can configure the port, but that does not
>>seem
>> > to
>> > > be the proper way to handle the problem?
>> > >
>> > > Say you have 3 users who want to use qpid on their 3 respective
>>apps..
>> It
>> > > seems that it'd be better to bind to the same ports on different IPs
>> then
>> > > to different ports on the same IP.
>> > >
>> > > Any thoughts?
>> > >
>> > > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
>> > >
>> > > >Hello Kyle,
>> > > >
>> > > >Yes, this is supported.  You can make the AMQP port bind to a
>> > > >particular interface using the binding address attribute.     Use
>>the
>> > > >Web Management Console to edit the AMQP port and specify a binding
>> > > >address (127.1.244.129 in your case).  Once done, restart the
>>Broker
>> > > >for that change to take effect.
>> > > >
>> > > >The Java Broker docs describe the process of editing the port.
>> > > >
>> > > >
>> > >
>> >
>>
>>http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Po
>>r
>> > > >ts.html#Java-Broker-Ports-Configuring
>> > > >
>> > > >You can't yet specify a binding address for HTTP Management or JMX.
>> > > >
>> > > >Hope this helps.
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
>> > > >> Sorry Kyle,
>> > > >>
>> > > >> Gordon and I are giving you information about the C++ broker, not
>> the
>> > > >>Java
>> > > >> broker.  I will need to defer to one of the Java broker folks to
>> > answer
>> > > >>for
>> > > >> that component.
>> > > >>
>> > > >> -Ted
>> > > >>
>> > > >>
>> > > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>
>> > > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
>> > > >>> qpid-java-broker-0.22.tar.gz
>> > > >>>
>> > > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
>> > > >>>
>> > > >>>> Kyle,
>> > > >>>>
>> > > >>>> That feature was added in release 0.20
>> > > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
>> > using
>> > > >>>>an
>> > > >>>> older version.
>> > > >>>>
>> > > >>>> -Ted
>> > > >>>>
>> > > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>>>
>> > > >>>>> Hi. I did this and I got the error: Unrecognized option:
>> > --interface
>> > > >>>>>
>> > > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
>> > > >>>>>
>> > > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
>> > > >>>>>>>
>> > > >>>>>>> I am just curious if there is a way to bind qpid to an IP
>>such
>> as
>> > > >>>>>>> 127.1.244.129
>> > > >>>>>>>
>> > > >>>>>>> The reason I ask is I'm looking to deploy many instances to
>>a
>> > PaaS
>> > > >>>>>>>and
>> > > >>>>>>> will need multiple running instances. This is not possible
>>if
>> > > >>>>>>> everything
>> > > >>>>>>> tries to bind to localhost:8080.
>> > > >>>>>>>
>> > > >>>>>>> Does anyone know of a way to configure this? I could not
>>find
>> in
>> > > >>>>>>>the
>> > > >>>>>>> qpid documentation.
>> > > >>>>>>
>> > > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd
>> will
>> > > >>>>>>bind
>> > > >>>>>> on.
>> > > >>>>>>
>> > > >>>>>>
>> > > >>>>>>
>> > >
>> >
>>
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>> > > >>>>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>>>> For additional commands, e-mail: [hidden email]
>> > > >>>>>>
>> > > >>>>>
>> > ---------------------------------------------------------------------
>> > > >>>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>>> For additional commands, e-mail: [hidden email]
>> > > >>>>>
>> > > >>>>
>> > > >>>>
>> > ---------------------------------------------------------------------
>> > > >>>> To unsubscribe, e-mail: [hidden email]
>> > > >>>> For additional commands, e-mail: [hidden email]
>> > > >>>>
>> > > >>>
>> > > >>>
>> ---------------------------------------------------------------------
>> > > >>> To unsubscribe, e-mail: [hidden email]
>> > > >>> For additional commands, e-mail: [hidden email]
>> > > >>>
>> > > >>
>> > > >>
>> > > >>
>> ---------------------------------------------------------------------
>> > > >> To unsubscribe, e-mail: [hidden email]
>> > > >> For additional commands, e-mail: [hidden email]
>> > > >>
>> > > >
>> > >
>>>---------------------------------------------------------------------
>> > > >To unsubscribe, e-mail: [hidden email]
>> > > >For additional commands, e-mail: [hidden email]
>> > > >
>> > >
>> > >
>> > >
>>---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: [hidden email]
>> > > For additional commands, e-mail: [hidden email]
>> > >
>> > >
>> >
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

rgodfrey
So, when I'm developing I normally just start up the broker with

build/bin/qpid-server

from the qpid/java root.

From there you can either configure the IP through the config file or using
the web UI for the server.  The difference is that the HTTP port should now
allow binding address as an option (as the AMQP port does).  As previously
this isn't going to fix the JMX port, so JMS management will have to be
disabled.

Hope this helps,
Rob


On 6 January 2014 18:31, Kyle Crumpton (kcrumpto) <[hidden email]>wrote:

> Hi Rob, Sorry for the really late reply / hope you remember this thread.
>
> I got some assistance from the irc. I pulled the latest source using "svn
> checkout http://svn.apache.org/repos/asf/qpid/trunk/qpid qpid"
> Then I ran "patch -i QPID-5437.patch --dry-run -p0" in the Java branch.
> The patch seemed successful. From there I did an "ant build" and got the
> file "qpid-all.jar"
> Looking for where I would go from here to get this running and bound to a
> different IP?
>
> I am finding that when I run it there is no main class specified.
>
> On 12/19/13 6:11 PM, "Rob Godfrey" <[hidden email]> wrote:
>
> >I've created https://issues.apache.org/jira/browse/QPID-5437 and attached
> >a
> >quick patch to allow for HTTP ports to be bound to a speicifc address in
> >the same way that AMQP ports are.  The patch is against the head of trunk
> >rather than 0.22, though I don't imagine it'd be too difficult to get it
> >to
> >apply to that version.
> >
> >Hope this helps,
> >Rob
> >
> >
> >On 20 December 2013 00:51, Robbie Gemmell <[hidden email]>
> >wrote:
> >
> >> On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:
> >>
> >> > So it looks like it will be a completely trivial fix to allow the HTTP
> >> port
> >> > to bind to different interfaces... the JMX (as Robbie says) not so
> >> much...
> >> > however if you don't need the JMX management plugin you can disable
> >>it.
> >> >
> >>
> >> It shouldnt be too much harder to implement for the JMX ports either, it
> >> would likely just need use of some custom RMIServerSocketFactory
> >> implementations, something we already do for other reasons (e.g
> >> QpidSslRMIServerSocketFactory to allow use of SSL config other than the
> >>JVM
> >> default)
> >>
> >> The bit I was speaking to earlier is that the interfaces JMX listens on
> >>are
> >> completely distinct from the single IP/host it can actually advertise
> >>the
> >> JMXConnectorServer as being available at in the registry.
> >>
> >>
> >> >
> >> > If we patch up the HTTP management then all you'll need to do is
> >>change
> >> the
> >> > initial config file to be populated with something like
> >>"bindingAddress":
> >> > "${openshift.app_ip}" and then modify the qpid start script to set
> >>that
> >> > config parameter from the environment.
> >> >
> >> >
> >> You can pass "-Dfoo=bar" type values via the QPID_OPTS environment
> >>variable
> >> the script makes available.
> >>
> >>
> >> > Obviously if you are giving the users access to the http management
> >>then
> >> > they might try to do things like add more ports to the broker, and
> >>then
> >> if
> >> > they don't similarly restrict themselves to binding to only their
> >>given
> >> > address then you'd get conflicts... You could - I imagine prevent this
> >> > either through locking down the Qpid config somewhat, or maybe at the
> >> Linux
> >> > level...
> >> >
> >> > If you're willing to run a patched version of the code I can probably
> >> send
> >> > you a patch by tmr which will allow the HTTP port to be bound to a
> >> specific
> >> > address in the same way that the AMQP port is.
> >> >
> >> > Hope this helps,
> >> > Rob
> >> >
> >> >
> >> > On 20 December 2013 00:26, Kyle Crumpton (kcrumpto)
> >><[hidden email]
> >> > >wrote:
> >> >
> >> > > Hi Keith, Rob.
> >> > >
> >> > > Thank you for your replies.
> >> > > I am actually at a point where I am trying to get qpid running on a
> >> PaaS
> >> > > instance in a linux container.
> >> > >
> >> > > Scenario is
> >> > > User creates app: test in namespace test
> >> > > domain is example.com
> >> > > so you create this app on your PaaS which exists on your server:
> >> > > "node1.example.com"
> >> > > So what will happen is you have a bind server which will create an
> >> entry:
> >> > > test-test.example.com CNAME IN node1.example.com
> >> > > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP
> >> which
> >> > > will allow the user to bind to that IP instead of 127.0.0.1 which
> >>would
> >> > > just steal the port from the host machine.
> >> > > So for example, test-test.example.com could have an IP 127.1.2.3;
> >> > > Another user could create their own app too, say "test2" which would
> >> also
> >> > > be allocated a different IP address on the node1.example.com
> >>machine.
> >> > > This server is then treated as a gateway to your app which exists
> >>on a
> >> > > linux container. From here I'd want the user to be able to "add"
> >>qpid
> >> to
> >> > > the app.
> >> > >
> >> > > So right now what would happen is, the main server,
> >>node1.example.comis
> >> > > running an http interface on port 8080 already. This will fail with
> >>an
> >> > > invalid port. I know you can configure the port, but that does not
> >>seem
> >> > to
> >> > > be the proper way to handle the problem?
> >> > >
> >> > > Say you have 3 users who want to use qpid on their 3 respective
> >>apps..
> >> It
> >> > > seems that it'd be better to bind to the same ports on different IPs
> >> then
> >> > > to different ports on the same IP.
> >> > >
> >> > > Any thoughts?
> >> > >
> >> > > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
> >> > >
> >> > > >Hello Kyle,
> >> > > >
> >> > > >Yes, this is supported.  You can make the AMQP port bind to a
> >> > > >particular interface using the binding address attribute.     Use
> >>the
> >> > > >Web Management Console to edit the AMQP port and specify a binding
> >> > > >address (127.1.244.129 in your case).  Once done, restart the
> >>Broker
> >> > > >for that change to take effect.
> >> > > >
> >> > > >The Java Broker docs describe the process of editing the port.
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >>
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Po
> >>r
> >> > > >ts.html#Java-Broker-Ports-Configuring
> >> > > >
> >> > > >You can't yet specify a binding address for HTTP Management or JMX.
> >> > > >
> >> > > >Hope this helps.
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
> >> > > >> Sorry Kyle,
> >> > > >>
> >> > > >> Gordon and I are giving you information about the C++ broker, not
> >> the
> >> > > >>Java
> >> > > >> broker.  I will need to defer to one of the Java broker folks to
> >> > answer
> >> > > >>for
> >> > > >> that component.
> >> > > >>
> >> > > >> -Ted
> >> > > >>
> >> > > >>
> >> > > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>
> >> > > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> >> > > >>> qpid-java-broker-0.22.tar.gz
> >> > > >>>
> >> > > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
> >> > > >>>
> >> > > >>>> Kyle,
> >> > > >>>>
> >> > > >>>> That feature was added in release 0.20
> >> > > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
> >> > using
> >> > > >>>>an
> >> > > >>>> older version.
> >> > > >>>>
> >> > > >>>> -Ted
> >> > > >>>>
> >> > > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>>>
> >> > > >>>>> Hi. I did this and I got the error: Unrecognized option:
> >> > --interface
> >> > > >>>>>
> >> > > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
> >> > > >>>>>
> >> > > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>>>>>
> >> > > >>>>>>> I am just curious if there is a way to bind qpid to an IP
> >>such
> >> as
> >> > > >>>>>>> 127.1.244.129
> >> > > >>>>>>>
> >> > > >>>>>>> The reason I ask is I'm looking to deploy many instances to
> >>a
> >> > PaaS
> >> > > >>>>>>>and
> >> > > >>>>>>> will need multiple running instances. This is not possible
> >>if
> >> > > >>>>>>> everything
> >> > > >>>>>>> tries to bind to localhost:8080.
> >> > > >>>>>>>
> >> > > >>>>>>> Does anyone know of a way to configure this? I could not
> >>find
> >> in
> >> > > >>>>>>>the
> >> > > >>>>>>> qpid documentation.
> >> > > >>>>>>
> >> > > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd
> >> will
> >> > > >>>>>>bind
> >> > > >>>>>> on.
> >> > > >>>>>>
> >> > > >>>>>>
> >> > > >>>>>>
> >> > >
> >> >
> >>
> >>>>>>>>-------------------------------------------------------------------
> >>>>>>>>--
> >> > > >>>>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>>>
> >> > > >>>>>
> >> > ---------------------------------------------------------------------
> >> > > >>>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>>
> >> > > >>>>
> >> > > >>>>
> >> > ---------------------------------------------------------------------
> >> > > >>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>
> >> > > >>>
> >> > > >>>
> >> ---------------------------------------------------------------------
> >> > > >>> To unsubscribe, e-mail: [hidden email]
> >> > > >>> For additional commands, e-mail: [hidden email]
> >> > > >>>
> >> > > >>
> >> > > >>
> >> > > >>
> >> ---------------------------------------------------------------------
> >> > > >> To unsubscribe, e-mail: [hidden email]
> >> > > >> For additional commands, e-mail: [hidden email]
> >> > > >>
> >> > > >
> >> > >
> >>>---------------------------------------------------------------------
> >> > > >To unsubscribe, e-mail: [hidden email]
> >> > > >For additional commands, e-mail: [hidden email]
> >> > > >
> >> > >
> >> > >
> >> > >
> >>---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: [hidden email]
> >> > > For additional commands, e-mail: [hidden email]
> >> > >
> >> > >
> >> >
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Way to bind qpid to a different IP?

Robbie Gemmell
Administrator
In reply to this post by Kyle Crumpton (kcrumpto)
I think Rob might have applied that patch on trunk yesterday, if so it
should now be in the latest nightly broker release archive at:
https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Artefact-Release/lastSuccessfulBuild/artifact/trunk/qpid/java/broker/release/

Alternatively, you can build your own verison by running 'ant release-bin'
(adding -Doptional=true if you want the optional bdbstore included) in
qpid/java and then looking in qpid/java/broker/release

qpid-all.jar is an [annoyingly named] manifest jar, it has no code in it
and I can believe it probably doenst have the main-file set. As Rob
suggests, you can start the broker using the scripts.

Although it wont account for this new addition, you might find the the
broker docs useful at:
http://qpid.apache.org/releases/qpid-0.24/java-broker/book/index.html

Robbie

On 6 January 2014 17:31, Kyle Crumpton (kcrumpto) <[hidden email]>wrote:

> Hi Rob, Sorry for the really late reply / hope you remember this thread.
>
> I got some assistance from the irc. I pulled the latest source using "svn
> checkout http://svn.apache.org/repos/asf/qpid/trunk/qpid qpid"
> Then I ran "patch -i QPID-5437.patch --dry-run -p0" in the Java branch.
> The patch seemed successful. From there I did an "ant build" and got the
> file "qpid-all.jar"
> Looking for where I would go from here to get this running and bound to a
> different IP?
>
> I am finding that when I run it there is no main class specified.
>
> On 12/19/13 6:11 PM, "Rob Godfrey" <[hidden email]> wrote:
>
> >I've created https://issues.apache.org/jira/browse/QPID-5437 and attached
> >a
> >quick patch to allow for HTTP ports to be bound to a speicifc address in
> >the same way that AMQP ports are.  The patch is against the head of trunk
> >rather than 0.22, though I don't imagine it'd be too difficult to get it
> >to
> >apply to that version.
> >
> >Hope this helps,
> >Rob
> >
> >
> >On 20 December 2013 00:51, Robbie Gemmell <[hidden email]>
> >wrote:
> >
> >> On 19 December 2013 23:36, Rob Godfrey <[hidden email]> wrote:
> >>
> >> > So it looks like it will be a completely trivial fix to allow the HTTP
> >> port
> >> > to bind to different interfaces... the JMX (as Robbie says) not so
> >> much...
> >> > however if you don't need the JMX management plugin you can disable
> >>it.
> >> >
> >>
> >> It shouldnt be too much harder to implement for the JMX ports either, it
> >> would likely just need use of some custom RMIServerSocketFactory
> >> implementations, something we already do for other reasons (e.g
> >> QpidSslRMIServerSocketFactory to allow use of SSL config other than the
> >>JVM
> >> default)
> >>
> >> The bit I was speaking to earlier is that the interfaces JMX listens on
> >>are
> >> completely distinct from the single IP/host it can actually advertise
> >>the
> >> JMXConnectorServer as being available at in the registry.
> >>
> >>
> >> >
> >> > If we patch up the HTTP management then all you'll need to do is
> >>change
> >> the
> >> > initial config file to be populated with something like
> >>"bindingAddress":
> >> > "${openshift.app_ip}" and then modify the qpid start script to set
> >>that
> >> > config parameter from the environment.
> >> >
> >> >
> >> You can pass "-Dfoo=bar" type values via the QPID_OPTS environment
> >>variable
> >> the script makes available.
> >>
> >>
> >> > Obviously if you are giving the users access to the http management
> >>then
> >> > they might try to do things like add more ports to the broker, and
> >>then
> >> if
> >> > they don't similarly restrict themselves to binding to only their
> >>given
> >> > address then you'd get conflicts... You could - I imagine prevent this
> >> > either through locking down the Qpid config somewhat, or maybe at the
> >> Linux
> >> > level...
> >> >
> >> > If you're willing to run a patched version of the code I can probably
> >> send
> >> > you a patch by tmr which will allow the HTTP port to be bound to a
> >> specific
> >> > address in the same way that the AMQP port is.
> >> >
> >> > Hope this helps,
> >> > Rob
> >> >
> >> >
> >> > On 20 December 2013 00:26, Kyle Crumpton (kcrumpto)
> >><[hidden email]
> >> > >wrote:
> >> >
> >> > > Hi Keith, Rob.
> >> > >
> >> > > Thank you for your replies.
> >> > > I am actually at a point where I am trying to get qpid running on a
> >> PaaS
> >> > > instance in a linux container.
> >> > >
> >> > > Scenario is
> >> > > User creates app: test in namespace test
> >> > > domain is example.com
> >> > > so you create this app on your PaaS which exists on your server:
> >> > > "node1.example.com"
> >> > > So what will happen is you have a bind server which will create an
> >> entry:
> >> > > test-test.example.com CNAME IN node1.example.com
> >> > > This app will be spawned with an attribute OPENSHIFT_<APP_TYPE>_IP
> >> which
> >> > > will allow the user to bind to that IP instead of 127.0.0.1 which
> >>would
> >> > > just steal the port from the host machine.
> >> > > So for example, test-test.example.com could have an IP 127.1.2.3;
> >> > > Another user could create their own app too, say "test2" which would
> >> also
> >> > > be allocated a different IP address on the node1.example.com
> >>machine.
> >> > > This server is then treated as a gateway to your app which exists
> >>on a
> >> > > linux container. From here I'd want the user to be able to "add"
> >>qpid
> >> to
> >> > > the app.
> >> > >
> >> > > So right now what would happen is, the main server,
> >>node1.example.comis
> >> > > running an http interface on port 8080 already. This will fail with
> >>an
> >> > > invalid port. I know you can configure the port, but that does not
> >>seem
> >> > to
> >> > > be the proper way to handle the problem?
> >> > >
> >> > > Say you have 3 users who want to use qpid on their 3 respective
> >>apps..
> >> It
> >> > > seems that it'd be better to bind to the same ports on different IPs
> >> then
> >> > > to different ports on the same IP.
> >> > >
> >> > > Any thoughts?
> >> > >
> >> > > On 12/19/13 5:18 PM, "Keith W" <[hidden email]> wrote:
> >> > >
> >> > > >Hello Kyle,
> >> > > >
> >> > > >Yes, this is supported.  You can make the AMQP port bind to a
> >> > > >particular interface using the binding address attribute.     Use
> >>the
> >> > > >Web Management Console to edit the AMQP port and specify a binding
> >> > > >address (127.1.244.129 in your case).  Once done, restart the
> >>Broker
> >> > > >for that change to take effect.
> >> > > >
> >> > > >The Java Broker docs describe the process of editing the port.
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >>
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Po
> >>r
> >> > > >ts.html#Java-Broker-Ports-Configuring
> >> > > >
> >> > > >You can't yet specify a binding address for HTTP Management or JMX.
> >> > > >
> >> > > >Hope this helps.
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >On 19 December 2013 21:18, Ted Ross <[hidden email]> wrote:
> >> > > >> Sorry Kyle,
> >> > > >>
> >> > > >> Gordon and I are giving you information about the C++ broker, not
> >> the
> >> > > >>Java
> >> > > >> broker.  I will need to defer to one of the Java broker folks to
> >> > answer
> >> > > >>for
> >> > > >> that component.
> >> > > >>
> >> > > >> -Ted
> >> > > >>
> >> > > >>
> >> > > >> On 12/19/2013 04:03 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>
> >> > > >>> Hi Ted. I am using version 0.22. I actually got qpid from tar:
> >> > > >>> qpid-java-broker-0.22.tar.gz
> >> > > >>>
> >> > > >>> On 12/19/13 3:00 PM, "Ted Ross" <[hidden email]> wrote:
> >> > > >>>
> >> > > >>>> Kyle,
> >> > > >>>>
> >> > > >>>> That feature was added in release 0.20
> >> > > >>>> (https://issues.apache.org/jira/browse/QPID-3351).  You may be
> >> > using
> >> > > >>>>an
> >> > > >>>> older version.
> >> > > >>>>
> >> > > >>>> -Ted
> >> > > >>>>
> >> > > >>>> On 12/19/2013 03:15 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>>>
> >> > > >>>>> Hi. I did this and I got the error: Unrecognized option:
> >> > --interface
> >> > > >>>>>
> >> > > >>>>> On 12/19/13 12:59 PM, "Gordon Sim" <[hidden email]> wrote:
> >> > > >>>>>
> >> > > >>>>>> On 12/19/2013 06:45 PM, Kyle Crumpton (kcrumpto) wrote:
> >> > > >>>>>>>
> >> > > >>>>>>> I am just curious if there is a way to bind qpid to an IP
> >>such
> >> as
> >> > > >>>>>>> 127.1.244.129
> >> > > >>>>>>>
> >> > > >>>>>>> The reason I ask is I'm looking to deploy many instances to
> >>a
> >> > PaaS
> >> > > >>>>>>>and
> >> > > >>>>>>> will need multiple running instances. This is not possible
> >>if
> >> > > >>>>>>> everything
> >> > > >>>>>>> tries to bind to localhost:8080.
> >> > > >>>>>>>
> >> > > >>>>>>> Does anyone know of a way to configure this? I could not
> >>find
> >> in
> >> > > >>>>>>>the
> >> > > >>>>>>> qpid documentation.
> >> > > >>>>>>
> >> > > >>>>>> Yes, you can use --interface to restrict the interfaces qpidd
> >> will
> >> > > >>>>>>bind
> >> > > >>>>>> on.
> >> > > >>>>>>
> >> > > >>>>>>
> >> > > >>>>>>
> >> > >
> >> >
> >>
> >>>>>>>>-------------------------------------------------------------------
> >>>>>>>>--
> >> > > >>>>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>>>
> >> > > >>>>>
> >> > ---------------------------------------------------------------------
> >> > > >>>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>>
> >> > > >>>>
> >> > > >>>>
> >> > ---------------------------------------------------------------------
> >> > > >>>> To unsubscribe, e-mail: [hidden email]
> >> > > >>>> For additional commands, e-mail: [hidden email]
> >> > > >>>>
> >> > > >>>
> >> > > >>>
> >> ---------------------------------------------------------------------
> >> > > >>> To unsubscribe, e-mail: [hidden email]
> >> > > >>> For additional commands, e-mail: [hidden email]
> >> > > >>>
> >> > > >>
> >> > > >>
> >> > > >>
> >> ---------------------------------------------------------------------
> >> > > >> To unsubscribe, e-mail: [hidden email]
> >> > > >> For additional commands, e-mail: [hidden email]
> >> > > >>
> >> > > >
> >> > >
> >>>---------------------------------------------------------------------
> >> > > >To unsubscribe, e-mail: [hidden email]
> >> > > >For additional commands, e-mail: [hidden email]
> >> > > >
> >> > >
> >> > >
> >> > >
> >>---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: [hidden email]
> >> > > For additional commands, e-mail: [hidden email]
> >> > >
> >> > >
> >> >
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Loading...