[GH-ISSUE #119] Search returns 500 API error #70

Closed
opened 2026-02-28 01:20:51 +03:00 by kerem · 9 comments
Owner

Originally created by @ruben-herold on GitHub (Sep 16, 2016).
Original GitHub issue: https://github.com/tuxis-ie/nsedit/issues/119

hi,

If I try the search I ever got an 500 API error.

Originally created by @ruben-herold on GitHub (Sep 16, 2016). Original GitHub issue: https://github.com/tuxis-ie/nsedit/issues/119 hi, If I try the search I ever got an 500 API error.
kerem closed this issue 2026-02-28 01:20:51 +03:00
Author
Owner

@tuxis-ie commented on GitHub (Sep 16, 2016):

Version? Php-error logs? pdns Error logs?

A bit more information is useful. My primary reaction to such an issue is 'Ok, thanks for the information' and then just close the bug.

<!-- gh-comment-id:247557572 --> @tuxis-ie commented on GitHub (Sep 16, 2016): Version? Php-error logs? pdns Error logs? A bit more information is useful. My primary reaction to such an issue is 'Ok, thanks for the information' and then just close the bug.
Author
Owner

@skfigved commented on GitHub (Sep 17, 2016):

I had the same problem after updating to PowerDNS 4. In my case it was that some zones actually contained bad data which threw an 500 API error when i searched for those zones. I was able to fix the issue by identifying the bad zones and deleting the records manually in mysql

<!-- gh-comment-id:247779515 --> @skfigved commented on GitHub (Sep 17, 2016): I had the same problem after updating to PowerDNS 4. In my case it was that some zones actually contained bad data which threw an 500 API error when i searched for those zones. I was able to fix the issue by identifying the bad zones and deleting the records manually in mysql
Author
Owner

@richard-underwood commented on GitHub (Sep 19, 2016):

I had a similar problem after importing a zone from bind - there were duplicate records in the zone which needed thinning out. It was a powerdns problem, not nsedit.

<!-- gh-comment-id:247949328 --> @richard-underwood commented on GitHub (Sep 19, 2016): I had a similar problem after importing a zone from bind - there were duplicate records in the zone which needed thinning out. It was a powerdns problem, not nsedit.
Author
Owner

@tuxis-ie commented on GitHub (Sep 19, 2016):

Ok. So mainly, the errorhandling needs to be better.

<!-- gh-comment-id:247953276 --> @tuxis-ie commented on GitHub (Sep 19, 2016): Ok. So mainly, the errorhandling needs to be better.
Author
Owner

@skfigved commented on GitHub (Sep 19, 2016):

I guess it might be related to this?
https://github.com/PowerDNS/pdns/pull/4195

<!-- gh-comment-id:247959875 --> @skfigved commented on GitHub (Sep 19, 2016): I guess it might be related to this? https://github.com/PowerDNS/pdns/pull/4195
Author
Owner

@tuxis-ie commented on GitHub (Sep 19, 2016):

@skf82 No. This issue is about search, not about importing. But thank you for pointing out that issue, it is something we are using. :)

<!-- gh-comment-id:247963157 --> @tuxis-ie commented on GitHub (Sep 19, 2016): @skf82 No. This issue is about search, not about importing. But thank you for pointing out that issue, it is something we are using. :)
Author
Owner

@telefax commented on GitHub (Oct 8, 2016):

I just did a bulk import to pdns mysql via zone2sql and got the same problem when searching for a specific term in nsedit ui.

The httpd instance that run nsedit had nothing in its error logs.
But if you check the powerdns web statistics page (port 8081) you would see something like:

HTTP ISE for "/api/v1/servers/localhost/zones/some.zone.": STL Exception: Parsing record content (try 'pdnsutil check-zone'): Data field in DNS should start with quote (") at position 2 of '""v=spf1 mx ip4:1.1.1.1,2.2.2.2 -all""'

So, problem in this case was that I had a TXT record which was surrounded by extra quotes (probably had never worked at the place where the zones originates from).
Quick fix mysql query was to locate the records and then remove the extra quotes:

SELECT * FROMpowerdns_db.records where content like '""%""';

So again, not an nsedit problem it self, but it's having a hard time interpreting syntax errors in zones :)

<!-- gh-comment-id:252453344 --> @telefax commented on GitHub (Oct 8, 2016): I just did a bulk import to pdns mysql via zone2sql and got the same problem when searching for a specific term in nsedit ui. The httpd instance that run nsedit had nothing in its error logs. But if you check the powerdns web statistics page (port 8081) you would see something like: > HTTP ISE for "/api/v1/servers/localhost/zones/some.zone.": STL Exception: Parsing record content (try 'pdnsutil check-zone'): Data field in DNS should start with quote (") at position 2 of '""v=spf1 mx ip4:1.1.1.1,2.2.2.2 -all""' So, problem in this case was that I had a TXT record which was surrounded by extra quotes (probably had never worked at the place where the zones originates from). Quick fix mysql query was to locate the records and then remove the extra quotes: `SELECT * FROM`powerdns_db`.records where content like '""%""';` So again, not an nsedit problem it self, but it's having a hard time interpreting syntax errors in zones :)
Author
Owner

@tuxis-ie commented on GitHub (Oct 10, 2016):

Yes, we have to find out if we get these messages from PDNS. I don't know yet.

<!-- gh-comment-id:252558555 --> @tuxis-ie commented on GitHub (Oct 10, 2016): Yes, we have to find out if we get these messages from PDNS. I don't know yet.
Author
Owner

@tuxis-ie commented on GitHub (Oct 10, 2016):

I've created issue #128 for these issues.

<!-- gh-comment-id:252558879 --> @tuxis-ie commented on GitHub (Oct 10, 2016): I've created issue #128 for these issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsedit#70
No description provided.