Thanks to visit codestin.com
Credit goes to github.com

Skip to content

在k8s中启动报错 #17

@liyongzhezz

Description

@liyongzhezz

kubectl create -f hack/kubernetes
执行上边的命令创建项目后,infra-wayne这个pod启动失败并有如下错误:

[ORM]2018/11/20 10:58:03 unsupport orm tag int
[ORM]2018/11/20 10:58:03 unsupport orm tag bool
[ORM]2018/11/20 10:58:03 unsupport orm tag int
[ORM]2018/11/20 10:58:03 unsupport orm tag bool
[ORM]2018/11/20 10:58:03 register db Ping default, invalid DSN: did you forget to escape a param value?
panic: register db Ping default, invalid DSN: did you forget to escape a param value?

goroutine 1 [running]:
github.com/Qihoo360/wayne/src/backend/initial.InitDb()
/go/src/github.com/Qihoo360/wayne/src/backend/initial/db.go:25 +0x161
github.com/Qihoo360/wayne/src/backend/cmd/apiserver.run(0x1e43880, 0x1e704a0, 0x0, 0x0)
/go/src/github.com/Qihoo360/wayne/src/backend/cmd/apiserver/apiserver.go:23 +0x26
github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra.(*Command).execute(0x1e43880, 0x1e704a0, 0x0, 0x0, 0x1e43880, 0x1e704a0)
/go/src/github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1e433c0, 0x0, 0x1e43620, 0x1e43ae0)
/go/src/github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra/command.go:852 +0x30a
github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra.(*Command).Execute(0x1e433c0, 0xc4206c9f78, 0xc4200a4058)
/go/src/github.com/Qihoo360/wayne/src/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
/go/src/github.com/Qihoo360/wayne/src/backend/main.go:12 +0x53

configmap配置如下:

kind: ConfigMap
metadata:
  labels:
    app: infra-wayne
  name: infra-wayne
  namespace: default
data:
  app.conf: |-
    appname = wayne
    httpport = 8080
    runmode = prod
    autorender = false
    copyrequestbody = true
    StaticDir = public:static
    EnableDocs = true
    EnableAdmin = true
    DBName = wayne
    DBTns = tcp(10.10.99.225:3306)
    DBUser = root
    DBPasswd = root

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions