mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2026-04-26 16:15:54 +03:00
[GH-ISSUE #75] API Error: 0 #41
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
question
upstream
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsedit#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @skfigved on GitHub (Jan 20, 2016).
Original GitHub issue: https://github.com/tuxis-ie/nsedit/issues/75
Been trying to get this to work now with multiple linux distro and powerdns versions. Currently 3.4.7 but always get this message
Are there currently any issues with powerdns 3.4.7 and nsedit?
@tuxis-ie commented on GitHub (Jan 20, 2016):
Looks like there is an issue with Curl? The error seems to come from https://github.com/tuxis-ie/nsedit/blob/master/zones.php#L80
You should be able to change that line to:
Does that clarify anything?
@skfigved commented on GitHub (Jan 20, 2016):
Now im getting following message "API Error: 0 Failed to connect to 127.0.0.1: Permission denied"
Doing a curl from localhost works both getting zone list and adding zones
curl -X POST --data '{"name":"example.org", "kind": "Native", "masters": [], "nameservers": ["ns1.example.org", "ns2.example.org"]}' -v -H 'X-API-Key: 12345' http://127.0.0.1:8081/servers
curl -H 'X-API-Key: 12345' http://127.0.0.1:8081/servers/localhost/zones
@tuxis-ie commented on GitHub (Jan 20, 2016):
Ok. Can you paste your config here?
@skfigved commented on GitHub (Jan 20, 2016):
This is the config from config.inc.php.
@tuxis-ie commented on GitHub (Jan 20, 2016):
I'm missing $authmethod, which should be set to 'xapikey'...
@skfigved commented on GitHub (Jan 20, 2016):
here is the rest
$authmethod = 'xapikey';
@skfigved commented on GitHub (Jan 20, 2016):
Just noticed that the api error message does not include the port number if this by any chance is related
API Error: 0 Failed to connect to 127.0.0.1: Permission denied
Shouldt it say something like 127.0.0.1:8081 ?
@skfigved commented on GitHub (Jan 20, 2016):
The permission denied got me on the right track. It never were anything with powerdns or nsedit config. It was actually SElinux not permitting httpd to make network connections.
My case was solved with this command
setsebool -P httpd_can_network_connect 1
Running Centos 7
Thanks for assisting me getting this solvet
@tuxis-ie commented on GitHub (Jan 20, 2016):
Haha. Thanks for letting us know! Always good to have these kinds of commands in an archive somewhere.