Skip to content

fix: Disable port 8081 (metrics) for NiFi 2.x #794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 4, 2025

Conversation

Maleware
Copy link
Member

@Maleware Maleware commented May 14, 2025

This PR adds:

  • disable metrics 8081 port if nifi is not 1.x.x

@Maleware Maleware self-assigned this May 14, 2025
@Maleware Maleware moved this to Development: Waiting for Review in Stackable Engineering May 20, 2025
@Maleware Maleware requested review from sbernauer and maltesander and removed request for sbernauer May 23, 2025 09:32
@Techassi Techassi changed the title Fix/disable 8081 for 2xx and bind to localhost fix: Disable 8081 for 2xx and bind to localhost May 26, 2025
@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering May 26, 2025
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see the point in adding nifi.web.https.network.interface.lo per default. This can be documented as override for local development?

Edit:
Tests do not work, cannot access UI via Nodeport etc.

HTTPSConnectionPool(host='nifi-node-default-1.nifi-node-default.kuttl-test-measured-sloth.svc.cluster.local', port=8443): Max retries exceeded with url: /nifi-api/access/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x71c838a1aab0>: Failed to establish a new connection: [Errno 111] Connection refused'))
    logger.go:42: 12:21:22 | smoke_nifi-1.28.1_zookeeper-3.9.3_openshift-false_listener-class-external-unstable/60-prepare-test-nifi | command terminated with exit code 1
    logger.go:42: 12:21:22 | smoke_nifi-1.28.1_zookeeper-3.9.3_openshift-false_listener-class-external-unstable/60-prepare-test-nifi | command failure, skipping 1 additional commands
    logger.go:42: 12:21:23 | smoke_nifi-1.28.1_zookeeper-3.9.3_openshift-false_listener-class-external-unstable/60-prepare-test-nifi | test step failed 60-prepare-test-nifi
    case.go:396: failed in step 60-prepare-test-nifi
    case.go:398: command "kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi.py ..." failed, exit status 1
    logger.go:42: 12:21:23 | smoke_nifi-1.28.1_zookeeper-3.9.3_openshift-false_listener-class-external-unstable | skipping kubernetes event logging
=== NAME  kuttl
    harness.go:403: run tests finished
    harness.go:510: cleaning up
    harness.go:567: removing temp folder: ""
--- FAIL: kuttl (463.10s)
    --- FAIL: kuttl/harness (0.00s)
        --- FAIL: kuttl/harness/smoke_nifi-1.28.1_zookeeper-3.9.3_openshift-false_listener-class-external-unstable (463.09s)

Even though the docs state this should be additive, i dont feel this works properly....

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog is missing.

@maltesander maltesander changed the title fix: Disable 8081 for 2xx and bind to localhost fix: Disable 8081 (metrics) for 2xx Jun 4, 2025
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Maleware Maleware enabled auto-merge June 4, 2025 07:17
@Maleware Maleware added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit e5b7325 Jun 4, 2025
17 checks passed
@Maleware Maleware deleted the fix/disable-8081-for-2xx branch June 4, 2025 07:23
@Maleware Maleware moved this from Development: In Review to Development: Done in Stackable Engineering Jun 4, 2025
@lfrancke lfrancke changed the title fix: Disable 8081 (metrics) for 2xx fix: Disable port 8081 (metrics) for NiFi 2.x Jun 4, 2025
@lfrancke
Copy link
Member

lfrancke commented Jun 4, 2025

Can you please add some justification to this issue? Why do we disable the port? Does this need to be mentioned in the release notes? Does this need to be documented?

@lfrancke lfrancke moved this from Development: Done to Acceptance: In Progress in Stackable Engineering Jun 4, 2025
@maltesander
Copy link
Member

It is only disabled for version 2.x.x since the metrics endpoint changed. Nothing breaking, was never used in 2.x.x, reporting task job is deactivated for 2.x.x as well. We just still exposed the "non-existent" metrics port in 2.x.x so far, which is fixed by this.

@lfrancke
Copy link
Member

lfrancke commented Jun 5, 2025

Thank you

@lfrancke lfrancke moved this from Acceptance: In Progress to Done in Stackable Engineering Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants