nipyapi
nipyapi copied to clipboard
security and proxy issue, Can not access to nifi with https
- Nipyapi version : last version
- NiFi version : 1.9.2
- NiFi-Registry version :
- Python version : 3.7
- Operating System : ubuntu
Description
I can not connect to nifi with code using the api, I have problem with security and proxy, below you find my error :
Error
2019-12-23 13:36:08,509 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /nifi-api/system-diagnostics
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 330, in ssl_wrap_socket context.load_cert_chain(certfile, keyfile) FileNotFoundError: [Errno 2] No such file or directory
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='prsdradmnifi0101.node.sd.diod.tech', port=8081): Max retries exceeded with url: /nifi-api/system-diagnostics (Caused by ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory')))
What I Did
#!/usr/bin/env python3 import nipyapi
nifi = 'https://****:8081/nifi-api' nipyapi.config.nifi_config.host = nifi nipyapi.nifi.configuration.verify_ssl = False nipyapi.config.nifi_config.proxy="http://:3128" nipyapi.config.nifi_config.cert_file="/opt/applications/sdr/apps/nifi//conf/client.cer" nipyapi.config.nifi_config.key_file="/opt/applications/sdr/apps/nifi//conf/client.key" nipyapi.config.nifi_config.username="username" nipyapi.config.nifi_config.password="password" print(nipyapi.system.get_nifi_version_info())
Urgency
Please give a brief description of how critical this issue is to you.
For example, if it's blocking your Production environment, or perhaps you are just notifying us of something you found but isn't blocking your workflow.
Please any help from community, thanks in advance
@hamzabekkouri my apologies this has been sitting here for so long, is it now resolved or do you need some assistance? I will be around this week.
Closing as old, please reopen if the issue persists