Support Questions

Find answers, ask questions, and share your expertise

Unable to check access status in Apache Nifi(Nifi not running on browser)

avatar
Contributor

Hi All,

Our Nifi is running in the unix when we are checking the status it is saying that Nifi is running. But we are unable t open it in the browser. SO someone can help us on this issue. Thanks in advance.

1 ACCEPTED SOLUTION

avatar
Master Mentor
@Ayaskant Das

Based on the output from the nifi-user.log, the following user successfully authenticated to NiFi but was not authorized view the NiFi UI.

13302-screen-shot-2017-03-06-at-50149-pm.png

Did you configure this user as your "Initial Admin Identity"?

The "Initial Admin Identity" is configured in the authorizers.xml file and is used to initially create both the users.xml and authorizations.xml files. It is case sensitive and white spaces do count.

If you NiFi had previously been started with an incorrect value for "Initial Admin Identity" you will need to correct the authorizers.xml with the correct value, delete both users.xml and authorizations.xml files, and restart NiFi so that these files are created again.

Thanks, Matt

View solution in original post

15 REPLIES 15

avatar
Master Mentor

@Ayaskant Das

Is your NiFi instance secured?

If so, how are you configured to authenticate users who are accessing the URL?

By default NiFi will look for a users SSL certificate in the connection for authentication. If none is provided and no other authentication method has been configured in your NiFi, the connection will just get closed.

Thanks,

Matt

avatar
Master Mentor

@Ayaskant Das

When you start NiFi, the bootstrap.conf file will show that the bootstrap is listening on port ....

but this does not mean the application has fully started yet. The browser will not be available until it has.

if you tail -F nifi-app.log you can watch all the things that happen during application startup.

Check your nifi-app.log for reported issues and look for the following line being outputted:

org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:

following this line will be additional lines showing the full URL(s).

Until this line is output the browser will still be unavailable.

Thanks,

Matt

avatar
Contributor

Hi when we are checking the status it is showing:

org.apache.nifi.bootstrap.Command Apache NiFi is currently running, listening to Bootstrap on port 43457, PID=21265

so can anyone please let us know the issue why it is not running on the browser

avatar
Contributor

Hi Matt,

While checking in the logs i am able to see only theses lines:

org.apache.nifi.NiFi Initiating shutdown of Jetty web server...

org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).

But not the line which you mentioned in the reply. Can you please guide me on this.

avatar
Master Mentor

@Ayaskant Das

So your nifi shut back down because of some error that occurred during startup. That error will be in the nifi-app.log somewhere above the lines you posted.

It will likely have a full stack trace with the error that includes the cause.

Thanks,

Matt

avatar
Contributor

Hi Matt,

We are not getting any error in the files. Also we ran the command from root now and got this two lines at the end of the new log:

o.a.nifi.properties.NiFiPropertiesLoader Determined default nifi.properties path to be '/hadoop/local/hadoop/nifi-latest/./conf/nifi.properties'

o.a.nifi.properties.NiFiPropertiesLoader Loaded 121 properties from /hadoop/local/hadoop/nifi-latest/./conf/nifi.properties

We are not able to see any erroe in the logs. Can you please help me on this.

Thanks

Ayaskant

avatar
Master Mentor

those are normal... it is still starting. it may appear to stall at certain points during startup...

Di you perhaps issue a shutdown command before it ever finished actually starting?

keep tailing the log until you see it either show the URL line or it shuts down again on its own. This may taken several minutes. perhaps sharing your nifi-app.log after is fails again will help.

avatar
Contributor

Hi Matt,

I am able to see the URL

org.apache.nifi.web.server.JettyServer http://10.68.91.170:13045/nifi

org.apache.nifi.web.server.JettyServer https://10.68.91.170:13046/nifi

still it is not opening in the web browser

avatar
Master Mentor
@Ayaskant Das

Now we know that your NiFi is up and running. We also know that it has been configured to run securely over https. After being secured you will not be able to access it over http.

Https access will only work if user authentication is successful which comes full circle to my initial response.

Here are a few links to assist you there:

https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html

https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#user-authentication

https://community.hortonworks.com/articles/17293/how-to-create-user-generated-keys-for-securing-nif....

Thanks,

Matt