Search code examples
mysqlapache-nifikylo

Kylo data_ingest feed job fails due to Access denied for user 'root'@'localhost' (using password: NO)


  • I have setup a default template from Kylo installation directory for 'data_ingest' on kylo UI - http://localhost:8400

  • Using the template I created a Feed to fetch data from database (MySQL) specifying database / table / columns in Feed details.

  • The database was selected from a dropdown, I have given all configurations inside /opt/kylo/kylo-services/application.properties

    spring.datasource.username=root
    spring.datasource.password=cloudera
    ..
    hive.metastore.datasource.username=root
    hive.metastore.datasource.password=cloudera
    

Despite this the job is failing for me with following error -

GetTableData[id=a3eb6450-1f53-3e1e-a523-01db02f0b625] Unable to execute SQL select from table due to StandardFlowFileRecord[uuid=27219d8a-9bef-40be-a413-63d4d8663ebe,claim=,offset=0,name=32633830193154,size=0]; routing to failure: org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not connect: Access denied for user 'root'@'localhost' (using password: NO))

enter image description here

Is there any configuration that I am missing causing this error?


Solution

  • To resolve this, provide the credentials for connecting to the database via the controller service. The steps are below:

    1. Navigate to NiFi (http://localhost:8079/nifi/).
    2. Click the gear icon on the NiFi Flow process group on the canvas. This will open up Process Group Configuration page.

    enter image description here

    1. Navigate to Controller Services tab.
    2. Locate the service of type DBCPConnectionPool. Depending upon the version of Kylo, this may be named MySQL or Kylo MySQL

    enter image description here

    1. Disable the service by clicking the lightning icon and clicking Disable button. Click Close after service is disabled.

    enter image description here

    1. Open the service configuration by clicking the pencil icon. This will open up Configure Controller Service popup.

    enter image description here

    1. Provide the correct database user name and password values for the properties Database User and Password

    enter image description here

    1. Click Apply. The configuration popup will close.
    2. Enable the service by clicking the lightning icon, selecting Service and referencing components from the Scope dropdown and clicking Enable. Click Close after service is enabled.

    enter image description here

    1. Run the feed again.