Dear dysnix/charts support team,
I was redirected from cetic/helm-nifi#182 by cetic/helm-nifi support team, thinking this maybe related to chart maintained here.
All the detail of this issue has been listed in cetic/helm-nifi#182, but I can capture all here:
Wish to seek help to overcome this strange issue accessing nifi-registry service via k8s port-forward. I had k8s cluster at remote so access all services UI via k8s port-forward. However, for accessing nifi-registry via k8s port-forward, no matter what local port I use, nifi-registry service seems never respond to request, but nifi service always works.
Why nifi service always works while nifi-registry service never regardless local port chosen? Is there any specifically additional tricks need to setup for nifi-registry in this helm-chart? Anything I might missed in value.yaml may caused this?
Here is my helm chart setup:
nifi:
helm:
# https://github.com/cetic/helm-nifi/tree/0.7.8
version: 0.7.8
image:
# https://hub.docker.com/r/apache/nifi/tags
tag: 1.13.0
value.yaml contains following to enable nifi-registry pod and service
registry:
enabled: true
port: 80
url: "nifi-registry"
% kubectl get svc -n data-pipeline -o wide
...
nifi ClusterIP 100.70.32.121 8080/TCP,9929/TCP 25h app=nifi,release=nifi
nifi-headless ClusterIP None 8080/TCP,6007/TCP 25h app=nifi,release=nifi
nifi-registry ClusterIP 100.71.235.65 80/TCP 25h app.kubernetes.io/instance=nifi,app.kubernetes.io/name=registry
nifi-registry service (tcp port 80) works fine if access inside k8s cluster. However, if I try to access after k8s port-forward, it never respond.
-- from terminal A:
% kubectl port-forward sts/nifi-registry --namespace data-pipeline 20337:80
Forwarding from 127.0.0.1:20337 -> 80
Forwarding from [::1]:20337 -> 80
Handling connection for 20337
E1025 11:56:34.256702 10540 portforward.go:400] an error occurred forwarding 20337 -> 80: error forwarding port 80 to pod 559b96d74c2830f98345b7a4ea031153c5dc750175197e1e02d0f04626c57e43, uid : exit status 1: 2021/10/25 18:56:34 socat[2684522] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E1025 11:56:34.256719 10540 portforward.go:400] an error occurred forwarding 20337 -> 80: error forwarding port 80 to pod 559b96d74c2830f98345b7a4ea031153c5dc750175197e1e02d0f04626c57e43, uid : exit status 1: 2021/10/25 18:56:34 socat[2684523] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 20337
-- from terminal B:
% curl -vv http://localhost:20337/nifi-registry/
- Trying ::1...
- TCP_NODELAY set
- Connected to localhost (::1) port 20337 (#0)
GET /nifi-registry/ HTTP/1.1
Host: localhost:20337
User-Agent: curl/7.64.1
Accept: /
However, if I port-forward to nifi (similarly to all other k8s service) via port-forward, it will respond request and access UI always works.
% curl -vv http://localhost:20337/nifi
- Trying ::1...
- TCP_NODELAY set
- Connected to localhost (::1) port 20337 (#0)
GET /nifi HTTP/1.1
Host: localhost:20337
User-Agent: curl/7.64.1
Accept: /
< HTTP/1.1 302 Found
< Date: Mon, 25 Oct 2021 19:20:55 GMT
< Location: http://localhost:20337/nifi/
< Content-Length: 0
< Server: Jetty(9.4.35.v20201120)
Thank you very much for your kind help!