当我尝试登录Kylo时,它会抛出以下错误,
2018-05-03 10:00:10 INFO http-nio-8400-exec-6:JerseyRestClient:219 - Created new Jersey Client without SSL connecting to http://sdo-dbstore2:8400/proxy
2018-05-03 10:00:11 INFO http-nio-8400-exec-6:JerseyRestClient:219 - Created new Jersey Client without SSL connecting to http://sdo-dbstore2:8400/proxy
2018-05-03 10:00:11 ERROR http-nio-8400-exec-6:JerseyRestClient:421 - Failed to process request org.glassfish.jersey.client.JerseyInvocation$Builder@24da432f
javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1002)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
at com.thinkbiganalytics.rest.JerseyRestClient.get(JerseyRestClient.java:415)
at com.thinkbiganalytics.rest.JerseyRestClient.get(JerseyRestClient.java:387)
at com.thinkbiganalytics.auth.rest.KyloRestLoginModule.retrieveUser(KyloRestLoginModule.java:220)
at com.thinkbiganalytics.auth.rest.KyloRestLoginModule.doLogin(KyloRestLoginModule.java:122)
at com.thinkbiganalytics.auth.jaas.AbstractLoginModule.login(AbstractLoginModule.java:84)
我的application.properties未注释部分看起来像,
spring.profiles.active=native,auth-kylo
## auth-file: If this profile is active then these optional properties may be used:
security.auth.file.users=file:///opt/kylo/current/users.properties
security.auth.file.groups=file:///opt/kylo/current/groups.properties
#security.auth.file.password.hash.enabled=false
#security.auth.file.password.hash.algorithm=MD5
#security.auth.file.password.hash.encoding=base64
如何解决此问题?
答案 0 :(得分:1)
请设置此配置并重新启动Kylo
。假设Kylo
安装了/opt/kylo
。
Kylo UI
将auth-file
个人资料添加到spring.profiles
。更新security.auth.file.users
和security.auth.file.groups
属性的值。
文件:/opt/kylo/kylo-ui/conf/application.properties
spring.profiles.active=native,auth-kylo,auth-file
:
:
security.auth.file.users=file:///opt/kylo/users.properties
security.auth.file.groups=file:///opt/kylo/groups.properties
Kylo服务
取消注释security.auth.file.users
和security.auth.file.groups
属性。本节将如下所示:
文件:/opt/kylo/kylo-services/conf/application.properties
spring.profiles.include=native,nifi-v1.2,auth-kylo,auth-file,search-esr,jms-activemq,auth-spark
:
:
security.auth.file.users=file:///opt/kylo/users.properties
security.auth.file.groups=file:///opt/kylo/groups.properties
创建users.properties文件
vi /opt/kylo/users.properties
添加此条目:
dladmin=thinkbig
更改所有权和权限
chown kylo:users /opt/kylo/users.properties
chmod 600 /opt/kylo/users.properties
创建groups.properties文件
vi /opt/kylo/groups.properties
添加以下条目:
dladmin=admin,user
analyst=analyst,user
designer=designer,user
operator=operations,user
更改所有权和权限
chown kylo:users /opt/kylo/groups.properties
chmod 600 /opt/kylo/groups.properties
重新启动Kylo用户界面和服务
/opt/kylo/stop-kylo-apps.sh
/opt/kylo/start-kylo-apps.sh
然后,尝试使用user=dladmin
,password=thinkbig