Caelebs commented on issue #478:
URL: 
https://github.com/apache/apisix-dashboard/issues/478#issuecomment-694095697


   
我重新部署了一下,manager-api的镜像是基于**apisix-dashboard-1.5**这个包里面的/api目录下的Dockerfile构建的,运行起来之后/root/manager-api目录下的conf.json配置看起来应该是正常的
   ```
   {
     "conf": {
       "mysql":{
         "address": "apisix-mysql",
         "user": "root",
         "password": "123456",
         "maxConns": 50,
         "maxIdleConns": 25,
         "maxLifeTime": 10
       },
       "syslog": {
         "host": ""
       },
       "apisix": {
         "base_url": "apisix-gw-lb",
         "api_key": "edd1c9f034335f136f87ad84b625c8f1"
       }
     }
   }
   ```
   启动时的日志输出看起来也没有报错
   ```
   [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in 
production.
   - using env: export GIN_MODE=release
   - using code:        gin.SetMode(gin.ReleaseMode)
   [GIN-debug] GET /ping --> 
github.com/apisix/manager-api/route.healthzHandler.func1 (5 handlers)
   [GIN-debug] POST /apisix/admin/routes --> 
github.com/apisix/manager-api/route.createRoute (5 handlers)
   [GIN-debug] GET /apisix/admin/routes/:rid --> 
github.com/apisix/manager-api/route.findRoute (5 handlers)
   [GIN-debug] GET /apisix/admin/routes --> 
github.com/apisix/manager-api/route.listRoute (5 handlers)
   [GIN-debug] PUT /apisix/admin/routes/:rid --> 
github.com/apisix/manager-api/route.updateRoute (5 handlers)
   ```
   然后dashboard容器内nginx配置文件default.conf里边配置的proxy_pass地址是这样的
   ```
   location /apisix/admin {
           proxy_pass http://apisix-manager-api:8080/apisix/admin;
       }
   ```
   manager-api依赖的MySQL也是可用的,初始化的consumers、routes、ssls、upstreams四张表也创建好了的
   
我理解是apisix-dashboard指向apisix-manager-api:8080,apisix-manager-api指向后端apisix的base_url,不知道这样对不对?
   现在的情况就变成了dashboard登录的时候前台页面提示
   ```
   请求错误,错误码: 404
   发出的请求针对的是不存在的记录,服务器没有进行操作。
   ```
   ```
   10.20.0.0 - - [17/Sep/2020:08:48:32 +0000] "POST /apisix/admin/user/login 
HTTP/1.1" 404 18 
"http://10.10.16.250:30999/user/login?redirect=%2Fapisix%2Fdashboard%2F"; 
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/61.0.3163.79 Safari/537.36 Maxthon/5.2.7.4000" "-"
   ```
   
   我不确定是我的部署方式有问题还是哪儿的配置有问题?
   apisix的版本和dashboard应该是配套的,都是用的1.5
   ```
   sh-4.2# apisix version
   1.5
   ```
   给整懵了
   @bzp2010 @juzhiyuan 
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to