apache / shardingsphere-elasticjob-ui

Administrator console of ElasticJob
https://shardingsphere.apache.org/
Apache License 2.0
162 stars 96 forks source link

server start success,but login error,caused by NullPointerException #159

Closed PerseveranceForever closed 2 years ago

PerseveranceForever commented 2 years ago

latest commit : b887fad0da852d2a845d2bf7ab7a9644fcc52a54

[ERROR] 16:02:21.128 [http-nio-8088-exec-8] o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception java.lang.NullPointerException: null at org.apache.shardingsphere.elasticjob.lite.ui.security.UserAuthenticationService.checkUser(UserAuthenticationService.java:65) at org.apache.shardingsphere.elasticjob.lite.ui.security.AuthenticationFilter.handleLogin(AuthenticationFilter.java:76) at org.apache.shardingsphere.elasticjob.lite.ui.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

image

TeslaCN commented 2 years ago

Hi @PerseveranceForever The role guest has been removed.

TeslaCN commented 2 years ago

Hi @PerseveranceForever I could not reproduce this issue. I tried input wrong user or password and got 403. image

yequanzhuo commented 2 years ago

I have the same problem,My operation steps are as follows:

  1. git clone https://github.com/apache/shardingsphere-elasticjob-ui.git
  2. cd shardingsphere-elasticjob-ui/
  3. mvn clean install -Prelease -DskipTests
  4. cp apache-shardingsphere-elasticjob-3.1.0-SNAPSHOT-lite-ui-bin.tar.gz /opt/apache-shardingsphere-elasticjob-3.1.0-SNAPSHOT-lite-ui-bin.tar.gz
  5. cd /opt/
  6. tar -zxf apache-shardingsphere-elasticjob-3.1.0-SNAPSHOT-lite-ui-bin.tar.gz
  7. cd apache-shardingsphere-elasticjob-3.1.0-SNAPSHOT-lite-ui-bin/bin/
  8. ./start.sh

server start success,but login error(Neither user can login ,root | guest) image

log content: java.lang.NullPointerException: null at org.apache.shardingsphere.elasticjob.lite.ui.security.UserAuthenticationService.checkUser(UserAuthenticationService.java:65) at org.apache.shardingsphere.elasticjob.lite.ui.security.AuthenticationFilter.handleLogin(AuthenticationFilter.java:76) at org.apache.shardingsphere.elasticjob.lite.ui.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

envirment: 3.0.1

echo20222022 commented 2 years ago

ui

add the application.properties config:

auth.username=root auth.password=root

and then resatart.

TeslaCN commented 2 years ago

Thank you @echo20222022