Support Questions

Find answers, ask questions, and share your expertise

Frequent Session Expired in NiFi

avatar
New Contributor

Hello Cloudera Community,

I'm encountering an issue with my NiFi deployment where users are getting frequent "Session Expired" messages approximately every 30 minutes. When this happens, they have to refresh their browser, which causes them to lose any unsaved modifications in the process.

Setup details:

  • NiFi is integrated with Azure Active Directory .

Below are the relevant configurations from my nifi.properties file (please let me know if any more details are needed). 

nifi.security.user.oidc.additional.scopes=profile
nifi.security.user.oidc.claim.identifying.user=upn
nifi.security.user.oidc.client.id=********************
nifi.security.user.oidc.client.secret=***************
nifi.security.user.oidc.connect.timeout=180 secs
nifi.security.user.oidc.discovery.url=https://login.microsoftonline.com/************
nifi.security.user.oidc.preferred.jwsalgorithm=
nifi.security.user.oidc.read.timeout=180 secs
nifi.web.war.directory= ./lib
nifi.web.proxy.host= nifi.**************.com
nifi.web.https.port= 8443
nifi.web.http.host= nifi-0.nifi-headless.nifi.svc.cluster.local
nifi.web.http.network.interface.default= eth0
nifi.web.jetty.working.directory= ./work/jetty
nifi.web.jetty.threads= 200
nifi.web.request.timeout= 600 secs

I believe the issue might relate to session management or integration with Azure AD, but I’m not entirely sure. Could this be a misconfiguration with Jetty or session handling settings? Has anyone experienced something similar when using Azure AD, or could there be additional configurations I should consider?

Any advice on how I can resolve this issue would be much appreciated!

Please let me know if you need more information about my configuration or logs to assist in troubleshooting.

Thanks in advance for your help!



 

1 ACCEPTED SOLUTION

avatar
Master Mentor

@salahevops 

Upgrading to Apache NiFi 1.21 or newer should resolve you issue.
The latest Apache NiFi 1.x branch release is 1.27.

Apache NiFi 2.x branch is still in it developmental milestone release cycle (currently at 2.0.0-M4).  There was a vote put forth in Apache NiFi to release the first official 2.0 release.

 

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@salahevops 

I suspect you are not running Apache NiFi older then release 1.21?
If so, you may be encountering this issue addressed through an improvement:
https://issues.apache.org/jira/browse/NIFI-4890

Azure AD lets a lifetime on the client issued token.  That is likely 30 minutes.
The token can be refreshed, but NiFi OIDC in older version does not have the ability to do the background refresh.

Further improvements where added in NiFi 2.0 to add the refresh configuration timer:
https://issues.apache.org/jira/browse/NIFI-12135

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt



avatar
New Contributor

thank you @MattWho for your quick answer, i am using nifi 1.19.1
so the solution is to upgrade Nifi to Version>=2.0

avatar
Master Mentor

@salahevops 

Upgrading to Apache NiFi 1.21 or newer should resolve you issue.
The latest Apache NiFi 1.x branch release is 1.27.

Apache NiFi 2.x branch is still in it developmental milestone release cycle (currently at 2.0.0-M4).  There was a vote put forth in Apache NiFi to release the first official 2.0 release.

 

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
New Contributor

thank you 🙂