Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[cetic/nifi] Invalid host header issue #199

Closed
asiriwork opened this issue Nov 25, 2021 · 5 comments
Closed

[cetic/nifi] Invalid host header issue #199

asiriwork opened this issue Nov 25, 2021 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed Need more info This issue needs more information stale No recent activity, will be closed unless label removed

Comments

@asiriwork
Copy link

asiriwork commented Nov 25, 2021

Helm version: v3.5.2
Kubernetes version: v1.20.4
nifi chart version: latest : 1.0.2

I'm trying to connect to nifi UI deployed in kubernetes.

I have set following properties in values yaml

properties:
  # use externalSecure for when inbound SSL is provided by nginx-ingress or other external mechanism
  sensitiveKey: changeMechangeMe # Must to have minimal 12 length key
  algorithm: NIFI_PBKDF2_AES_GCM_256
  externalSecure: false
  isNode: false
  httpsPort: 8443 
  webProxyHost: 10.0.39.39:30666
  clusterPort: 6007
  
  # ui service
service:
  type: NodePort
  httpsPort: 8443
  nodePort: 30666
  annotations: {}
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## OIDC authentication requires "sticky" session on the LoadBalancer for JWT to work properly...but AWS doesn't like it on creation
    # sessionAffinity: ClientIP
    # sessionAffinityConfig:
    #   clientIP:
  #     timeoutSeconds: 10800

10.0.39.39 - is the kubernetes masternode internal ip.

When nifi get started i get follwoing

  WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/k8sadmin/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/k8sadmin/.kube/config
NAME: nifi
LAST DEPLOYED: Thu Nov 25 12:38:00 2021
NAMESPACE: jeed-cluster
STATUS: deployed
REVISION: 1
NOTES:
Cluster endpoint IP address will be available at:
kubectl get svc nifi -n jeed-cluster -o jsonpath='{.status.loadBalancer.ingress[*].ip}'

Cluster endpoint domain name is: 10.0.39.39:30666 - please update your DNS or /etc/hosts accordingly!

Once you are done, your NiFi instance will be available at:

  https://10.0.39.39:30666/nifi

and when i do a curl
curl https://10.0.39.39:30666 put sample.txt -k

<h1>System Error</h1>
<h2>The request contained an invalid host header [<code>10.0.39.39:30666</
the request [<code>/</code>]. Check for request manipulation or third-part
t.</h2>
<h3>Valid host headers are [<code>empty
<ul><li>127.0.0.1</li>
<li>127.0.0.1:8443</li>
<li>localhost</li>
<li>localhost:8443</li>
<li>[::1]</li>
<li>[::1]:8443</li>
<li>nifi-0.nifi-headless.jeed-cluste
<li>nifi-0.nifi-headless.jeed-cluste
<li>10.42.0.8</li>
<li>10.42.0.8:8443</li>
<li>0.0.0.0</li>
<li>0.0.0.0:8443</li>
</ul>

Tried lot of things but still cannot add whitelist master node ip in proxy hosts
Ingress is not used

edit:
it looks like properties set in values.yaml is not set in nifi.properties in side the pod. Is there any reason for this?
Appreciate help!

@banzo banzo added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Nov 29, 2021
@leshibily
Copy link

I am having a similar issue.

@banzo Can we expect a fix anytime soon?

@zakaria2905
Copy link
Contributor

@kavndu
Copy link

kavndu commented Dec 30, 2021

@asiriwork You can try the branch named develop instead of master. I could be able to overcome this error by using develop branch.

@arunbabumm
Copy link

@kavndu I have followed the develop branch values.yaml getting this error. Any idea.
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Service.spec.ports[0]): missing required field "port" in io.k8s.api.core.v1.ServicePort

@banzo banzo added Need more info This issue needs more information stale No recent activity, will be closed unless label removed and removed enhancement New feature or request labels Jun 27, 2022
@banzo
Copy link
Contributor

banzo commented Jun 27, 2022

Closing, this is stale.

Please reopen if the problem is still happening.

@banzo banzo closed this as completed Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed Need more info This issue needs more information stale No recent activity, will be closed unless label removed
Projects
None yet
Development

No branches or pull requests

6 participants