docker-orange icon indicating copy to clipboard operation
docker-orange copied to clipboard

尝试使用镜像在kubernetes里部署在控制面板上插件报错failed to enable plugin

Open WilliamThh opened this issue 6 years ago • 3 comments

查看日志 2018/05/03 11:21:28 [error] 40#40: *5 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: mysql could not be resolved (3: Host not found): nil nil, context: ngx.timer 2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:386: init_selectors_of_plugin(): the size of selectors from storage is 0 when initializing plugin[divide] local selectors, context: ngx.timer 2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:521: load data of plugin[divide] success, context: ngx.timer 2018/05/03 11:21:28 [error] 40#40: *5 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: mysql could not be resolved (3: Host not found): nil nil, context: ngx.timer 2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:511: load data of plugin[kvstore] success, context: ngx.timer 请问这个是什么原因呢? 容器运行日志是没问题的

Check database connection Connection closed by foreign host. Connected Database connected [INFO] Orange: 0.6.4 [INFO] ngx_lua: 10008 [INFO] nginx: 1011002 [INFO] Lua: LuaJIT 2.1.0-beta2 [INFO] Orange store operation start: [INFO] args: [INFO] store_type:mysql [INFO] port:3306 [INFO] host:10.97.167.48 [INFO] operation:init [INFO] pwd:123456 [INFO] user:root [INFO] db:orange [INFO] file:/usr/local/orange/install/orange-v0.6.4.sql [INFO] args end. [INFO] Store init finished.

WilliamThh avatar May 03 '18 11:05 WilliamThh

请问,一定要另外部署一个数据库吗?可不可以用不是部署在容器的数据库

WilliamThh avatar May 04 '18 06:05 WilliamThh

今天我在 win10 下跑就遇到这个问题,目前 ORANGE_HOST 是赋值 ip 才能正常跑。

容器网络,主机名找不到,这里有解决方法,可尝试用 NAT ,但我 win10 开不了。

https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-networking

aabbcoder avatar May 04 '18 10:05 aabbcoder

IP 的主要原因是 Nginx 有自己的一套 DNS Resolver,K8S 的支持我会找时间加上去。

syhily avatar Aug 12 '18 21:08 syhily