Re: Shared File System Master Slave

2018-04-09 Thread norinos
Hi Tim ! thanks a lot.


> The documentation you linked to is for the AMQ message store, not the 
> KahaDB message store. So if you're using KahaDB as you say, then the page 
> you linked to is irrelevant. 

I finally understood that AMQ and KahaDB are different.

> KahaDB behaves as I described. You only risk losing messages that have not 
> yet been accepted (i.e. you don't risk losing anything). If I recall 
> correctly, the only thing that's flushed to disk periodically is the
> index, 
> and that can be rebuilt from the raw journal files so there's no risk of 
> data loss, just a slower broker startup. 

I feel relieved that it seems there is no risk.


I found the following site. Is this helpful for me?
http://www.idevnews.com/images/emailers/110127_ProgressFUSE/WhitePapers/ActiveMQinActionCH05.pdf





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: Shared File System Master Slave

2018-04-08 Thread norinos
As you say, I'm using KahaDB.

> You asked whether subscriptions would be on the new master, and the answer 
> depends on whether the subscription was durable. If it was a durable 
> subscription, the subscription information is persisted and the 
> subscription will be in the same state on the new master, even if the 
> client doesn't immediately reconnect. If the subscription is not durable, 
> then it will be recreated when the client reconnects to the new master, so 
> any messages that were unconsumed at the time the original master went
> down 
> and any messages sent before the client reconnects will be lost for that 
> subscriber.

I'm using durable subscription.
So, I understand that clients can receive the message without problems
when switching from master to slave.


Please tell me a little more.

ActiveMQ insert cache index into the reference store for performance at
checkpoint interval.

If master goes down, it seems that chache index can not insert.
So reference store is not up-to-date.

In this case, if I startup up ActiveMQ, Is the reference store updated at
the start-up phase?




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Shared File System Master Slave

2018-04-06 Thread norinos
I am planning to use Shared File System Master Slave.(I use AcitveMQ 5.13.1)
http://activemq.apache.org/shared-file-system-master-slave.html

With this system, even though master(#1)'s process goes down due to trouble, 
I think that ActiveMQ can be continuously used in slave(#2) process.

I have a question. 

http://activemq.apache.org/amq-message-store.html

According to the above documentation, MQ's memory cache periodically
inserted into the reference store(db.data).

If master(#1) goes down, memory cache cannot insert.
It seems that the reference sotre index does not match the Data Logs.

At this time, can #2(New master) start normally ?
If not, What kind of trouble will occur ?
For example, Subscribed messages will be subscribe agein.





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Shared File System Master Slave

2018-04-06 Thread norinos
I am planning to use Shared File System Master Slave.(I use AcitveMQ 5.13.1)
http://activemq.apache.org/shared-file-system-master-slave.html

With this system, even though master(#1)'s process goes down due to trouble, 
I think that ActiveMQ can be continuously used in slave(#2) process.

I have a question. 

http://activemq.apache.org/amq-message-store.html

According to the above documentation, MQ's memory cache periodically
inserted into the reference store(db.data).

If master(#1) goes down, memory cache cannot insert.
It seems that the reference sotre index does not match the Data Logs.

At this time, can #2(New master) start normally ?
If not, What kind of trouble will occur ?
For example, Subscribed messages will be subscribe agein.





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-04-04 Thread norinos
Sorry, my information is not enough.
I changed the ActiveMQ setting as follows, and restarted.

-
offlineDurableSubscriberTimeout="12"
offlineDurableSubscriberTaskSchedule="18"
-

In this case, the client application was not connected to the server.
So I assumed that the journal files will be deleted in a few minutes after
the server started up.

But when the offline durable subscription cleanup is started, journal file
could not be deleted. 

Since the file was not deleted, I connected the application thought that I
could receive a message, 
but I could not receive the message.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-04-04 Thread norinos
Sorry, my information is not enough.
I changed the ActiveMQ setting as follows, and restarted.

-
offlineDurableSubscriberTimeout="12"
offlineDurableSubscriberTaskSchedule="18"
-

In this case, the client application was not connected to the server.
So I assumed that the journal files will be deleted in a few minutes after
the server started up.

But when the offline durable subscription cleanup is started, journal file
could not be deleted. 

Since the file was not deleted, I connected the application thought that I
could receive a message, but I could not receive the message.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-04-04 Thread norinos
I tried deleting db.data and db.redo files, and starting up ActiveMQ.
This try succeeded.(ActiveMQ start successfuly, and recreated db.data and
db.redo)

But when the offline durable subscription cleanup is started, journal file
could not be deleted.

The following message was logged to the activemq.log sometimes, and it was
no longer logged at the end.
In this state, the client cannot subscribe message.


2018-04-04 12:39:45,600 | INFO  | Destroying durable subscriber due to
inactivity:
DurableTopicSubscription-OjPgmaDmsor4oyyGGONiR18:EXACTLY_ONCE:OjPgmaDmsor4oyyGGONiR18,
id=OFFLINE:1:6137, active=false, destinations=1, total=0, pending=0,
dispatched=0, inflight=0, prefetchExtension=0 |
org.apache.activemq.broker.region.TopicRegion | ActiveMQ Durable Subscriber
Cleanup Timer
2018-04-04 12:41:06,857 | INFO  | Destroying durable subscriber due to
inactivity:
DurableTopicSubscription-xOyHFpTRyeCRG5Ymjszmi6Q:EXACTLY_ONCE:xOyHFpTRyeCRG5Ymjszmi6Q,
id=OFFLINE:1:3439, active=false, destinations=1, total=3, pending=3,
dispatched=0, inflight=0, prefetchExtension=0 |
org.apache.activemq.broker.region.TopicRegion | ActiveMQ Durable Subscriber
Cleanup Timer
2018-04-04 12:45:14,792 | INFO  | Destroying durable subscriber due to
inactivity:
DurableTopicSubscription-EySMl5bvJ5Ae2HZNqPmoizn:EXACTLY_ONCE:EySMl5bvJ5Ae2HZNqPmoizn,
id=OFFLINE:1:3459, active=false, destinations=1, total=0, pending=0,
dispatched=0, inflight=0, prefetchExtension=0 |
org.apache.activemq.broker.region.TopicRegion | ActiveMQ Durable Subscriber
Cleanup Timer






--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-03-22 Thread norinos
> You need to set ignoreMissingJournalFiles. See 
> http://activemq.apache.org/kahadb.html for more information. 

Thank you for the information.

I tryed the above settings, but the following error occured and
failed to start ActiveMQ.


2018-03-22 17:21:56,218 | ERROR | Looking for key 531 but not found in
fileMap: 
2018-03-22 17:21:56,222 | ERROR | Failed to start Apache ActiveMQ ([broker0,
null], java.io.IOException: Could not locate data file
/data/kahadb/db-531.log) | org.apache.activemq.broker.BrokerService |
WrapperSimpleAppMain



> That's certainly possible. Are you sure that the durable subscription in 
> question has actually been offline continuously for more than a month? It 
> hasn't been sporadically connecting briefly and then disconnecting? 

My application connect and subscribe the message at the same time.
So the durable subscription has actually been offline continuously for more
than a month.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-03-20 Thread norinos
Hi Tim.

Sorry, because it contains confidential information, I can not attach the
file to the issue.

> So the question now is how you move forward. If you're able to live with 
> reprocessing the 511 messages that those acks acknowledged, then just 
> delete that file and continue on without it. But note that if you've got 
> 10GB in the persistence store and the only file that has a problem is the 
> most-recent one, you're going to very quickly hit the store limit again,
> so 

I deleted "db-531.log" and re-started ActiveMQ, but failed to start because
of following error.


2018-03-20 17:16:15,890 | ERROR | Looking for key 531 but not found in
fileMap: {
29=db-29.log number = 29 , length = 33554432, .
, 482=db-482.log number = 482 , length = 33554432}


> you'll probably want to figure out why db-29.log is still alive (check the 
> DLQ) and solve that problem. 

Yes.
It is very strange why this old file is not deleted becase I don't use DLQ.

I set offlineDurableSubscriberTimeout and
offlineDurableSubscriberTaskSchedule.

offlineDurableSubscriberTimeout="259200" 
offlineDurableSubscriberTaskSchedule="8640"

But I checked the journal files, It seems that messages sent months ago are
left without being deleted.

Is offlineDurableSubscriberTimeout not working properly?




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: failed to start ActiveMQ

2018-03-14 Thread norinos
>1. Download the 5.13.1 source code (via a sources JAR or Git). 
>2. In your debugger, set a breakpoint on the catch block in 
>DataFileAccessor.readRecord (). 
>3. Attach a debugger to the broker when starting it (use suspend=y
> since 
>this is occurring during initialization). 
>4. When you hit the breakpoint, use the Drop To Frame feature (in 
>Eclipse, or similar in whatever debugger you're using) to return to the 
>beginning of the method, then step through again to confirm that the 
>initializer of the data local variable is the problem. If it is, you'll 
>find that location.getSize() is less than 5, and the question will be
> "why?" 

I tried the above.

My kahadb consists of "db-29.log" to "db-531.log".(reached the store limit
of 10GB)
I set breakpoint at DataFileAccessor.readRecord.

First, "db-512.log" is read and the location size is "9188".
Next, "db-531.log" is read and the location size is "0".

Alos I checked "db-531.log" using the amq-kahadb-tool.
https://github.com/Hill30/amq-kahadb-tool

The result is below.

---
Command statistics:
- Topics: 0 (messages: 0, +subscriptions: 0, -subscription: 0).
- Queues: 0 (messages: 0).
- Other messages: 511.

Commands:
+ CmdType: KAHA_ACK_MESSAGE_FILE_MAP_COMMAND (Count: 511, TotalSize: 10.95
MB (11478593), ~AvrgSize: 21.94 KB (22463), LastBigSize: 21.94 KB (22463),
LastSize: 21.94 KB (22463))
All commands: 511 (Total size: 10.95 MB (11478593).

---







--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html