Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create mysql user #59

Closed
nakamasato opened this issue Nov 7, 2021 · 0 comments · Fixed by #60
Closed

Failed to create mysql user #59

nakamasato opened this issue Nov 7, 2021 · 0 comments · Fixed by #60
Labels
bug Something isn't working

Comments

@nakamasato
Copy link
Owner

2021-11-08T08:06:14.471+0900    ERROR   controller-runtime.manager.controller.mysqluser Failed to connect to MySQL.      {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "mysqlName": "mysql-sample", "error": "driver: bad connection"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
2021-11-08T08:06:14.471+0900    DEBUG   controller-runtime.manager.events       Warning {"object": {"kind":"MySQLUser","namespace":"default","name":"nakamasato","uid":"f59196f1-b06d-43b8-87bc-8bb19b89620c","apiVersion":"mysql.nakamasato.com/v1alpha1","resourceVersion":"422635"}, "reason": "ProcessingError", "message": "driver: bad connection"}
2021-11-08T08:06:14.479+0900    ERROR   controller-runtime.manager.controller.mysqluser Reconciler error        {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "error": "driver: bad connection"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
2021-11-08T08:06:14.479+0900    INFO    controller-runtime.manager.controller.mysqluser Fetch MySQLUser instance. MySQLUser resource found.      {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "name": "nakamasato", "mysqlUser.Namespace": "default"}
2021-11-08T08:06:14.479+0900    INFO    controller-runtime.manager.controller.mysqluser Fetched MySQL instance. {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default"}
[mysql] 2021/11/08 08:06:14 packets.go:37: unexpected EOF
[mysql] 2021/11/08 08:06:14 packets.go:37: unexpected EOF
[mysql] 2021/11/08 08:06:14 packets.go:37: unexpected EOF
2021-11-08T08:06:14.484+0900    ERROR   controller-runtime.manager.controller.mysqluser Failed to connect to MySQL.      {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "mysqlName": "mysql-sample", "error": "driver: bad connection"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
2021-11-08T08:06:14.485+0900    DEBUG   controller-runtime.manager.events       Warning {"object": {"kind":"MySQLUser","namespace":"default","name":"nakamasato","uid":"f59196f1-b06d-43b8-87bc-8bb19b89620c","apiVersion":"mysql.nakamasato.com/v1alpha1","resourceVersion":"422641"}, "reason": "ProcessingError", "message": "driver: bad connection"}
2021-11-08T08:06:14.490+0900    ERROR   controller-runtime.manager.controller.mysqluser Reconciler error        {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "error": "driver: bad connection"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
2021-11-08T08:06:19.604+0900    INFO    controller-runtime.manager.controller.mysqluser Fetch MySQLUser instance. MySQLUser resource found.      {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "name": "nakamasato", "mysqlUser.Namespace": "default"}
2021-11-08T08:06:19.604+0900    INFO    controller-runtime.manager.controller.mysqluser Fetched MySQL instance. {"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default"}
2021-11-08T08:06:19.719+0900    INFO    controller-runtime.manager.controller.mysqluser Create MySQL user if not.{"reconciler group": "mysql.nakamasato.com", "reconciler kind": "MySQLUser", "name": "nakamasato", "namespace": "default", "name": "nakamasato", "mysqlUser.Namespace": "default"}
2021-11-08T08:06:19.719+0900    DPANIC  mysql   odd number of arguments passed as key-value pairs for logging   {"ignored key": "CREATE USER IF NOT EXISTS 'nakamasato'@'%' IDENTIFIED BY 'JZcU0IR0rPczttfw';"}
github.com/nakamasato/mysql-operator/internal/mysql.mysqlClient.Exec
        /Users/masato-naka/repos/nakamasato/mysql-operator/internal/mysql/mysql.go:60
github.com/nakamasato/mysql-operator/controllers.(*MySQLUserReconciler).Reconcile
        /Users/masato-naka/repos/nakamasato/mysql-operator/controllers/mysqluser_controller.go:162
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
panic: odd number of arguments passed as key-value pairs for logging

goroutine 303 [running]:
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000210cc0, {0xc000b9a780, 0x1, 0x1})
        /Users/masato-naka/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:234 +0x499
go.uber.org/zap.(*Logger).DPanic(0x22930f8, {0x22e19b0, 0x2069440}, {0xc000b9a780, 0x1, 0x1})
        /Users/masato-naka/go/pkg/mod/go.uber.org/[email protected]/logger.go:217 +0x59
github.com/go-logr/zapr.handleFields(0xc000695450, {0xc000144710, 0x1, 0x17}, {0xc000b9a700, 0x1, 0x100e394})
        /Users/masato-naka/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:100 +0x535
github.com/go-logr/zapr.(*zapLogger).Error(0xc0001446a0, {0x2479580, 0xc0001446e0}, {0x22a0955, 0x4c}, {0xc000144710, 0x1, 0x1})
        /Users/masato-naka/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:133 +0x1eb
github.com/nakamasato/mysql-operator/internal/mysql.mysqlClient.Exec({0x6}, {0xc000942690, 0x4c}, {0x0, 0x0, 0x0})
        /Users/masato-naka/repos/nakamasato/mysql-operator/internal/mysql/mysql.go:60 +0x175
github.com/nakamasato/mysql-operator/controllers.(*MySQLUserReconciler).Reconcile(0xc00010e8a0, {0x24a4838, 0xc00090f320}, {{{0xc00099e3f9, 0x7}, {0xc00099e3e0, 0xa}}})
        /Users/masato-naka/repos/nakamasato/mysql-operator/controllers/mysqluser_controller.go:162 +0xd99
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0001f7680, {0x24a4790, 0xc0006269c0}, {0x212e620, 0xc000344ea0})
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298 +0x303
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0001f7680, {0x24a4790, 0xc0006269c0})
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253 +0x205
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
        /Users/masato-naka/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:210 +0x354
exit status 2
make: *** [run] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant