You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Kevin Doran <kd...@apache.org> on 2022/02/16 14:39:09 UTC

Re: Running unsecured Nifi in Docker

 There have been some changes recently, and NiFi is now secure by default
with a self-signed cert I believe. It could be that NIFI_WEB_HTTP_PORT
conflicts with the expected NIFI_WEB_HTTPS_PORT.

Try this:

  nifi:
    image: apache/nifi:latest
    ports:
      - "8443:8443" # UI
      - "10000"     # Site-to-Site Input Port
    environment:
      SINGLE_USER_CREDENTIALS_USERNAME: admin
      SINGLE_USER_CREDENTIALS_PASSWORD: some_password
      NIFI_SENSITIVE_PROPS_KEY: some_other_password

If that does not work, can you please share the exact startup error?

On Feb 16, 2022 at 09:28:55, Jean-Sebastien Vachon <js...@brizodata.com>
wrote:

> Hi all,
>
> I'm trying to start a simple unsecured Nifi instance in a container as
> part of a larger docker compose stack and I'm stuck with an error regarding
> the TLS configuration and/or keystore properties. Here is the relevant part
> of my docker-compose file... what am I missing? Please make me feel stupid
> 😉
>
>  nifi:
>         image: apache/nifi:latest
>         # command:
>         ports:
>             - "8080:8080"
>             - "10000:10000"
>
>         restart: always
>         command:
>             /bin/bash
>         environment:
>             NIFI_REMOTE_INPUT_HOST: 0.0.0.0
>             NIFI_WEB_HTTP_HOST: 0.0.0.0
>             SINGLE_USER_CREDENTIALS_USERNAME: admin
>             SINGLE_USER_CREDENTIALS_PASSWORD: some_password
>             NIFI_WEB_HTTP_PORT: 8080
>             AUTH: none
>
>
>
>
>
> *Jean-Sébastien Vachon *
> Co-Founder & Architect
>
>
> *Brizo Data, Inc. www.brizodata.com
> <https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
> *
>

Re: Running unsecured Nifi in Docker

Posted by Jean-Sebastien Vachon <js...@brizodata.com>.
Ok my bad... it does work after all.

I have no excuse. Thanks for your help

Jean-Sébastien Vachon
Co-Founder & Architect
Brizo Data, Inc.
www.brizodata.com<https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
________________________________
From: Kevin Doran <kd...@apache.org>
Sent: Wednesday, February 16, 2022 10:29 AM
To: users@nifi.apache.org <us...@nifi.apache.org>
Subject: Re: Running unsecured Nifi in Docker

I’ve tried the docker compose yaml config you provided as well as the one I sent you, and both are working for me with the latest nifi image. Is there any other relevant part of your config that could be causing this (e.g., changes since your initial email?) Have you started over from a clean state by running `docker compose down`?

On Feb 16, 2022 at 09:45:27, Jean-Sebastien Vachon <js...@brizodata.com>> wrote:
Here you go... thanks for the fast response.
I've looked at the start script to see what is being done and set the different environment variables to go through the proper sections in the file.


...
/extensions/nifi-server-nar-1.15.3.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-ui-1.15.3.war}
stack-nifi2-1    | 2022-02-16 14:23:46,854 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=158ms
stack-nifi2-1    | 2022-02-16 14:23:46,917 INFO [main] o.e.j.s.handler.ContextHandler._nifi_api No Spring WebApplicationInitializer types detected on classpath
stack-nifi2-1    | 2022-02-16 14:23:46,995 INFO [main] o.e.j.s.handler.ContextHandler._nifi_api Initializing Spring root WebApplicationContext
stack-nifi2-1    | 2022-02-16 14:23:51,275 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loaded 198 properties from /opt/nifi/nifi-current/./conf/nifi.properties
stack-nifi2-1    | 2022-02-16 14:23:55,907 INFO [main] o.a.n.r.v.FileBasedVariableRegistry Loaded 93 properties from system properties and environment variables
stack-nifi2-1    | 2022-02-16 14:23:55,908 INFO [main] o.a.n.r.v.FileBasedVariableRegistry Loaded a total of 93 properties.  Including precedence overrides effective accessible registry key size is 93
stack-nifi2-1    | 2022-02-16 14:23:56,178 WARN [main] o.a.nifi.security.util.SslContextFactory Some keystore properties are populated (, ********, ********, null) but not valid
stack-nifi2-1    | 2022-02-16 14:23:56,179 ERROR [main] o.apache.nifi.controller.FlowController Unable to start the flow controller because the TLS configuration was invalid: The keystore properties are not valid
stack-nifi2-1    | 2022-02-16 14:23:56,657 ERROR [main] o.s.web.context.ContextLoader Context initialization failed
stack-nifi2-1    | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChainProxySecurityConfigurer' parameter 1; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.NiFiWebApiSecurityConfiguration': Unsatisfied dependency expressed through method 'setJwtAuthenticationProvider' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Flow controller TLS configuration is invalid



Jean-Sébastien Vachon
Co-Founder & Architect
Brizo Data, Inc.
www.brizodata.com<https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
________________________________
From: Kevin Doran <kd...@apache.org>>
Sent: Wednesday, February 16, 2022 9:39 AM
To: users@nifi.apache.org<ma...@nifi.apache.org> <us...@nifi.apache.org>>
Subject: Re: Running unsecured Nifi in Docker

There have been some changes recently, and NiFi is now secure by default with a self-signed cert I believe. It could be that NIFI_WEB_HTTP_PORT conflicts with the expected NIFI_WEB_HTTPS_PORT.

Try this:

  nifi:
    image: apache/nifi:latest
    ports:
      - "8443:8443" # UI
      - "10000"     # Site-to-Site Input Port
    environment:
      SINGLE_USER_CREDENTIALS_USERNAME: admin
      SINGLE_USER_CREDENTIALS_PASSWORD: some_password
      NIFI_SENSITIVE_PROPS_KEY: some_other_password

If that does not work, can you please share the exact startup error?

On Feb 16, 2022 at 09:28:55, Jean-Sebastien Vachon <js...@brizodata.com>> wrote:
Hi all,

I'm trying to start a simple unsecured Nifi instance in a container as part of a larger docker compose stack and I'm stuck with an error regarding the TLS configuration and/or keystore properties. Here is the relevant part of my docker-compose file... what am I missing? Please make me feel stupid 😉

 nifi:
        image: apache/nifi:latest
        # command:
        ports:
            - "8080:8080"
            - "10000:10000"

        restart: always
        command:
            /bin/bash
        environment:
            NIFI_REMOTE_INPUT_HOST: 0.0.0.0
            NIFI_WEB_HTTP_HOST: 0.0.0.0
            SINGLE_USER_CREDENTIALS_USERNAME: admin
            SINGLE_USER_CREDENTIALS_PASSWORD: some_password
            NIFI_WEB_HTTP_PORT: 8080
            AUTH: none




Jean-Sébastien Vachon
Co-Founder & Architect
Brizo Data, Inc.
www.brizodata.com<https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>

Re: Running unsecured Nifi in Docker

Posted by Kevin Doran <kd...@apache.org>.
I’ve tried the docker compose yaml config you provided as well as the one I
sent you, and both are working for me with the latest nifi image. Is there
any other relevant part of your config that could be causing this (e.g.,
changes since your initial email?) Have you started over from a clean state
by running `docker compose down`?

On Feb 16, 2022 at 09:45:27, Jean-Sebastien Vachon <js...@brizodata.com>
wrote:

> Here you go... thanks for the fast response.
> I've looked at the start script to see what is being done and set the
> different environment variables to go through the proper sections in the
> file.
>
>
> ...
> /extensions/nifi-server-nar-1.15.3.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-ui-1.15.3.war}
>
> stack-nifi2-1    | 2022-02-16 14:23:46,854 INFO [main]
> o.e.j.a.AnnotationConfiguration Scanning elapsed time=158ms
> stack-nifi2-1    | 2022-02-16 14:23:46,917 INFO [main]
> o.e.j.s.handler.ContextHandler._nifi_api No Spring
> WebApplicationInitializer types detected on classpath
> stack-nifi2-1    | 2022-02-16 14:23:46,995 INFO [main]
> o.e.j.s.handler.ContextHandler._nifi_api Initializing Spring root
> WebApplicationContext
> stack-nifi2-1    | 2022-02-16 14:23:51,275 INFO [main]
> o.a.nifi.properties.NiFiPropertiesLoader Loaded 198 properties from
> /opt/nifi/nifi-current/./conf/nifi.properties
> stack-nifi2-1    | 2022-02-16 14:23:55,907 INFO [main]
> o.a.n.r.v.FileBasedVariableRegistry Loaded 93 properties from system
> properties and environment variables
> stack-nifi2-1    | 2022-02-16 14:23:55,908 INFO [main]
> o.a.n.r.v.FileBasedVariableRegistry Loaded a total of 93 properties.
> Including precedence overrides effective accessible registry key size is 93
> stack-nifi2-1    | 2022-02-16 14:23:56,178 WARN [main]
> o.a.nifi.security.util.SslContextFactory Some keystore properties are
> populated (, ********, ********, null) but not valid
> stack-nifi2-1    | 2022-02-16 14:23:56,179 ERROR [main]
> o.apache.nifi.controller.FlowController Unable to start the flow controller
> because the TLS configuration was invalid: The keystore properties are not
> valid
> stack-nifi2-1    | 2022-02-16 14:23:56,657 ERROR [main]
> o.s.web.context.ContextLoader Context initialization failed
> stack-nifi2-1    |
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name
> 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration':
> Unsatisfied dependency expressed through method
> 'setFilterChainProxySecurityConfigurer' parameter 1; nested exception is
> org.springframework.beans.factory.BeanExpressionException: Expression
> parsing failed; nested exception is
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name
> 'org.apache.nifi.web.NiFiWebApiSecurityConfiguration': Unsatisfied
> dependency expressed through method 'setJwtAuthenticationProvider'
> parameter 0; nested exception is
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name
> 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration':
> Unsatisfied dependency expressed through constructor parameter 3; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'flowController': FactoryBean threw exception on
> object creation; nested exception is java.lang.IllegalStateException: Flow
> controller TLS configuration is invalid
>
>
>
>
> *Jean-Sébastien Vachon *
> Co-Founder & Architect
>
>
> *Brizo Data, Inc. www.brizodata.com
> <https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
> *
> ------------------------------
> *From:* Kevin Doran <kd...@apache.org>
> *Sent:* Wednesday, February 16, 2022 9:39 AM
> *To:* users@nifi.apache.org <us...@nifi.apache.org>
> *Subject:* Re: Running unsecured Nifi in Docker
>
> There have been some changes recently, and NiFi is now secure by default
> with a self-signed cert I believe. It could be that NIFI_WEB_HTTP_PORT
> conflicts with the expected NIFI_WEB_HTTPS_PORT.
>
> Try this:
>
>   nifi:
>     image: apache/nifi:latest
>     ports:
>       - "8443:8443" # UI
>       - "10000"     # Site-to-Site Input Port
>     environment:
>       SINGLE_USER_CREDENTIALS_USERNAME: admin
>       SINGLE_USER_CREDENTIALS_PASSWORD: some_password
>       NIFI_SENSITIVE_PROPS_KEY: some_other_password
>
> If that does not work, can you please share the exact startup error?
>
> On Feb 16, 2022 at 09:28:55, Jean-Sebastien Vachon <js...@brizodata.com>
> wrote:
>
> Hi all,
>
> I'm trying to start a simple unsecured Nifi instance in a container as
> part of a larger docker compose stack and I'm stuck with an error regarding
> the TLS configuration and/or keystore properties. Here is the relevant part
> of my docker-compose file... what am I missing? Please make me feel stupid
> 😉
>
>  nifi:
>         image: apache/nifi:latest
>         # command:
>         ports:
>             - "8080:8080"
>             - "10000:10000"
>
>         restart: always
>         command:
>             /bin/bash
>         environment:
>             NIFI_REMOTE_INPUT_HOST: 0.0.0.0
>             NIFI_WEB_HTTP_HOST: 0.0.0.0
>             SINGLE_USER_CREDENTIALS_USERNAME: admin
>             SINGLE_USER_CREDENTIALS_PASSWORD: some_password
>             NIFI_WEB_HTTP_PORT: 8080
>             AUTH: none
>
>
>
>
>
> *Jean-Sébastien Vachon *
> Co-Founder & Architect
>
>
> *Brizo Data, Inc. www.brizodata.com
> <https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
> *
>
>

Re: Running unsecured Nifi in Docker

Posted by Jean-Sebastien Vachon <js...@brizodata.com>.
Here you go... thanks for the fast response.
I've looked at the start script to see what is being done and set the different environment variables to go through the proper sections in the file.


...
/extensions/nifi-server-nar-1.15.3.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-ui-1.15.3.war}
stack-nifi2-1    | 2022-02-16 14:23:46,854 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=158ms
stack-nifi2-1    | 2022-02-16 14:23:46,917 INFO [main] o.e.j.s.handler.ContextHandler._nifi_api No Spring WebApplicationInitializer types detected on classpath
stack-nifi2-1    | 2022-02-16 14:23:46,995 INFO [main] o.e.j.s.handler.ContextHandler._nifi_api Initializing Spring root WebApplicationContext
stack-nifi2-1    | 2022-02-16 14:23:51,275 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loaded 198 properties from /opt/nifi/nifi-current/./conf/nifi.properties
stack-nifi2-1    | 2022-02-16 14:23:55,907 INFO [main] o.a.n.r.v.FileBasedVariableRegistry Loaded 93 properties from system properties and environment variables
stack-nifi2-1    | 2022-02-16 14:23:55,908 INFO [main] o.a.n.r.v.FileBasedVariableRegistry Loaded a total of 93 properties.  Including precedence overrides effective accessible registry key size is 93
stack-nifi2-1    | 2022-02-16 14:23:56,178 WARN [main] o.a.nifi.security.util.SslContextFactory Some keystore properties are populated (, ********, ********, null) but not valid
stack-nifi2-1    | 2022-02-16 14:23:56,179 ERROR [main] o.apache.nifi.controller.FlowController Unable to start the flow controller because the TLS configuration was invalid: The keystore properties are not valid
stack-nifi2-1    | 2022-02-16 14:23:56,657 ERROR [main] o.s.web.context.ContextLoader Context initialization failed
stack-nifi2-1    | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChainProxySecurityConfigurer' parameter 1; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.NiFiWebApiSecurityConfiguration': Unsatisfied dependency expressed through method 'setJwtAuthenticationProvider' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Flow controller TLS configuration is invalid



Jean-Sébastien Vachon
Co-Founder & Architect
Brizo Data, Inc.
www.brizodata.com<https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>
________________________________
From: Kevin Doran <kd...@apache.org>
Sent: Wednesday, February 16, 2022 9:39 AM
To: users@nifi.apache.org <us...@nifi.apache.org>
Subject: Re: Running unsecured Nifi in Docker

There have been some changes recently, and NiFi is now secure by default with a self-signed cert I believe. It could be that NIFI_WEB_HTTP_PORT conflicts with the expected NIFI_WEB_HTTPS_PORT.

Try this:

  nifi:
    image: apache/nifi:latest
    ports:
      - "8443:8443" # UI
      - "10000"     # Site-to-Site Input Port
    environment:
      SINGLE_USER_CREDENTIALS_USERNAME: admin
      SINGLE_USER_CREDENTIALS_PASSWORD: some_password
      NIFI_SENSITIVE_PROPS_KEY: some_other_password

If that does not work, can you please share the exact startup error?

On Feb 16, 2022 at 09:28:55, Jean-Sebastien Vachon <js...@brizodata.com>> wrote:
Hi all,

I'm trying to start a simple unsecured Nifi instance in a container as part of a larger docker compose stack and I'm stuck with an error regarding the TLS configuration and/or keystore properties. Here is the relevant part of my docker-compose file... what am I missing? Please make me feel stupid 😉

 nifi:
        image: apache/nifi:latest
        # command:
        ports:
            - "8080:8080"
            - "10000:10000"

        restart: always
        command:
            /bin/bash
        environment:
            NIFI_REMOTE_INPUT_HOST: 0.0.0.0
            NIFI_WEB_HTTP_HOST: 0.0.0.0
            SINGLE_USER_CREDENTIALS_USERNAME: admin
            SINGLE_USER_CREDENTIALS_PASSWORD: some_password
            NIFI_WEB_HTTP_PORT: 8080
            AUTH: none




Jean-Sébastien Vachon
Co-Founder & Architect
Brizo Data, Inc.
www.brizodata.com<https://outlook.office365.com/mail/options/mail/messageContent/www.brizodata.com>