我正在尝试在EC2实例上的Docker容器中部署Apache NiFi。目前仅打开2个端口(80和443),我无权对其进行更改。
我设法启动了NiFi:
sudo docker run --name nifi -p 8080:8080 -d apache/nifi:latest
这是我的Nginx配置:
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
upstream nifi {
server 0.0.0.0:8080;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
location / {
proxy_pass http://nifi;
proxy_set_header Origin http://nifi;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
目前,NiFi工作正常,我可以通过实例的IP访问它。 proxy_set_header Origin http://nifi;
设置解决了将模板上传到服务的问题。
问题是我根本无法配置任何处理器。每次,当我单击“配置”时,都会出现此错误:
Unable to communicate with NiFi
Please ensure the application is running and check the logs for any errors.
您能帮我解决这个问题吗?
我在日志中看不到任何有用的东西。一旦出现关于不使用HTTPS的错误,但我认为这无关。