Member since
04-30-2022
23
Posts
3
Kudos Received
0
Solutions
09-05-2025
05:39 AM
1 Kudo
However, I was able to resolve this by leveraging ExecuteStreamCommand (ESC). Specifically, I used the Output Destination Attribute property to push the required attributes into it, which I can then process separately.
... View more
09-05-2025
05:36 AM
That approach is not feasible. Adopting a new programming language is impractical given the large number of existing Python scripts that I cannot realistically migrate. The second option is also suboptimal, since creating a dedicated NiFi processor for each script would introduce significant overhead. Furthermore, each custom processor would run in its own isolated virtual environment, leading to excessive heap consumption
... View more
08-25-2025
03:22 AM
In NiFi 2.4 and above, the Jython engine is no longer available in ExecuteScript. Previously, I used scripts like this to read and update attributes: val = flowFile.getAttribute('x')
flowFile = session.putAttribute(flowFile, 'x', str(int(val) + 10)) Now I want to do the same using Python in NiFi 2.4+: Read an attribute (e.g., x) Compute a new value Write it back as an attribute (or a new one) Keep the original FlowFile content unchanged What’s the recommended way in NiFi 2.4+? Any official docs, samples, or best practices for this scenario would be very helpful.
... View more
Labels:
- Labels:
-
Apache NiFi
03-12-2024
09:11 PM
I have set up Apache NiFi in a Docker container and am using Nginx as a reverse proxy to handle SSL termination. However, when I try to access the NiFi UI through the custom domain configured in Nginx, I receive an "HTTP ERROR 400 Invalid SNI" message. Below is my Docker Compose configuration: version: '3'
services:
nifi:
build:
context: .
dockerfile: Dockerfile
ports:
- "8443:8443"
volumes:
- nifi-data:/opt/nifi/nifi-current
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./sslcert:/etc/nginx/sslcert
ports:
- "80:80"
- "443:443"
depends_on:
- nifi
volumes:
nifi-data: And here is the relevant part of my nginx.conf: events {}
http {
server {
listen 80;
server_name nifi.xxx-xxx-python-mps;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name nifi.xxx-xxx-python-mps;
ssl_certificate /etc/nginx/sslcert/nifi.xxx-xxx-python-mps.pem;
ssl_certificate_key /etc/nginx/sslcert/nifi.xxx-xxx-python-mps-key.pem;
location / {
proxy_pass https://nifi:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
}
} The SSL certificate is self-signed and generated specifically for the domain nifi.my-custom-domain. When accessing the NiFi UI, I encounter the following error: HTTP ERROR 400 Invalid SNI
URI: https://nifi.iyed-netze-python-mps/nifi/
STATUS: 400
MESSAGE: Invalid SNI
CAUSED BY: org.eclipse.jetty.http.BadMessageException: 400: Invalid SNI
Caused by:
org.eclipse.jetty.http.BadMessageException: 400: Invalid SNI
at org.eclipse.jetty.server.SecureRequestCustomizer.checkSni(SecureRequestCustomizer.java:229)
at org.eclipse.jetty.server.SecureRequestCustomizer.newSecureRequest(SecureRequestCustomizer.java:208)
at org.eclipse.jetty.server.SecureRequestCustomizer.customize(SecureRequestCustomizer.java:197)
at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:587)
at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:424)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
at org.eclipse.jetty.io.ssl.SslConnection$1.run(SslConnection.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156)
at java.base/java.lang.Thread.run(Thread.java:1583) What might be causing the "Invalid SNI" error in this setup? How can I troubleshoot this issue further? PS: I have added the custom domain to etc/hosts, and it works for routing to localhost
... View more
Labels:
- Labels:
-
Apache NiFi
03-11-2024
10:30 AM
Hi @MattWho When I attempt to connect using the IP address, I encounter the same message. However, the connection is successful when using 'localhost'. I am aiming to establish a unique DNS name that is distinct from both 'localhost' and the IP address. I'm utilizing Docker to operate Nifi.
... View more
03-11-2024
02:09 AM
1 Kudo
Has anyone resolved this issue and would be willing to share their solution?
... View more
02-16-2024
01:22 PM
1 Kudo
I faced the same issue such as Java 21 is installed. I got this issue: as mentioned in a comment above that we need the hostname:
... View more
12-16-2022
05:17 AM
the example is the next: GenerateFlowFile content: I want to clean the ETX character with a python script (Nifi wasn't able to clean it with replaceText), so I decided to pass the list to a python script to clean it, but am not sure how to read the Flowfile content. The list (my_list) should be passed as Flowfile to the python script.
... View more
Labels:
- Labels:
-
Apache NiFi
11-29-2022
02:40 AM
Can you help me to find where do Nifi stores templates? I am running Nifi on a docker container. PS: there is no dir under the folder conf. Here is the WORKDIR:
... View more
Labels:
- Labels:
-
Apache NiFi
11-10-2022
12:17 PM
I think everything works fine, the json flowfiles are the response of an invokeHttp request to an API, I receive more than 5000 flowfiles, each flowfile contains 200 records. Problems happen only with 4 files that contain the ETX symbol.
... View more