jinnyu opened a new issue #2409:
URL: https://github.com/apache/apisix-dashboard/issues/2409
### Issue description
Config a upstream
Upstream type : node
Hostname : somehost.com
when submit form, apisix backend will return 500.
```shell
binary-apisix-dashboard-1 | err; interface conversion: interface {} is
map[string]interface {}, not []*entity.Node
binary-apisix-dashboard-1 | [Recovery] 2022/04/02 - 08:54:13 panic
recovered:
binary-apisix-dashboard-1 |
binary-apisix-dashboard-1 | interface conversion: interface {} is
map[string]interface {}, not []*entity.Node
binary-apisix-dashboard-1 | /usr/local/go/src/runtime/iface.go:261
(0x40a5d4)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/core/store/validate.go:169 (0xbe328d)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/core/store/validate.go:226 (0xbe34b2)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/core/store/validate.go:253 (0xbe3609)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/core/store/store.go:249 (0xbdfa4a)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/core/store/store.go:315 (0xbe0204)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/handler/upstream/upstream.go:202
(0xc93b61)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware.go:18
(0x84ffab)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/base.go:16
(0xbedef4)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/traffic_log.go:73
(0xbedef5)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/base.go:16
(0xbebf8d)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/http_input.go:77
(0xbebf8e)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/base.go:16
(0xbed962)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/http_resp_reshap.go:19
(0xbed956)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/base.go:16
(0xbeec4e)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/handler/handler.go:81 (0xbeec42)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/base.go:16
(0xbebb61)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/middleware/http_injector.go:28
(0xbebb62)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/[email protected]/pipe.go:84
(0x8502a1)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/shiningrush/droplet/wrapper/[email protected]/gin.go:41
(0xbefd7e)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe923d)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/authentication.go:81 (0xbe8eaa)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe96ca)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/recover.go:53 (0xbe96b4)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbea510)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/schema.go:240 (0xbea3ea)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe670d)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/logging.go:35 (0xbe66f4)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe63f5)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/ip_filter.go:107 (0xbe6346)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe9c76)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/request_id.go:41 (0xbe9c5a)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xbe95f8)
binary-apisix-dashboard-1 |
/usr/local/apisix-dashboard/api/internal/filter/cors.go:31 (0xbe95e4)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0xc9602c)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-contrib/[email protected]/handler.go:60 (0xc96002)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x9c7f04)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409 (0x9c7b39)
binary-apisix-dashboard-1 |
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367 (0x9c7673)
binary-apisix-dashboard-1 | /usr/local/go/src/net/http/server.go:2879
(0x6fe77a)
binary-apisix-dashboard-1 | /usr/local/go/src/net/http/server.go:1930
(0x6f9e27)
binary-apisix-dashboard-1 | /usr/local/go/src/runtime/asm_amd64.s:1581
(0x464ae0)
```
### Expected behavior
can be normal configed.
### How to Reproduce
Config a upstream
```
Upstream type : node
Hostname : somehost.com
```
when submit form, apisix backend will return 500.
### Screenshots

### Environment
- apisix version 2.12.1-centos, running in docker from offical image
- OS (cmd: `uname -a`): running in docker from offical image
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): running in
docker from offical image
- etcd version, if have (cmd: run `etcd --version`): 3.4.18 (binary deylop)
- apisix-dashboard version, if have: 2.11.0, running in docker from offical
image
- Browser version, if have: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
### Additional context
_No response_
--
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]