Comments (8)
我发现切换到主机管理界面,就会报上面的错,能不能将建表语句修改一下呢?
将
CREATE TABLE cc_UserCustom
(
UserName
varchar(16) NOT NULL default '',
DefaultApplication
int(11) NOT NULL default '0',
DefaultColumn
text NOT NULL default '',
DefaultPageSize
int(2) NOT NULL default '20',
DefaultField
varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon
text NOT NULL default '' COMMENT '主机查询条件', #这里的错误
Description
varchar(256) NOT NULL default '',
SetGseCol
int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
改为:
CREATE TABLE cc_UserCustom
(
UserName
varchar(16) NOT NULL default '',
DefaultApplication
int(11) NOT NULL default '0',
DefaultColumn
text NOT NULL default '',
DefaultPageSize
int(2) NOT NULL default '20',
DefaultField
varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon
varchar(512) NOT NULL default '' COMMENT '主机查询条件', #改成这样?
Description
varchar(256) NOT NULL default '',
SetGseCol
int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
@lowenitt
from bk-cmdb.
@lowenitt 我将上面表结构改为了如下:
DROP TABLE IF EXISTS cc_UserCustom
;
CREATE TABLE cc_UserCustom
(
UserName
varchar(16) NOT NULL default '',
DefaultApplication
int(11) NOT NULL default '0',
DefaultColumn
varchar(512) NOT NULL default '', #原来是text
DefaultPageSize
int(2) NOT NULL default '20',
DefaultField
varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon
varchar(512) NOT NULL default '' COMMENT '主机查询条件', #原来是text
Description
varchar(256) NOT NULL default '',
SetGseCol
int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
重新创建此表,点击“主机管理”页面,log中不会出现第一次描述中的那种错误了,不知道我这种修改,会不会影响后续平台的使用?
但是无法添加新用户的情况依然存在。
from bk-cmdb.
嗯,明白你的意思了,你可以把字段长度设置长一点,比如1024 ,然后发起pull request ,我们鼓励大家和我们一起改进系统和代码
from bk-cmdb.
@lowenitt 那么,想问一下, 无法添加用户的情况,如何解决呢?
from bk-cmdb.
请更新下代码,如果输入有错误,会提示的
from bk-cmdb.
@lowenitt 我是这样更新的代码,不知道符合要求不:
重新clone 代码,使用新的代码,没有重新导入数据(bk-cmdb.sql),没有重新执行初始化数据
(php index.php /cli/Init/initUserData )然后重启nginx和php,重新添加用户:
点击“新增”按钮,页面没响应。
也已经将index.php 中改为了 ini_set('display_errors', 1);
没有看到错误日志,日志中内容如下:
INFO - 2016-12-29 10:45:31 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:45:31 --> Encryption Class Initialized
INFO - 2016-12-29 10:45:31 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:45:31 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:45:31 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:45:31 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:45:31 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:45:31 --> Final output sent to browser
DEBUG - 2016-12-29 10:45:31 --> Total execution time: 0.2387
INFO - 2016-12-29 10:54:08 --> Config Class Initialized
INFO - 2016-12-29 10:54:08 --> Hooks Class Initialized
DEBUG - 2016-12-29 10:54:08 --> UTF-8 Support Enabled
INFO - 2016-12-29 10:54:08 --> Utf8 Class Initialized
INFO - 2016-12-29 10:54:08 --> URI Class Initialized
INFO - 2016-12-29 10:54:08 --> Router Class Initialized
INFO - 2016-12-29 10:54:08 --> Output Class Initialized
INFO - 2016-12-29 10:54:08 --> Security Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-12-29 10:54:08 --> Input Class Initialized
INFO - 2016-12-29 10:54:08 --> Language Class Initialized
INFO - 2016-12-29 10:54:08 --> Loader Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Config file loaded: /data/htdocs/cc_openSource/application/config/errorcode.php
INFO - 2016-12-29 10:54:08 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-12-29 10:54:08 --> Session class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Session class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:08 --> Controller Class Initialized
INFO - 2016-12-29 10:54:08 --> Parser Class Initialized
INFO - 2016-12-29 10:54:08 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2016-12-29 10:54:08 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:54:08 --> Encryption Class Initialized
INFO - 2016-12-29 10:54:08 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:08 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:54:08 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:54:08 --> Final output sent to browser
DEBUG - 2016-12-29 10:54:08 --> Total execution time: 0.1178
INFO - 2016-12-29 10:54:10 --> Config Class Initialized
INFO - 2016-12-29 10:54:10 --> Hooks Class Initialized
DEBUG - 2016-12-29 10:54:10 --> UTF-8 Support Enabled
INFO - 2016-12-29 10:54:10 --> Utf8 Class Initialized
INFO - 2016-12-29 10:54:10 --> URI Class Initialized
INFO - 2016-12-29 10:54:10 --> Router Class Initialized
INFO - 2016-12-29 10:54:10 --> Output Class Initialized
INFO - 2016-12-29 10:54:10 --> Security Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-12-29 10:54:10 --> Input Class Initialized
INFO - 2016-12-29 10:54:10 --> Language Class Initialized
INFO - 2016-12-29 10:54:10 --> Loader Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Config file loaded: /data/htdocs/cc_openSource/application/config/errorcode.php
INFO - 2016-12-29 10:54:10 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-12-29 10:54:10 --> Session class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Session class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:10 --> Controller Class Initialized
INFO - 2016-12-29 10:54:10 --> Parser Class Initialized
INFO - 2016-12-29 10:54:10 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2016-12-29 10:54:10 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:54:10 --> Encryption Class Initialized
INFO - 2016-12-29 10:54:10 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:10 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:54:10 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:54:10 --> Final output sent to browser
DEBUG - 2016-12-29 10:54:10 --> Total execution time: 0.1170
from bk-cmdb.
描述:
点击“用户管理”页面,然后点击“新增用户”,填写好用户信息后,点击新增无报错无反应,也无法成功添加用户。
日志如下:
INFO - 2017-02-10 14:42:58 --> Config Class Initialized
INFO - 2017-02-10 14:42:58 --> Hooks Class Initialized
DEBUG - 2017-02-10 14:42:58 --> UTF-8 Support Enabled
INFO - 2017-02-10 14:42:58 --> Utf8 Class Initialized
INFO - 2017-02-10 14:42:58 --> URI Class Initialized
INFO - 2017-02-10 14:42:58 --> Router Class Initialized
INFO - 2017-02-10 14:42:58 --> Output Class Initialized
INFO - 2017-02-10 14:42:58 --> Security Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Global POST, GET and COOKIE data sanitized
INFO - 2017-02-10 14:42:58 --> Input Class Initialized
INFO - 2017-02-10 14:42:58 --> Language Class Initialized
INFO - 2017-02-10 14:42:58 --> Loader Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Config file loaded: /data/webapp/bk_cmdb/application/config/errorcode.php
INFO - 2017-02-10 14:42:58 --> Session: Class initialized using 'files' driver.
DEBUG - 2017-02-10 14:42:58 --> Session class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Session class already loaded. Second attempt ignored.
INFO - 2017-02-10 14:42:58 --> Controller Class Initialized
INFO - 2017-02-10 14:42:58 --> Parser Class Initialized
INFO - 2017-02-10 14:42:58 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2017-02-10 14:42:58 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2017-02-10 14:42:58 --> Encryption Class Initialized
INFO - 2017-02-10 14:42:58 --> Database Driver Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Encryption class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
INFO - 2017-02-10 14:42:58 --> File loaded: /data/webapp/bk_cmdb/application/views/account/index.php
INFO - 2017-02-10 14:42:58 --> File loaded: /data/webapp/bk_cmdb/application/views/layout.php
INFO - 2017-02-10 14:42:58 --> Final output sent to browser
DEBUG - 2017-02-10 14:42:58 --> Total execution time: 0.0944
from bk-cmdb.
尝试更新下版本吧
from bk-cmdb.
Related Issues (20)
- fix:【CMDB+v3.13.2-feature-layered1】修改模型图标时,页面样式显示不完整 HOT 1
- fix:【CMDB+v3.13.2-feature-layered1】新增模型关联关系后,查看关联关系详情“源模型”“目标模型”没有识别出来,点击删除关联关系后报错 HOT 1
- fix:【CMDB+v3.13.2-feature-layered1】删除关联类型成功后,前端没有提示“删除成功”,建议加个提示
- fix:【CMDB+v3.13.2-feature-layered1】删除模型成功后,前端没有提示“删除成功”,建议加个提示
- fix:【CMDB+v3.13.2-feature-layered1】输入业务快照名称时 鼠标非要失焦后才会校验,导致仍然可以点击保存后二次弹窗取消不了
- fix:【CMDB+v3.13.2-feature-layered1】通用模型下没有“项目”实例
- fix:【CMDB+v3.13.2-feature-layered1】项目 操作没有‘启用/停用’功能 HOT 1
- fix:【CMDB+v3.13.2-feature-layered1】字段组合模板中新建字段唯一标识重复后,建议优化下提示,应该提示“唯一标识重复”
- fix:【CMDB+v3.13.2-feature-layered1】新建主机和集群/模块自定义字段,设置对应默认值后,在对应主机详情和集群节点信息下查看对应的字段直接显示了默认值,应该点击编辑后在显示默认值 HOT 3
- https页面登录超时后,弹出的登录框跨域
- 两台服务器之间通过多个端口相连,端口又通过网线相连,怎么通过关联关系导入到CMDB中呢? HOT 1
- authserver正常启用,登陆跳转后提示get user from bk-login failed
- make ui缺少一些包,需要手工安装 HOT 2
- 蓝鲸cmdb开源版release-v3.13.4 版本编译报错
- 【CMDB+v3.13.5-alpha1】新建集群集群名称输入特殊字符“*.+-*@%$%^&*(”提示集群名称校验不通过,建议直接输入特殊字符时直接校验
- {"result":false,"bk_error_code":1105000,"bk_error_msg":"迁移数据失败, server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [] }","permission":null,"data":null} HOT 1
- ./stop.sh命令不能有效停止所有服务进程
- 能否通过实现 adapter 支持 azure 和 gcp 的云资源同步能力?
- get_biz_brief_cache_topo接口返回的拓扑数据支持国际化
- 测试远程创建issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bk-cmdb.