Respond URL - Bad Ticket

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

I seem to be getting the bad ticket issue every so often now, more than likely due to the high load on the server and/or an apply config was recently performed. Is there any way this could be corrected by Nagios team so that it would retry the DB connection if it receives a -1 for the user ID?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Respond URL - Bad Ticket

Post by abrist »

This is a good "bug report" so I went ahead and filed one:
TASK ID 4658.

You could also try increasing the number of max connections on the db.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Respond URL - Bad Ticket

Post by lgroschen »

Bandit,

Since we can't test this I'm going to have you update your rr.php file on the system in question and see if this fixes your issue. Grab the attachment, unzip, then overwrite the old file here:

Code: Select all

/usr/local/nagiosxi/html/
I have PHP attempt to get the user_ticket, if return user_ticket=-1 then loop(sleep(1), get user_ticket), then after 5 attempts exit out with an error if user_ticket is still -1.

Changes are lines 66 to 77 in rr.php if you want to have a gander. Let me know!
You do not have the required permissions to view the files attached to this post.
/Luke
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

changes applied. I will let you know.

Thanks!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Respond URL - Bad Ticket

Post by cmerchant »

Bandit, let us know when you have tested this. Thanks.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Respond URL - Bad Ticket

Post by cmerchant »

Fix was good in a response answered in a PM. Thanks Bandit. We'll go ahead and close this thread.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Respond URL - Bad Ticket

Post by abrist »

Topic unlocked at request of Bandit.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

Thanks Andy.

I just wanted to add that we still occasionally get this issue. It seems to always happen when XI happens to send a notification as we are applying changes. I modified the code to do 10 retries and upped the sleep timer from 1 to 5 seconds between tries. I'll update later(few days) if the issues seems to have been resolved by giving it the more time.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Respond URL - Bad Ticket

Post by abrist »

BanditBBS wrote:It seems to always happen when XI happens to send a notification as we are applying changes.
This actually makes a lot of sense as load could effect the necessary postgres query for the ticket/XI userid.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

Ok, the issue is still happening, albeit very seldom after my recent changes.

Would it be smart for XI to wait after an apply until it is complete before it sends notifications? Surprised that nobody else is using the rr link and running into this. My XI server has an avg load of 2 with 16 cores, so is running great and still getting this error. Or is rr just not used by that many people? Hmmmm
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked