Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star

Atlas 0.7 and HDP-2.4.0.0-169

[falcon@bigdata21 ~]$ falcon entity -doAs falcon -submit -type process -file process.xml
falcon/default/Submit successful (process) demo-process

in same time in falcon log:

^A 2016-06-21 18:16:23,403 INFO  - [926524251@qtp-1552999801-21 - 2f8eee7e-2db9-47f7-acde-3ad3d36e5d01:] ~ HttpServletRequest RemoteUser is null (Servlets:47)
2016-06-21 18:16:23,403 INFO  - [926524251@qtp-1552999801-21 - 2f8eee7e-2db9-47f7-acde-3ad3d36e5d01:] ~ HttpServletRequest user.name param value is falcon (Servlets:53)
2016-06-21 18:16:23,403 DEBUG - [926524251@qtp-1552999801-21 - 2f8eee7e-2db9-47f7-acde-3ad3d36e5d01:] ~ Audit: falcon/192.168.81.110 performed request http://bigdata21.webmedia.int:15000/api/options?user.name=falcon (192.168.81.110) at time 2016-06-21T15:16Z (FalconAuditFilter:86)
2016-06-21 18:16:23,408 INFO  - [926524251@qtp-1552999801-21 - bb0fdcb4-44c4-43d4-969e-5edfe732c71a:] ~ HttpServletRequest RemoteUser is null (Servlets:47)
2016-06-21 18:16:23,408 INFO  - [926524251@qtp-1552999801-21 - bb0fdcb4-44c4-43d4-969e-5edfe732c71a:] ~ HttpServletRequest user.name param value is falcon (Servlets:53)
2016-06-21 18:16:23,408 DEBUG - [926524251@qtp-1552999801-21 - bb0fdcb4-44c4-43d4-969e-5edfe732c71a:] ~ Audit: falcon/192.168.81.110 performed request http://bigdata21.webmedia.int:15000/api/options?user.name=falcon&user.name=falcon (192.168.81.110) at time 2016-06-21T15:16Z (FalconAuditFilter:86)
2016-06-21 18:16:23,714 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:] ~ HttpServletRequest RemoteUser is falcon (Servlets:47)
2016-06-21 18:16:23,714 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Logging in falcon (CurrentUser:65)
2016-06-21 18:16:23,715 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Request from authenticated user: falcon, URL=/api/entities/submit/process?doAs=falcon, doAs user: falcon (FalconAuthenticationFilter:185)
2016-06-21 18:16:23,718 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Parsed Entity: demo-process (EntityParser:95)
2016-06-21 18:16:23,718 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Invoking method submit on service org.apache.falcon.resource.ConfigSyncService (IPCChannel:45)
2016-06-21 18:16:23,721 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Parsed Entity: demo-process (EntityParser:95)
2016-06-21 18:16:23,743 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Creating FS for the login user falcon, impersonation not required (HadoopClientFactory:191)
2016-06-21 18:16:23,751 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Persisted configuration PROCESS/demo-process (ConfigurationStore:371)
2016-06-21 18:16:23,751 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding edges for demo-process: {(CLUSTER) cluster1=[(PROCESS) demo-process], (PROCESS) demo-process=[(CLUSTER) cluster1]} (EntityGraph:90)
2016-06-21 18:16:23,751 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding edges : [(PROCESS) demo-process] for (CLUSTER) cluster1 (EntityGraph:93)
2016-06-21 18:16:23,752 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding edges : [(CLUSTER) cluster1] for (PROCESS) demo-process (EntityGraph:93)
2016-06-21 18:16:23,752 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Merged edges to graph demo-process (EntityGraph:100)
2016-06-21 18:16:23,752 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding lineage for entity: demo-process, type: PROCESS (MetadataMappingService:209)
2016-06-21 18:16:23,752 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding process entity: demo-process (EntityRelationshipGraphBuilder:131)
2016-06-21 18:16:23,752 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Finding vertex for: name=demo-process, type=PROCESS_ENTITY (RelationshipGraphBuilder:87)
2016-06-21 18:16:23,754 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Found an existing vertex for: name=demo-process, type=PROCESS_ENTITY (RelationshipGraphBuilder:69)
2016-06-21 18:16:23,756 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Finding vertex for: name=falcon, type=USER (RelationshipGraphBuilder:87)
2016-06-21 18:16:23,757 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Found an existing vertex for: name=falcon, type=USER (RelationshipGraphBuilder:69)
2016-06-21 18:16:23,758 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Finding vertex for: name=devel, type=TAGS (RelationshipGraphBuilder:87)
2016-06-21 18:16:23,759 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Found an existing vertex for: name=devel, type=TAGS (RelationshipGraphBuilder:69)
2016-06-21 18:16:23,760 DEBUG - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Finding vertex for: name=cluster1, type=CLUSTER_ENTITY (RelationshipGraphBuilder:87)
2016-06-21 18:16:23,764 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Adding process entity to Atlas: demo-process (AtlasService:103)
2016-06-21 18:16:23,764 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ PROCESS/demo-process is published into config store (AUDIT:229)
2016-06-21 18:16:23,764 INFO  - [Atlas Logger 0:] ~ Entered Atlas hook for Falcon hook operation ADD_PROCESS (FalconHook:148)
2016-06-21 18:16:23,764 INFO  - [926524251@qtp-1552999801-21 - 49eed5aa-882c-4d28-a6d1-1a5707da9555:falcon:POST//entities/submit/process] ~ Submit successful: (process): demo-process (AbstractEntityManager:415)
2016-06-21 18:16:23,764 INFO  - [Atlas Logger 0:] ~ Atlas hook failed (FalconHook:140)
java.lang.IllegalStateException: No user logged into the system
	at org.apache.falcon.security.CurrentUser.getAuthenticatedUser(CurrentUser.java:150)
	at org.apache.atlas.falcon.hook.FalconHook.getAuthenticatedUser(FalconHook.java:156)
	at org.apache.atlas.falcon.hook.FalconHook.fireAndForget(FalconHook.java:150)
	at org.apache.atlas.falcon.hook.FalconHook.access$200(FalconHook.java:63)
	at org.apache.atlas.falcon.hook.FalconHook$2.run(FalconHook.java:138)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

I see that error comes from

https://github.com/apache/falcon/blob/master/common/src/main/java/org/apache/falcon/security/Current...

    public static String getAuthenticatedUser() {        
	CurrentUser user = CURRENT_USER.get();        
	if (user == null || user.authenticatedUser == null) {            
		throw new IllegalStateException("No user logged into the system");        
	} else {           
	 return user.authenticatedUser;        
	}    
   }

So there is no user included to event?

Br, margusja

10 REPLIES 10
Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Contributor

Falcon integration with Atlas is supported in Falcon .90 and higher.

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star

The same problem with falcon-0.9

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Contributor

@Margus Roo

Is Kerberos enabled for your cluster?

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star

No there is no kerberos

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

@Margus Roo: I worked on https://issues.apache.org/jira/browse/ATLAS-835 recently and I didn't see this issue. You will have to wait for APache Falcon 0.10 release or you can try using the latest trunk. Thanks!

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star

@Sowmya Ramesh Downloaded 0.11 and compiled.

Used default config. Only added org.apache.falcon.atlas.service.AtlasService as documentation showed.

*.application.services=org.apache.falcon.security.AuthenticationInitializationService,\
                        org.apache.falcon.workflow.WorkflowJobEndNotificationService, \
                        org.apache.falcon.service.ProcessSubscriberService,\
                        org.apache.falcon.extensions.ExtensionService,\
                        org.apache.falcon.service.LifecyclePolicyMap,\
                        org.apache.falcon.entity.store.ConfigurationStore,\
                        org.apache.falcon.rerun.service.RetryService,\
                        org.apache.falcon.rerun.service.LateRunService,\
                        org.apache.falcon.metadata.MetadataMappingService,\
                        org.apache.falcon.service.LogCleanupService,\
                        org.apache.falcon.service.GroupsService,\
                        org.apache.falcon.service.ProxyUserService,\
                        org.apache.falcon.atlas.service.AtlasService

Started falcon

                               Falcon Server (STARTUP)
	vc.source.url:	scm:git:https://git-wip-us.apache.org/repos/asf/falcon.git/falcon-webapp
	project.version:	0.11-SNAPSHOT
	build.epoch:	1466572190357
	build.user:	root
	vc.revision:	aaf33261f32ba87d95c268e09a593f9ebae1f46b
	domain:	all
	build.version:	0.11-SNAPSHOT-raaf33261f32ba87d95c268e09a593f9ebae1f46b
...

2016-06-22 09:12:59,556 DEBUG - [main:] ~ application.services=org.apache.falcon.security.AuthenticationInitializationService,org.apache.falcon.workflow.WorkflowJobEndNotificationService, org.apache.falcon.service.ProcessSubscriberService,org.apache.falcon.extensions.ExtensionService,org.apache.falcon.service.LifecyclePolicyMap,org.apache.falcon.entity.store.ConfigurationStore,org.apache.falcon.rerun.service.RetryService,org.apache.falcon.rerun.service.LateRunService,org.apache.falcon.metadata.MetadataMappingService,org.apache.falcon.service.LogCleanupService,org.apache.falcon.service.GroupsService,org.apache.falcon.service.ProxyUserService,org.apache.falcon.atlas.service.AtlasService (ApplicationProperties:162)
2016-06-22 09:12:59,556 DEBUG - [main:] ~ configstore.listeners=org.apache.falcon.entity.v0.EntityGraph,org.apache.falcon.entity.ColoClusterRelation,org.apache.falcon.group.FeedGroupMap,org.apache.falcon.entity.store.FeedLocationStore,org.apache.falcon.service.FeedSLAMonitoringService,org.apache.falcon.service.SharedLibraryHostingService (ApplicationProperties:162)
...

2016-06-22 09:13:12,749 INFO  - [main:] ~ Initializing service: org.apache.falcon.atlas.service.AtlasService (ServiceInitializer:45)
2016-06-22 09:13:12,753 INFO  - [main:] ~ Loading atlas-application.properties from file:/usr/local/apache-atlas-0.7-incubating-SNAPSHOT/conf/atlas-application.properties (ApplicationProperties:72)
2016-06-22 09:13:12,928 INFO  - [main:] ~ Created Atlas Hook (AtlasHook:63)
2016-06-22 09:13:12,930 INFO  - [main:] ~ Created Atlas Hook for Falcon (FalconHook:125)
2016-06-22 09:13:12,930 INFO  - [main:] ~ Service initialized: org.apache.falcon.atlas.service.AtlasService (ServiceInitializer:52)
2016-06-22 09:13:12,931 INFO  - [main:] ~ FalconAuditFilter initialization started (FalconAuditFilter:49)
2016-06-22 09:13:12,932 INFO  - [main:] ~ FalconAuthenticationFilter initialization started (FalconAuthenticationFilter:83)
2016-06-22 09:13:13,524 INFO  - [main:] ~ Started SslSocketConnector@0.0.0.0:15443 (log:67)
Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star
2016-06-22 09:17:31,839 DEBUG - [1490339288@qtp-1168420930-3 - a4e69af2-fd19-4f5b-b3f6-ce081e1e552b:] ~ Audit: falcon/127.0.0.1 performed request https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at time 2016-06-22T06:17Z (FalconAuditFilter:86)
2016-06-22 09:17:31,839 INFO  - [1490339288@qtp-1168420930-3 - a4e69af2-fd19-4f5b-b3f6-ce081e1e552b:] ~ Audit: falcon@127.0.0.1 performed https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)
2016-06-22 09:17:31,839 INFO  - [1490339288@qtp-1168420930-3 - a4e69af2-fd19-4f5b-b3f6-ce081e1e552b:] ~ Audit: falcon@127.0.0.1 performed https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)
2016-06-22 09:17:31,844 DEBUG - [1490339288@qtp-1168420930-3 - b1ee4b25-7387-4683-8e64-4ba090ce04bc:] ~ Audit: falcon/127.0.0.1 performed request https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at time 2016-06-22T06:17Z (FalconAuditFilter:86)
2016-06-22 09:17:31,844 INFO  - [1490339288@qtp-1168420930-3 - b1ee4b25-7387-4683-8e64-4ba090ce04bc:] ~ Audit: falcon@127.0.0.1 performed https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)
2016-06-22 09:17:31,844 INFO  - [1490339288@qtp-1168420930-3 - b1ee4b25-7387-4683-8e64-4ba090ce04bc:] ~ Audit: falcon@127.0.0.1 performed https://localhost:15443/api/options?user.name=falcon (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)
2016-06-22 09:17:32,244 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ Logging in falcon (CurrentUser:65)
2016-06-22 09:17:32,244 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ Request from authenticated user: falcon, URL=/api/entities/submit/process, doAs user: null (FalconAuthenticationFilter:185)
2016-06-22 09:17:32,249 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ Parsed Entity: demo-process3 (EntityParser:94)
...
2016-06-22 09:17:32,299 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ Adding process entity to Atlas: demo-process3 (AtlasService:103)
2016-06-22 09:17:32,317 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ PROCESS/demo-process3 is published into config store (AUDIT:264)
2016-06-22 09:17:32,318 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ Submit successful: (PROCESS): demo-process3 (AbstractEntityManager:711)
2016-06-22 09:17:32,318 INFO  - [Atlas Logger 1:] ~ Entered Atlas hook for Falcon hook operation ADD_PROCESS (FalconHook:148)
2016-06-22 09:17:32,318 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:falcon:POST//entities/submit/process] ~ {Action:submit, Dimensions:{colo=NULL, entityType=process}, Status: SUCCEEDED, Time-taken:73281076 ns} (METRIC:38)
2016-06-22 09:17:32,319 INFO  - [Atlas Logger 1:] ~ Atlas hook failed (FalconHook:140)
java.lang.IllegalStateException: No user logged into the system
	at org.apache.falcon.security.CurrentUser.getAuthenticatedUser(CurrentUser.java:150)
	at org.apache.atlas.falcon.hook.FalconHook.getAuthenticatedUser(FalconHook.java:156)
	at org.apache.atlas.falcon.hook.FalconHook.fireAndForget(FalconHook.java:150)
	at org.apache.atlas.falcon.hook.FalconHook.access$200(FalconHook.java:63)
	at org.apache.atlas.falcon.hook.FalconHook$2.run(FalconHook.java:138)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2016-06-22 09:17:32,319 DEBUG - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:] ~ Audit: falcon/127.0.0.1 performed request <a href="https://localhost:15443/api/entities/submit/process">https://localhost:15443/api/entities/submit/process</a> (127.0.0.1) at time 2016-06-22T06:17Z (FalconAuditFilter:86)
2016-06-22 09:17:32,319 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:] ~ Audit: falcon@127.0.0.1 performed <a href="https://localhost:15443/api/entities/submit/process">https://localhost:15443/api/entities/submit/process</a> (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)
2016-06-22 09:17:32,319 INFO  - [681378166@qtp-1168420930-5 - fe139df7-b8c2-4814-9e0e-df61d9115f84:] ~ Audit: falcon@127.0.0.1 performed <a href="https://localhost:15443/api/entities/submit/process">https://localhost:15443/api/entities/submit/process</a> (127.0.0.1) at 2016-06-22T06:17Z (AUDIT:48)

And above is log after I submited process

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Contributor

@Sowmya Ramesh, @Margus Roo

It looks like the CURRENT_USER object is thread local. I know that the Hive hook will run in a separate thread by design, perhaps there's an issue there? Perhaps it's a problem because Kerberos is not on? I'd venture that most use-cases for Atlas involve kerberized clusters...

That said, I'm not familiar with the code details, so I could be reaching here.

Highlighted

Re: atlas falcon hook - Atlas hook failed (FalconHook:140) java.lang.IllegalStateException: No user logged into the system

Rising Star

Can someone confirm that atlas falcon hook is working without kerberos?

Don't have an account?
Coming from Hortonworks? Activate your account here