The queue does not exist or you do not have sufficient permissions to perform the operation - msmq

When I try to test the queue via the Message Bus. I've checked and permissions are set to full control for everyone. I use 'msmqmng.exe send' from a different machine to put a message onto the queue, it works and is absolutely the message I sent. So what other moving parts might I be missing???

I spent couple of days banging my head for this error, and the root cause was that the storage quota for MSMQ was exceeded! which doesn't seem related to the error message, which makes it a difficult cause to detect...
When sending a message to MSMQ, the sender server will use an outgoing queue located on the sender side, and this outgoing queue is using the storage on that sender server.
The MSMQ component has a maximum quota, defined in the MSMQ properties, and when this quota is exceeded, the above error message starts popping (that's why when you sent from another machine, it worked correctly, since the issue is with the sender not the receiver).
Resolution:
To change this quota, right click on Message Queuing (from Computer management if using Windows server 2003 for example) then properties... (I cannot post images since i am a new user), but in the properties window, you will find in the first tab an editable storage limit field.
To check the currently used storage on the server, open the path of the storage, and check its size: (open the storage tab in the same properties window, and get the path of the storage folder)
If the size of the quota is similar to the size of the storage folder, then this is the root cause of your issue.
If you dont have permission to increase this quota limit, you should have your user added to the "Security" tab in the message queuing properties window.
Hope this helps...
Please vote up if you agree in order for me to have some points and post images in my next answer... :-)

Setting up the queue in Server Manager, Message Queueing I neglected to add the data source name to the queue name. (queue_name_dsNAme) So from one side I was able to insert messages. However, from the Server Group, Message Bus, it automatically appends the data source to the queue to be tested. So, the queue really did not exist.
Turns out there's another twist... even after the naming convention was sorted out there was an application that knew of the queue and was reading from it. When the test message was sent the app grabbed it before the test mechanism had a chance to receive it back, which caused the timeouts. By enabling journaling the message gets put there and you can see what went through the queue. While all this may seem obvious... it pays to ask stupid questions.

Related

Distributed Recovery - can this be done without timeout?

We have a mail sender application, that receives a bunch of mails in one blob, and then puts all those mails into database. This can take up to ten minutes. During this process the state of the mailing is BUILDING.
When it is finished the state gets changed to READY.
When the server crashes (shouldn't happen of course) and restarts, it looks for all mailings with status BUILDING and marks them as ERROR. This happens, because we never want to send incomplete mailings.
Now we'd like to scale up using a second server. The recovery strategy above doesn't work here.
e.g. server 1 is BUILDING a mailing, and server 2 crashes and restarts. Now server 2 will see the BUILDING mailing and doesn't know if it's been aborted or if it's running on another server.
So what's the best recovery strategy for distributed services?
(We thought about some timeout mechanism, where the BUILDING server updates a timestamp every few seconds, and when some server reboots it checks if there's a BUILDING mailing that hasn't been updated for x minutes. Then it's highly possible that this mailing has been aborted.)
EDIT:
What I'd like to achieve: If some server restarts (after a crash or just because we added a new mailing server to the cluster), it should not mark mailings as ERROR if this particular mailing is actually being built (by another server).
Nice to have: If this would work without having to store server ids, because then it's possible to easily add and/or remove servers. Else it would not be possible to completely remove some server, because then there might be a BUILDING mailing with that particular server id. But this server got removed and will never get started again. Though the only server that could set the mailing to ERROR will be gone.
Add two things to your state tracking: a timestamp and the server working on it.
If a server starts up and sees anything in a building state for itself it knows it failed. Conversely, if it starts up and sees something in a building state for another server, it now has information that it's going to need to look at later to see if there's a problem that needs to be addressed. You need to worry about multiple servers restarting at the same time, so you can't just have a server grab all old bundles for all servers at startup.
Or you can just use a clustering service for your OS.

/Deleted flag imap collector

my last question
I write collector for imap (perl). There was a question, if the user marks a message as deleted, what should happen with the message from which I gathered all? Remove it completely, or move in a trash, or create a new archive folder for these messages? If I flagged /Deleted gmail and yandex, for example, removes it completely, my work mail service move letter to trash folder. What is the correct implementation?
It is unclear what you are doing. Presumably, you're working on a program which serves some purpose. What is that purpose?
If you are writing some tool which accesses an IMAP account as a client, then you should not handle any sorts of policies such as "what to do with deleted messages". Some other IMAP client marked that message as \Deleted, and the server decided that it's good to implement IMAP's usual two-phase deleted with \Deleted and EXPUNGE. There are, as you already mentioned, other possible policies where the server might auto-expunge upon seeing the \\Deleted flag getting set, perhaps by moving the e-mail to a virtual Trash folder, etc. As an observer of an IMAP account, though, you are most likely not suppossed to care.

Ejabberd server keeps logging me off and back on constantly

I'm building an iOS app, but the problem exists on all clients. iChat, Messages, Psi, etc. So because it exists on all clients I'm going to assume it's a server issue.
Has anyone ever experienced something like this? If so, what did you do to fix it? I'm sure it's some silly config setting or something but I simply can't figure this out. This is the only thing that looks like it might be related in ejabberd.log:
=ERROR REPORT==== 2012-09-05 12:07:12 ===
Mnesia(ejabberd#localhost): ** WARNING ** Mnesia is overloaded: {dump_log,
time_threshold}
Thanks in advance for any tips/pointers.
https://github.com/processone/ejabberd/blob/master/src/ejabberd_c2s.erl#L936 seems to have already been patched. The config variable is called resource_conflict and the value you want is setresource.
The above warning is (probably) not related to the issue you are facing. These mnesia events usually happens when the transaction log needs to be dumped, but the previous transaction log dump hasn't finished yet.
Problem that you are facing needs to be debugged for which you can set {log_level, 5} inside ejabberd.cfg. This will enable debug logging for ejabberd. Then look into the logs to find any guesses on why this is happening for you. Also, come back and paste your log file details here, probably we will be able to help you further. I have never faced such non-sensical issues with ejabberd.
Update after log file attachment:
As Joe wrote below, this is indeed happening because of resource conflict. Two of your clients are trying to login with same resource value. But in an ideal world this shouldn't matter. Jabber servers SHOULD take care of this by appending or prepending custom value on top of resource value requested by the client.
For example, here is what gtalk (even facebook chat) servers will do:
SENT <iq xmlns="jabber:client" type="set" id="1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>jaxl#resource</resource></bind></iq>
RCVD <iq id="1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>jabberxmpplibrary#gmail.com/jaxl#resou27F46704</jid></bind></iq>
As you can see my client requested to bind with resource value jaxl#resource but gtalk server actually bound my session with resource value jaxl#resou27F46704. In short, this is not a bug in your client but a bug in ejabberd.
To fix this you can do two things:
Resource value is probably hardcoded somewhere in your client configuration. Simply remove that. A good client will automatically take care of this by generating a random resource value at it's end.
Patch ejabberd to behave how gtalk server does (as shown above). This is the relevant section inside ejabberd_c2s.erl src which needs some tweaking. Also search for Replaced by new connection inside the c2s source file and you will understand what's going on.
This sounds like the "dueling resources" bug in your client. You may have two copies of your client running simultaneously using the same resource, and doing faulty auto-reconnect logic. When the second client logs in, the first client is booted offline with a conflict error. The first client logs back in, causing a conflict error on the second client. Loop.
Evidence for this is in your logfile, on line 3480:
D(<0.373.0>:ejabberd_c2s:1553) : Send XML on stream =
<<"<stream:error><conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
Replaced by new connection
</text>
</stream:error>">>

Cannot read from MSMQ on local machine

I have a public message queue on my local machine that I created with my user account. I have a Windows service also on my local machine that runs under a corporate service account. I have granted the service account full access to the queue, and yet when the service is running, it can't seem to read the messages on the queue. I feel like I'm missing something rather basic, but I haven't been able to figure out what it is.
Code:
string queuePath = "FormatName:DIRECT=TCP:127.0.0.1\MyQueue";
MessageQueue _queue = new MessageQueue(queuePath);
When I step through the code, after the _queue object is created, the CanRead property is always false. I've tried several different ways of setting the queue path ("DIRECT=OS:.\MyQueue", "PUBLIC=[guid]", and without using a format name as well), but nothing has been successful.
The MSDN documentation states that "CanRead is false if a queue is already open with exclusive read access (or if it's open with non-exclusive access and this MessageQueue requests exclusive access), or if the application does not have sufficient rights to access it."
I've made sure that the application has sufficient rights (I think), but how can I tell if something else has "exclusive read access" to it? Is there anything else I'm missing?
Thanks.
Why are you using public queues? You should try re-create the queue as private (queue address will change to FORMATNAME:DIRECT=TCP:127.0.0.1\PRIVATE$\MyQueue) and see if this resolves your issue.
I have been using MSMQ for five years and have never used a public queue. I don't actually understand what they're for. But from experience people who try to use them usually have much more difficulty around authentication.

Periodical status messages by Jopr?

I'm evaluating Jopr 2.3.1 to monitor a JBoss 4.2.3 Application Server.
Jopr, based on the better known RHQ Project from Redhat, supports to send email notifications triggered by so called alerts. Alerts can be defined to react to certain changes of system parameter such as metrics (e.g. 'Active Thread Count', 'JVM Free Memory') or the availability (e.g. goes UP, goes DOWN) changes.
I'm now wondering if it's also possible to send a for instance weekly status report by email?
Just to make sure: This email notification is to be send periodically, indipendent of the regular alter notification, rather problems occured or not.
Many thanks in advance - every hint is appreciated
Tobias
RHQ 3 (anything Jopr related is old and outdated) has server side plugins.
They can be alert notification senders that let you e.g. connect to a trouble ticket system for alert notifications.
They can also be more generic and can be triggered periodically via an "internal cron". The latter may be what you want for report sending. In fact, Mazz has already written an example plugin generating a report on file system - you would only need to change the "write to disk" to "send email".
http://rhq-project.org/