We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Bad ajax return status 500

Hello

We upgraded our environment into latest 8.4 R06 and with the service module, we have quite serious problems.

When ticket comes in and our service people tries to assign tickeet to active user, program gives an error message and then it stucks. Error message is Bad ajax return status 500. In log file i can see a lot of AjaxApp: Integrity check for data failed. -1.

Another problem is, that when service people tries to reply to the ticket, it does not fech emails into to field autoomatically. And when they type e-mail address into the to field, it does not find the match.

It makes it more complex, that from time to time both previously mentioned problems works. After a while, it is possible to assign ticket, and when it works, reply fetches also email addresses to and cc fields.

How can i fix the proble. Our service is stuck right now.

Thanks

regards

Ingar

RE: Bad ajax return status 500

Hi,

Please contact support for this. It sounds like your ajax executable is not working properly. The error message you quote is not from us. I suspect your IIS is unstable or something. You might temporarily try to change .fcgi to .exe in the registry table, to run our processes as CGI and not FastCGI.

Sverre

Av: Sverre Hjelm 25. feb 2019

RE: Bad ajax return status 500

"bad ajax return status" is a general error message - stating it cannot fetch the data it tries from the server - typical a network related issue. (but can be something totally else).

A couple of reason I have come accross on this is: full disk on server, Proxy setup (not allowing needed protocols or network addresses), CRM Script failing, FCGI / EXE iis-setup issue.

- pinpointing when it started to happen, who (users), which computers it happens on, how ofthen/what is executed/clicke on - ofthen helps determine where to start troubleshooting.

If it started after upgrade - was other tasks performed at the same time?
- like "Web doesn't allow to run eMarketing on a different domain"

Check "Console" in Chrome for indication on whats happening.

Can it be switched from FCGI to EXE and allowed unspecified CGI and ISAPI modules in IIS:see comment in this bug article:
https://community.superoffice.com/en/Issue-Center/Product-Issue/?bid=26665

Av: Frode Berntsen 25. feb 2019

RE: Bad ajax return status 500

I'm thinking that main problem is in this log error message:

[17056] [(System) ] [ajax.exe ] 2019-02-25 09:27:32.729 [0.037] [0.037]: AjaxApp: Integrity check for data failed. () in :-1

Why check is failing and what data program is checking?

 

Av: Mikko Tillikainen 25. feb 2019

RE: Bad ajax return status 500

When you upgraded, you were asked about setting the symmetric keys when running upgrade.exe

Did you get through that step successfully?

This error indicates that the symmetric values in the config file and the web.config does not match.

Av: Stian Andre Olsen 25. feb 2019

RE: Bad ajax return status 500

Hello

Yes, we inserted symmetric key values and after we turned into the problem, we double checked it. Because we did not have enough time to investigate this in our production environment, i changed fcgi to exe and now it work. Still need to find out, why fcgi does not work, but now i have a bit more time for investigation.

PS! we have dev server for testing upgrades at first and everything works like a charm on that. 

Thanks for all of your help

Regards

Ingar

Av: Ingar Mölder 26. feb 2019

RE: Bad ajax return status 500

Hi Ingar,

just a thought, but have you tried running upgrade.exe -onlyFCGI ?

I also guess that you've checked "Allow unspecified CGI modules" and in the scripts application in IIS, on Handler Mappings -> Edit Feature Permissions, set all permissions?

Av: Simen Mostuen Iversen 27. feb 2019

RE: Bad ajax return status 500

Hi Ingar,

Did you get a fix for this, we have just had this issue reported to us from one of our customers.

Thanks,

Trevor

Av: Trevor Sharp 25. apr 2019

RE: Bad ajax return status 500

We got the same when upgrading to 8.4 R06 a few weeks back. Lots of 500-error for a couple of days. Disappeared when we changed from .fcgi to .exe, which we've been running since without any errors.

Av: Frode Lillerud 25. apr 2019

RE: Bad ajax return status 500

Brilliant, thanks Frode, I will give this a try.

Trevor

Av: Trevor Sharp 26. apr 2019

RE: Bad ajax return status 500

Also check that symmetric keys match between all SuperOffice instances (SuperOffice Web, Netserver, Customer Service).

Av: Mikko Tillikainen 26. apr 2019

RE: Bad ajax return status 500

Will do, thanks.

Trevor

Av: Trevor Sharp 26. apr 2019

RE: Bad ajax return status 500

The start of this thread was about getting "Integrity check for data failed" in the log file. 

That error message is written when there is a problem with the encryption between CS and NetServer. 
The encryption uses the clock on the servers, so if CS and NetServer is on two different servers, it is important that the clocks are syncronised.

I know there was a problem with the encryption that was fixed in a version, but that should be ok in the latest version at least.

If the above error message is not written to the log, then it would be nice to know what you get in the log.

We had a problem ourselves, that ajax.fcgi returned 500 error messages now and then. That turned out to be Trend Anti virus on the server, which blocked the connection to the database now and then (probably because it thinks ajax.exe is run to many times). This resulted the server to be filled up with ajax.exe processes, and in the end it would not start new ones, resulting in 500 errors.

Av: Stian Andre Olsen 29. apr 2019

RE: Bad ajax return status 500

Hi there,

I have the same problem with customers running on SuperOffice 8.4 R06 after the upgrade.
Checked the secretValue and SecretKey from netserver with the config of CS and changed .fcgi to .exe
without any results so far.

The logfiles are full with error message AjaxApp: Integrity check for data failed. -1. and the visible error is
Bad ajax return status 500.

Is upgrading to the latest SuperOffice version an option?

Av: Henk Bergevoet 30. apr 2019

RE: Bad ajax return status 500

Hi Henk,

I have literally just had a reply from the customer, who has been testing CS since we changed from fcgi to exe, and it seems to have resolved the issue.

With regards to the upgrade, is the underlying issue fixed in the new version of SuperOffice.

Many thanks,

Trevor

Av: Trevor Sharp 30. apr 2019

RE: Bad ajax return status 500

Hi Trevor,

Thanks for the reply, I will discuss this with the involved customers.

Av: Henk Bergevoet 30. apr 2019

RE: Bad ajax return status 500

Hi There,

It happens also in version 8.4 R07.

Av: Henk Bergevoet 30. apr 2019

RE: Bad ajax return status 500

Thanks Henk, the change to .exe does seem to resolve the issue, but it does seem to me to be a bit of a workaound rather than a fix.

Lets hope the issue is sorted in a future release :-)

Trevor

Av: Trevor Sharp 30. apr 2019

RE: Bad ajax return status 500

Hi,

Moving from .fcgi to .exe is not a good solution in the long run, as .fcgi gives much better performance. We are currently investigating this issue and hope to resolve it asap.

Sverre

Av: Sverre Hjelm 30. apr 2019

RE: Bad ajax return status 500

Hi Sverre,

Thanks for this.

Trevor

Av: Trevor Sharp 30. apr 2019

RE: Bad ajax return status 500

Hi Sverre,

Thanks for the information.

Av: Henk Bergevoet 30. apr 2019

RE: Bad ajax return status 500

I had kinda the same problem on a test site here.

At least I got the log file crowded with the same error as described above. 

I figured out that I got these errors each time I started Outlook with MailLink installed. Newer versions of MailLink uses NetServer to talke to CS using the facades. If this fails, it falls back to the old SOAP API (talking directly to CS).

So that was the background.
In my test installation I have Sales, a remote NetServer used by CS and CS.
The symmetric keys were equal on the remote NetServer and in the config file for CS, but in the web.config file for Sales, the keys were different. And MailLink talked to the Sales in-process NetServer, so when I aligned the keys on all those places (two web.config files and the config file for CS), the errors in the logs stopped.

If this error causes the ajax.fcgi process to become stale, I do not know. But could you who has this problem see if you have an equal setup like above, where the symmetric keys do not match?

Av: Stian Andre Olsen 30. apr 2019

RE: Bad ajax return status 500

Hi There,

The log files are also with the "AjaxApp: Integrity check for data failed. () in :-1" message in SuperOffice 8.4 R08

Av: Henk Bergevoet 30. apr 2019

RE: Bad ajax return status 500

Hi All,

I have changed both NetServer (Sales and Service).
This means that the Sales (web.config) and the Service(web.config) security keys are the same.

For the registry table i have changed (only to try) .fcgi to .exe and the "AjaxApp: Integrity check for data failed. () in :-1"
messages in the log file is gone.

The customer will now test if they have the same problems as before. Keep you all informed.

Av: Henk Bergevoet 3. mai 2019

RE: Bad ajax return status 500

You say you have changed both NetServers symmetric keys to be the same.

But you have also changed the "config" file for CS to have the same key?

Av: Stian Andre Olsen 3. mai 2019

RE: Bad ajax return status 500

Hi Stian,

Yes I did. The keys are the same for both web.configs and the config of Service.

Av: Henk Bergevoet 3. mai 2019

RE: Bad ajax return status 500

Hello All,

Is there any estimate when this problem is solved in future SuperOffice release?

Av: Henk Bergevoet 13. mai 2019

RE: Bad ajax return status 500

Your last report was that you were to test it at the customer, being sure that all the keys are correct on all instances of CS and NetServers (and Sales). 

How did that work out?

Also be sure that if you are using multiple servers, that their clocks are syncronized.

Av: Stian Andre Olsen 13. mai 2019

RE: Bad ajax return status 500

Hi Stian,

I have tested it at the customer and the keys for all the NetServer instances are the same. The keys in the Web.configs
of NetServer and also in the cs config are the same. I also restored the setting .exe back to .fcgi in the registry table.

The messages in the CS log files are gone.

PS: I have several customers that has the same error now and then in the Web Browser (Chrome, IE, Edge or Firefox).

 

Av: Henk Bergevoet 13. mai 2019

RE: Bad ajax return status 500

When ajax.fcgi returns an error, it is normally shown in a dialog box, so that is probably why you see it in the browser.

But you say it now works on the customer we were talking about if I understand you correctly?

On the other customers that this happens, could you please check that the keys are correct for all CS, Sales and NetServer instances (together with the clocks)?

Also, which versions are these customers running?

Av: Stian Andre Olsen 13. mai 2019

RE: Bad ajax return status 500

Hi Stian,

We are currently investigating this at the different customers. The customers are running different
versions of SuperOffice, from SuperOffice 8.4 R06 to SuperOffice 8.4 R08.

Av: Henk Bergevoet 13. mai 2019

RE: Bad ajax return status 500

Hello Stian,

As promised I have checked it with the customers, all the keys for Mailing/CS are correct for this customers. And everthing is functioning as it should. I did not heard any of this customers about any misfunction of functionality.

Only the log files are full with messages about the ajax error.

Av: Henk Bergevoet 21. mai 2019

RE: Bad ajax return status 500

I suspect it to be MailLink calling CS to see if it supports the new way to communicate with CS. And if that check fails, then MailLink automatically revert to using the SOAP interface in CS. That could explain why you do not see anything not working. 

Could it be that MailLink uses a NetServer endpoint that you have not checked and that one contains wrong symmetrick keys?

Av: Stian Andre Olsen 21. mai 2019

RE: Bad ajax return status 500

Hi all

is there a bug ID on this issue please or has any further resolution been found as we have a second customer being affected and they are concerned about any knock-on to mailings being received by their customers (spam filters blocking).

 

Thanks

 

Matt

Av: Matt Cove 13. jan 2020

RE: Bad ajax return status 500

Hi Matt,

Aparently not, we raised it again with support on Friday, and they have told us today there is no bug reported for this, and have asked us to use the .exe workaround.  We are going back to support to say that this will not work for us, due to spam filters, and are pushing for a bug to be raised.

Trevor

Av: Trevor Sharp 13. jan 2020

RE: Bad ajax return status 500

Trevor

thanks for the update from yourself. If you can please email me about this, I'll let you know what I need and will submit information to the bug queue.

many thanks

 

Matt

Av: Matt Cove 13. jan 2020

RE: Bad ajax return status 500

Hi,

We experieced the same issue but with another error, thought i might share the solution to that scenario in case anyone else run into to.

Service error:
AjaxApp: Integrity check for data failed (3)

S&M Error:
Message: The remote server returned an error: (500) Internal Server Error.

Error in S&M: ExecuteEventHandlers

Reason: missmatch between symmetricKey & Secret between the S&M Netserver and the CSNetserver.
As well as the Config file in the Service Root (c:\journal\config if you havent installed Service with correct rights)

Just my 5 cents if anyone else stumble across this thread like i did when searcing for the errorcode.

Regards
Pär

Av: Pär Pettersson 7. mai 2020

RE: Bad ajax return status 500

I agree on that being the case most the time. I have not seen the error "AjaxApp: Integrity check for data failed (3)" that was not due to mismatching symmetric keys. But I have seen Service and the CS NetServer having the same symmetric keys, but there has been a third NetServer, which does not have the correct symmetric keys (for example a NetServer used by MailLink). And since all NetServer migh try to talk to the Service backend, it is important that ALL NetServer have the same keys.

In addition, in a recent release, a bug was fixed whiched caused "ajax.exe" process to go "offline" for a short periode of time, if it ended up in a bad request multiple times. And this could for example happen when MailLink contacting a NetServer with wrong symmetric keys. Then the FastCGI handler would take ajax.exe offline, due to "rapid failures", and everyone could receive a 500 error from this process. 
I think this has been the reason for many of these 500 errors, and it has been difficult to spot the configuration error. 
But now, the ajax.exe process will not go offline for these kind of errors anymore.

Av: Stian Andre Olsen 7. mai 2020