Error in Ns1Provider
See original GitHub issueWhen running ‘octodns-sync’ with ‘–doit’ I get the error below with one of my zones. The command runs fine without pushing the changes.
This might be a bug in the NS1 SDK @weyrick?
2017-06-02T10:20:57 [139657304188672] INFO Ns1Provider[nsone] apply: making changes
Traceback (most recent call last):
File "/usr/local/bin/octodns-sync", line 11, in <module>
load_entry_point('octodns==0.8.0', 'console_scripts', 'octodns-sync')()
File "/usr/local/lib/python2.7/dist-packages/octodns/cmds/sync.py", line 39, in main
dry_run=not args.doit, force=args.force)
File "/usr/local/lib/python2.7/dist-packages/octodns/manager.py", line 282, in sync
total_changes += target.apply(plan)
File "/usr/local/lib/python2.7/dist-packages/octodns/provider/base.py", line 143, in apply
self._apply(plan)
File "/usr/local/lib/python2.7/dist-packages/octodns/provider/ns1.py", line 202, in _apply
getattr(self, '_apply_{}'.format(class_name))(nsone_zone, change)
File "/usr/local/lib/python2.7/dist-packages/octodns/provider/ns1.py", line 167, in _apply_Create
getattr(nsone_zone, 'add_{}'.format(_type))(name, **params)
File "/usr/local/lib/python2.7/dist-packages/nsone/zones.py", line 131, in add_X
return record.create(callback=callback, errback=errback, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nsone/records.py", line 130, in create
callback=success, errback=errback, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nsone/rest/records.py", line 113, in create
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/nsone/rest/records.py", line 124, in create_raw
errback=errback)
File "/usr/local/lib/python2.7/dist-packages/nsone/rest/resource.py", line 73, in _make_request
return self._transport.send(type, self._make_url(path), **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nsone/rest/transport/requests.py", line 48, in send
resp.text)
File "/usr/local/lib/python2.7/dist-packages/nsone/rest/errors.py", line 53, in __init__
hdrs = response.headers._rawHeaders
AttributeError: 'CaseInsensitiveDict' object has no attribute '_rawHeaders'
It looks to be caused by an excessive number connections for a zone with many records. In the log below I replaced the zone name with example.com, all record names with ‘somerecord’ and removed a range of lines (from the original 110) for visibility.
2017-06-02T10:31:15 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:15 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 200 None
2017-06-02T10:31:15 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 200 None
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 200 None
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 200 None
2017-06-02T10:31:16 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:17 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 200 None
.........
2017-06-02T10:31:37 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/CNAME HTTP/1.1" 200 None
2017-06-02T10:31:38 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:38 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/CNAME HTTP/1.1" 200 None
2017-06-02T10:31:38 [140391072339712] DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.nsone.net
2017-06-02T10:31:38 [140391072339712] DEBUG urllib3.connectionpool https://api.nsone.net:443 "PUT /v1/zones/example.com/somerecord/A HTTP/1.1" 429 34
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Error in Ns1Provider · Issue #51 - GitHub
When running 'octodns-sync' with '--doit' I get the error below with one of my zones. The command runs fine without pushing the changes....
Read more >Cannot change DNS record: NS record "provider.com. NS ns1 ...
Symptoms. Cannot change/activate/deactivate DNS record. The following error is shown: NS record "provider.tld. NS ns1.provider." has no address records ...
Read more >ns1 package - sigs.k8s.io/external-dns/provider/ns1 - Go Packages
ApplyChanges applies a given set of changes in a given zone. func (*NS1Provider) Records ¶. func (p *NS1Provider) Records(ctx context.Context) ...
Read more >octodns-ns1 - PyPI
NS1 provider for octoDNS. An octoDNS provider that targets NS1. Installation. Command line. pip install octodns_ns1 ...
Read more >NS1 + Terraform Toolkit - NS1 Help Center
In order to work effectively with the NS1 provider with Terraform, ... If you receive rate-limiting errors or an error message of "invalid ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @pashap I’ll take a look at getting things updated, if I’m lucky this week.
@ross sorry for the delay, i let this one slip. im at NS1 as well, and told @fcelda id take care of the poor header handling thats causing the exception a couple of weeks ago.
i just created a PR that should fix header handling in the ns1 python sdk.
EDIT: just cut a new release of the python sdk with the fix in it, release version is
0.9.14