shuther opened a new issue, #2946:
URL: https://github.com/apache/apisix-dashboard/issues/2946

   ### Issue description
   
   using docker compose to run apisix dashboard (latest). Likely there is an 
error in the yaml file but it should not panic?
   Apisix (part also of the docker compose works fine)
   
   ### Expected behavior
   
   a different error message
   
   ### How to Reproduce
   
   1. docker compose up
   2. see the logs(panic when it starts)
   
   ### Screenshots
   
   ```
   apisix-dashboard  | panic: runtime error: invalid memory address or nil 
pointer dereference
   apisix-dashboard  | [signal SIGSEGV: segmentation violation code=0x1 
addr=0x0 pc=0xca1ef3]
   apisix-dashboard  |
   apisix-dashboard  | goroutine 1 [running]:
   apisix-dashboard  | 
github.com/apisix/manager-api/internal/core/storage.InitETCDClient(0xc0004cfc80?)
   apisix-dashboard  |  
/usr/local/apisix-dashboard/api/internal/core/storage/etcd.go:59 +0x53
   apisix-dashboard  | 
github.com/apisix/manager-api/internal/core/server.(*server).setupStore(0x60?)
   apisix-dashboard  |  
/usr/local/apisix-dashboard/api/internal/core/server/store.go:27 +0x25
   apisix-dashboard  | 
github.com/apisix/manager-api/internal/core/server.(*server).init(0xc000056401?)
   apisix-dashboard  |  
/usr/local/apisix-dashboard/api/internal/core/server/server.go:89 +0x52
   apisix-dashboard  | 
github.com/apisix/manager-api/internal/core/server.(*server).Start(0xc0004bbc20,
 0xc000515c80)
   apisix-dashboard  |  
/usr/local/apisix-dashboard/api/internal/core/server/server.go:49 +0x27
   apisix-dashboard  | github.com/apisix/manager-api/cmd.manageAPI()
   apisix-dashboard  |  /usr/local/apisix-dashboard/api/cmd/root.go:71 +0x91
   apisix-dashboard  | 
github.com/apisix/manager-api/cmd.glob..func1(0x17b3960?, {0xf8045b?, 0x0?, 
0x0?})
   apisix-dashboard  |  /usr/local/apisix-dashboard/api/cmd/root.go:40 +0x17
   apisix-dashboard  | github.com/spf13/cobra.(*Command).execute(0x17b3960, 
{0xc000034240, 0x0, 0x0})
   apisix-dashboard  |  
/go/pkg/mod/github.com/spf13/[email protected]/command.go:916 +0x862
   apisix-dashboard  | github.com/spf13/cobra.(*Command).ExecuteC(0x17b3960)
   apisix-dashboard  |  
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
   apisix-dashboard  | github.com/spf13/cobra.(*Command).Execute(...)
   apisix-dashboard  |  /go/pkg/mod/github.com/spf13/[email protected]/command.go:968
   apisix-dashboard  | github.com/apisix/manager-api/cmd.Execute()
   apisix-dashboard  |  /usr/local/apisix-dashboard/api/cmd/root.go:55 +0x25
   apisix-dashboard  | main.main()
   apisix-dashboard  |  /usr/local/apisix-dashboard/api/main.go:24 +0x17
   ```
   
   ### Environment
   
   latest docker version
   on ubuntu
   
   ### Additional context
   
   extract docker compose .yaml
    
   ```
    apisix-dash:
       image: apache/apisix-dashboard
       depends_on:
         - apisix
         - etcd
       container_name: apisix-dashboard
       ports:
         - "9721:9000/tcp"
       volumes:
   #      - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
   #      - 
../all-in-one/apisix-dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
         - 
./apisix_conf/apisix-dashboard.yml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
       networks:
         apisix:
   ```
   
   conf file:
   ```
   conf:
     listen:
       host: 0.0.0.0     # `manager api` listening ip or host name
       port: 9000          # `manager api` listening port
   
     etcd:
       host:                           # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
         - "http://etcd:2379";          # multiple etcd address
       prefix: "/apisix"               # apisix configurations prefix
       timeout: 30                     # 30 seconds
   
                           # etcd basic auth info
       # username: "root"    # ignore etcd username if not enable etcd auth
       # password: "123456"  # ignore etcd password if not enable etcd auth
     log:
       error_log:
         level: warn       # supports levels, lower to higher: debug, info, 
warn, error, panic, fatal
         file_path:
           logs/error.log  # supports relative path, absolute path, standard 
output
                           # such as: logs/error.log, /tmp/logs/error.log, 
/dev/stdout, /dev/stderr
   authentication:
     secret:
       secret              # secret for jwt token generation.
                           # NOTE: Highly recommended to modify this value to 
protect `manager api`.
                           # if it's default value, when `manager api` start, 
it will generate a random string to replace it.
     expire_time: 3600     # jwt token expire time, in second
     users:
       - username: admin   # username and password for login `manager api`
         password: admin
       - username: user
         password: user
   
   plugin_attr:
     prometheus:
       export_addr:
         ip: "0.0.0.0"
         port: 9091
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to