nipyapi icon indicating copy to clipboard operation
nipyapi copied to clipboard

security and proxy issue, Can not access to nifi with https

Open hamzabekkouri opened this issue 5 years ago • 1 comments

  • 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 avatar Dec 23 '19 13:12 hamzabekkouri

@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.

Chaffelson avatar Jun 21 '20 14:06 Chaffelson

Closing as old, please reopen if the issue persists

Chaffelson avatar Oct 22 '23 10:10 Chaffelson