ActiveMQ FileServer Authentication

2015-09-10 Thread brusoth09
I'm using ActiveMQ's file server in this location
http://localhost:8161/fileserver/. While authenticate this file server. I
made small change in jetty.xml file and added a new line. (used same
credential as admin portal).






Then While using activemq blob messaging i used 
jms.blobTransferPolicy.UploadUrl=http://admin:admin@localhost:8161/fileserver/

But i could able to authenticate using correct username and password. Stack
Trace below:-
 javax.jms.JMSException: PUT was not successful: 401 Unauthorized
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
at
org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:177)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1882)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223)
at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
at
com.burusoth.test.ActiveMQProducer.Producer.sendLargeFiles(Producer.java:105)
at com.burusoth.test.ActiveMQProducer.Main.main(Main.java:11)
Caused by: java.io.IOException: PUT was not successful: 401 Unauthorized
at
org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadStream(DefaultBlobUploadStrategy.java:69)
at
org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadFile(DefaultBlobUploadStrategy.java:43)
at org.apache.activemq.blob.BlobUploader.upload(BlobUploader.java:53)
at
org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:174)



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-FileServer-Authentication-tp4701861.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


ActiveMQ File Server Authentication

2015-09-10 Thread Burusothman Ahiladas
I'm using ActiveMQ's file server in this location
http://localhost:8161/fileserver/. While authenticate this file server. I
made small change in jetty.xml file and added a new line. (used same
credential as admin portal).






Then While using activemq blob messaging i used
jms.blobTransferPolicy.UploadUrl=http://admin:admin@localhost
:8161/fileserver/

But i could able to authenticate using correct username and password. Stack
Trace below:-
 javax.jms.JMSException: PUT was not successful: 401 Unauthorized
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
at
org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:177)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1882)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223)
at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
at
com.burusoth.test.ActiveMQProducer.Producer.sendLargeFiles(Producer.java:105)
at com.burusoth.test.ActiveMQProducer.Main.main(Main.java:11)
Caused by: java.io.IOException: PUT was not successful: 401 Unauthorized
at
org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadStream(DefaultBlobUploadStrategy.java:69)
at
org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadFile(DefaultBlobUploadStrategy.java:43)
at org.apache.activemq.blob.BlobUploader.upload(BlobUploader.java:53)
at
org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:174)

-- 
*A.Burusothman*
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
_



RE: MQTT Link Stealing

2015-09-10 Thread Shobhana
I am using version 5.11.1 with Eclipse Paho MQTT Client and find the same
issue in this version too. By default, for MQTT, allowLinkStealing is set to
true. But I see hundreds of following messages in AMQ logs :

2015-09-10 13:21:47,544 | WARN  | Failed to register MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=qrserverchat
| org.apache.activemq.broker.jmx.ManagedTransportConnection | ActiveMQ
Transport: tcp:///52.74.19.21:56042@1883
2015-09-10 13:21:47,543 | WARN  | Failed to register MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=qrserverchat
| org.apache.activemq.broker.jmx.ManagedTransportConnection | ActiveMQ
Transport: tcp:///52.74.19.21:56044@1883
2015-09-10 13:21:47,543 | WARN  | Failed to register MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=qrserverchat
| org.apache.activemq.broker.jmx.ManagedTransportConnection | ActiveMQ
Transport: tcp:///52.74.19.21:56008@1883
2015-09-10 13:21:47,543 | WARN  | Failed to register MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=qrserverchat
| org.apache.activemq.broker.jmx.ManagedTransportConnection | ActiveMQ
Transport: tcp:///52.74.19.21:56013@1883
2015-09-10 13:21:47,543 | WARN  | Failed to register MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=qrserverchat
| org.apache.activemq.broker.jmx.ManagedTransportConnection | ActiveMQ
Transport: tcp:///52.74.19.21:56009@1883
2015-09-10 13:21:47,528 | WARN  | Stealing link for clientId qrserverchat
>From Connection Transport Connection to: tcp://52.74.19.21:56241 |
org.apache.activemq.broker.region.RegionBroker | ActiveMQ Transport:
tcp:///52.74.19.21:56229@1883
2015-09-10 13:21:47,526 | WARN  | Stealing link for clientId qrserverchat
>From Connection Transport Connection to: tcp://52.74.19.21:56235 |
org.apache.activemq.broker.region.RegionBroker | ActiveMQ Transport:
tcp:///52.74.19.21:56241@1883
2015-09-10 13:21:47,526 | WARN  | Stealing link for clientId qrserverchat
>From Connection Transport Connection to: tcp://52.74.19.21:56237 |
org.apache.activemq.broker.region.RegionBroker | ActiveMQ Transport:
tcp:///52.74.19.21:56235@1883
2015-09-10 13:21:47,525 | WARN  | Stealing link for clientId qrserverchat
>From Connection Transport Connection to: tcp://52.74.19.21:56203 |
org.apache.activemq.broker.region.RegionBroker | ActiveMQ Transport:
tcp:///52.74.19.21:56237@1883

Strangely, this problems starts after running AMQ for about 6 hours and AMQ
does not recover from this issue; the only solution is to restart it! 

Does anyone know any solution or workaround to get rid of this problem?

Thanks,
Shobhana



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/MQTT-Link-Stealing-tp4682263p4701866.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ JDBC persistence with MSSql

2015-09-10 Thread mtod
Thanks for the quick reply.

Good catch that resolved the problem.

I was using the default activemq config and I guess they have not updated
the documentation.

Mike




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-JDBC-persistence-with-MSSql-tp4701883p4701885.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ JDBC persistence with MSSql

2015-09-10 Thread Christopher Shannon
The class can't be found because it isn't part of dbcp 2.
 org.apache.commons.dbcp.BasicDataSource is the package for dbcp 1.x not 2.x

Take a look at:
https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/BasicDataSource.html

You should be using org.apache.commons.dbcp2.BasicDataSource if you want to
use dbcp2

-Chris

On Thu, Sep 10, 2015 at 5:21 PM, mtod  wrote:

> I'm trying to setup a MSSQL JDBC persistence and I keep getting the same
> error.
>
> My setup is ActiveMQ 5.12.0 on Windows 2012 R2 with JAVA 1.8
>
> I downloaded and installed the MS Drivers.
>
> *My ActiveMQ.xml is using the default and the only thing I added was :*
>
>
>  destroy-method="close">
>  value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> 
> value="jdbc:sqlserver://dbdev003.corp.local:1433;databaseName=ActiveMQJournal;user=srv_activemqDEV;password=srv_activemqDEV1"/>
> 
> 
> 
>
>
> *Console Error:*
>
> ERROR: *org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class [org.apache.commons.dbcp.BasicDataSource]* for bean with
> name 'mssql-ds' defined in class path resource [activemq.xml
> ]; nested exception is java.lang.ClassNotFoundException:
> org.apache.commons.dbcp.BasicDataSource
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.apache.commons.dbcp.BasicDataSource] for bean with name
> 'mssql-ds' defined in class path resource [activemq.xml]; nest
> ed exception is java.lang.ClassNotFoundException:
> org.apache.commons.dbcp.BasicDataSource
>
>
> I tried placing the commons-dbcp2-2.1 into the /lib folder and no luck same
> with the drivers.
>
> Thanks
>
> Mike
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-JDBC-persistence-with-MSSql-tp4701883.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Catching Transport Connection Exception

2015-09-10 Thread Robert Bray
I am getting this sort of error in a log when JMS client are forcibly closed.

WARNING: Transport Connection to: tcp://172.25.106.166:50438 failed:
java.io.IOE
xception: An existing connection was forcibly closed by the remote host


Which is expected, but can I catch these exception with some sort of
listener so that my app can handle the closed clients appropriately (I have
services which list the connected clients, I would like that list to be
correct)?  

Thanks.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Catching-Transport-Connection-Exception-tp4701858.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


ActiveMQ JDBC persistence with MSSql

2015-09-10 Thread mtod
I'm trying to setup a MSSQL JDBC persistence and I keep getting the same
error.

My setup is ActiveMQ 5.12.0 on Windows 2012 R2 with JAVA 1.8

I downloaded and installed the MS Drivers.

*My ActiveMQ.xml is using the default and the only thing I added was :*










*Console Error:*

ERROR: *org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.apache.commons.dbcp.BasicDataSource]* for bean with
name 'mssql-ds' defined in class path resource [activemq.xml
]; nested exception is java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.commons.dbcp.BasicDataSource] for bean with name
'mssql-ds' defined in class path resource [activemq.xml]; nest
ed exception is java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource


I tried placing the commons-dbcp2-2.1 into the /lib folder and no luck same
with the drivers.

Thanks

Mike



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-JDBC-persistence-with-MSSql-tp4701883.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.