You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Eugene Prokopiev <pr...@stc.donpac.ru> on 2006/08/12 13:07:20 UTC

Master/Slave with authentication

Hi,

Is it possible to use brokers with authentication as master and slave?

I have started master broker. Next I try to configure slave:

<beans xmlns="http://activemq.org/config/1.0">

         <broker name="m1" persistent="false" 
masterConnectorURI="tcp://m0:5000" userName="admin1" password="pw1">

         <transportConnectors>
                 <transportConnector uri="tcp://localhost:5000"/>
                 </transportConnectors>

                 <persistenceAdapter>
                 <memoryPersistenceAdapter/>
                 </persistenceAdapter>

                 <plugins>
                 <jaasAuthenticationPlugin 
configuration="activemq-domain" />
                 <authorizationPlugin>
                                 <map>
                         <authorizationMap>
                                         <authorizationEntries>
                                 <authorizationEntry topic=">" 
read="admins" write="admins" admin="admins" />
                                                 <authorizationEntry 
topic="messages.>" read="consumers" write="producers" 
admin="producers,consumers,admins" />
                                                 <authorizationEntry 
queue="messages.>" read="consumers" write="producers" 
admin="producers,consumers,admins" />
                                 <authorizationEntry 
topic="ActiveMQ.Advisory.>" read="producers,consumers" 
write="producers,consumers" admin="producers,consumers"/>
                                         </authorizationEntries>
                         </authorizationMap>
                         </map>
             </authorizationPlugin>
                 </plugins>
 

     </broker>

</beans>

On starting it I got:

Exception in thread "main" 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'broker' defined in file 
[/home/john/manager/conf/broker.xml]: Invocation of init method failed; 
nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'm0' defined in file 
[/home/john/manager/conf/activemq.xml]: Error setting property values; 
nested exception is 
org.springframework.beans.NotWritablePropertyException: Invalid property 
'userName' of bean class [org.apache.activemq.xbean.XBeanBrokerService]: 
Bean property 'userName' is not writable or has an invalid setter 
method. Does the parameter type of the setter match the return type of 
the getter?
Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'm0' defined in file 
[/home/john/manager/conf/activemq.xml]: Error setting property values; 
nested exception is 
org.springframework.beans.NotWritablePropertyException: Invalid property 
'userName' of bean class [org.apache.activemq.xbean.XBeanBrokerService]: 
Bean property 'userName' is not writable or has an invalid setter 
method. Does the parameter type of the setter match the return type of 
the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: 
Invalid property 'userName' of bean class 
[org.apache.activemq.xbean.XBeanBrokerService]: Bean property 'userName' 
is not writable or has an invalid setter method. Does the parameter type 
of the setter match the return type of the getter?

But on this page http://activemq.org/site/masterslave.html userName and 
password are described.

Which AMQ version need I use for this params?

--
Thanks,
Eugene Prokopiev


Re: Master/Slave with authentication

Posted by James Strachan <ja...@gmail.com>.
On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> Thanks. From the doc, this feature is available only in 4.1, is 4.1
> production ready ?

Yes - the change was a very minor configuration change.

> From the jira roadmap, it is not clear when 4.1 will
> be released.

In a couple of weeks I hope
-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Master/Slave with authentication

Posted by Sandeep Chayapathi <sa...@wssource.com>.
Thanks. From the doc, this feature is available only in 4.1, is 4.1 
production ready ? From the jira roadmap, it is not clear when 4.1 will 
be released.

- Sandeep

James Strachan wrote:
> On 8/18/06, James Strachan <ja...@gmail.com> wrote:
>> Unfortunately the current code base doesn't allow you to easily
>> configure the userName/password on the MasterConnector. I'm just going
>> to have an attempt at a minor refactoring to make it a bit easier to
>> configure this...
>
> I've patched SVN to allow you more easily to configure the
> MasterConnector using a <masterConnector/> element as this example
> shows (at the bottom of the page)
>
> http://activemq.org/site/masterslave.html
>


Re: Master/Slave with authentication

Posted by James Strachan <ja...@gmail.com>.
On 8/18/06, James Strachan <ja...@gmail.com> wrote:
> Unfortunately the current code base doesn't allow you to easily
> configure the userName/password on the MasterConnector. I'm just going
> to have an attempt at a minor refactoring to make it a bit easier to
> configure this...

I've patched SVN to allow you more easily to configure the
MasterConnector using a <masterConnector/> element as this example
shows (at the bottom of the page)

http://activemq.org/site/masterslave.html

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Master/Slave with authentication

Posted by James Strachan <ja...@gmail.com>.
Unfortunately the current code base doesn't allow you to easily
configure the userName/password on the MasterConnector. I'm just going
to have an attempt at a minor refactoring to make it a bit easier to
configure this...


On 8/17/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> Hi all,
>  Anyone know the answer for this ? I too am facing the same problem.
> Moreover, I checked the xsd
> (http://people.apache.org/maven-snapshot-repository/incubator-activemq/incubator-activemq/4.1-SNAPSHOT/activemq.xsd.html)
> does not mention about "userName" & "password" properties for broker.
>
> - Sandeep
>
> Eugene Prokopiev wrote:
> > Hi,
> >
> > Is it possible to use brokers with authentication as master and slave?
> >
> > I have started master broker. Next I try to configure slave:
> >
> > <beans xmlns="http://activemq.org/config/1.0">
> >
> >         <broker name="m1" persistent="false"
> > masterConnectorURI="tcp://m0:5000" userName="admin1" password="pw1">
> >
> >         <transportConnectors>
> >                 <transportConnector uri="tcp://localhost:5000"/>
> >                 </transportConnectors>
> >
> >                 <persistenceAdapter>
> >                 <memoryPersistenceAdapter/>
> >                 </persistenceAdapter>
> >
> >                 <plugins>
> >                 <jaasAuthenticationPlugin
> > configuration="activemq-domain" />
> >                 <authorizationPlugin>
> >                                 <map>
> >                         <authorizationMap>
> >                                         <authorizationEntries>
> >                                 <authorizationEntry topic=">"
> > read="admins" write="admins" admin="admins" />
> >                                                 <authorizationEntry
> > topic="messages.>" read="consumers" write="producers"
> > admin="producers,consumers,admins" />
> >                                                 <authorizationEntry
> > queue="messages.>" read="consumers" write="producers"
> > admin="producers,consumers,admins" />
> >                                 <authorizationEntry
> > topic="ActiveMQ.Advisory.>" read="producers,consumers"
> > write="producers,consumers" admin="producers,consumers"/>
> >                                         </authorizationEntries>
> >                         </authorizationMap>
> >                         </map>
> >             </authorizationPlugin>
> >                 </plugins>
> >
> >
> >     </broker>
> >
> > </beans>
> >
> > On starting it I got:
> >
> > Exception in thread "main"
> > org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'broker' defined in file
> > [/home/john/manager/conf/broker.xml]: Invocation of init method
> > failed; nested exception is
> > org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'm0' defined in file
> > [/home/john/manager/conf/activemq.xml]: Error setting property values;
> > nested exception is
> > org.springframework.beans.NotWritablePropertyException: Invalid
> > property 'userName' of bean class
> > [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
> > 'userName' is not writable or has an invalid setter method. Does the
> > parameter type of the setter match the return type of the getter?
> > Caused by: org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'm0' defined in file
> > [/home/john/manager/conf/activemq.xml]: Error setting property values;
> > nested exception is
> > org.springframework.beans.NotWritablePropertyException: Invalid
> > property 'userName' of bean class
> > [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
> > 'userName' is not writable or has an invalid setter method. Does the
> > parameter type of the setter match the return type of the getter?
> > Caused by: org.springframework.beans.NotWritablePropertyException:
> > Invalid property 'userName' of bean class
> > [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
> > 'userName' is not writable or has an invalid setter method. Does the
> > parameter type of the setter match the return type of the getter?
> >
> > But on this page http://activemq.org/site/masterslave.html userName
> > and password are described.
> >
> > Which AMQ version need I use for this params?
> >
> > --
> > Thanks,
> > Eugene Prokopiev
> >
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Master/Slave with authentication

Posted by Sandeep Chayapathi <sa...@wssource.com>.
Hi all,
 Anyone know the answer for this ? I too am facing the same problem. 
Moreover, I checked the xsd 
(http://people.apache.org/maven-snapshot-repository/incubator-activemq/incubator-activemq/4.1-SNAPSHOT/activemq.xsd.html) 
does not mention about "userName" & "password" properties for broker.

- Sandeep

Eugene Prokopiev wrote:
> Hi,
>
> Is it possible to use brokers with authentication as master and slave?
>
> I have started master broker. Next I try to configure slave:
>
> <beans xmlns="http://activemq.org/config/1.0">
>
>         <broker name="m1" persistent="false" 
> masterConnectorURI="tcp://m0:5000" userName="admin1" password="pw1">
>
>         <transportConnectors>
>                 <transportConnector uri="tcp://localhost:5000"/>
>                 </transportConnectors>
>
>                 <persistenceAdapter>
>                 <memoryPersistenceAdapter/>
>                 </persistenceAdapter>
>
>                 <plugins>
>                 <jaasAuthenticationPlugin 
> configuration="activemq-domain" />
>                 <authorizationPlugin>
>                                 <map>
>                         <authorizationMap>
>                                         <authorizationEntries>
>                                 <authorizationEntry topic=">" 
> read="admins" write="admins" admin="admins" />
>                                                 <authorizationEntry 
> topic="messages.>" read="consumers" write="producers" 
> admin="producers,consumers,admins" />
>                                                 <authorizationEntry 
> queue="messages.>" read="consumers" write="producers" 
> admin="producers,consumers,admins" />
>                                 <authorizationEntry 
> topic="ActiveMQ.Advisory.>" read="producers,consumers" 
> write="producers,consumers" admin="producers,consumers"/>
>                                         </authorizationEntries>
>                         </authorizationMap>
>                         </map>
>             </authorizationPlugin>
>                 </plugins>
>
>
>     </broker>
>
> </beans>
>
> On starting it I got:
>
> Exception in thread "main" 
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'broker' defined in file 
> [/home/john/manager/conf/broker.xml]: Invocation of init method 
> failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'm0' defined in file 
> [/home/john/manager/conf/activemq.xml]: Error setting property values; 
> nested exception is 
> org.springframework.beans.NotWritablePropertyException: Invalid 
> property 'userName' of bean class 
> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property 
> 'userName' is not writable or has an invalid setter method. Does the 
> parameter type of the setter match the return type of the getter?
> Caused by: org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'm0' defined in file 
> [/home/john/manager/conf/activemq.xml]: Error setting property values; 
> nested exception is 
> org.springframework.beans.NotWritablePropertyException: Invalid 
> property 'userName' of bean class 
> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property 
> 'userName' is not writable or has an invalid setter method. Does the 
> parameter type of the setter match the return type of the getter?
> Caused by: org.springframework.beans.NotWritablePropertyException: 
> Invalid property 'userName' of bean class 
> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property 
> 'userName' is not writable or has an invalid setter method. Does the 
> parameter type of the setter match the return type of the getter?
>
> But on this page http://activemq.org/site/masterslave.html userName 
> and password are described.
>
> Which AMQ version need I use for this params?
>
> -- 
> Thanks,
> Eugene Prokopiev
>