Sometimes you get the following error message when importing configuration:
You might want to do a complete reimport?
No imported configuration exists
A bug was encountered in /monitor/op5/nacoma/index.php Please contact OP5 Support regarding this matter. There was a SQL error The debug information in /tmp/nacoma-stacktraces/... will be essential to troubleshooting the problem, so please include it if you file a bug report or contact op5 Support.
If the stacktrace file contains something like:
There was a SQL error
SQLSTATE[HY000]: General error: 1364 Field 'alias' doesn't have a default value
You probably have sql_mode set to "STRICT_TRANS_TABLES" in the Mysql/Mariadb configuration. Verify by checking your /etc/my.cnf or using the mysql cli:
# grep sql_mode /etc/my.cnf
# mysql -e "show variables like 'sql_mode'"
By default this setting isn't set:
# mysql -e "show variables like 'sql_mode'"
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_mode | |
+---------------+-------+
Due to database design we don't support the use of "STRICT_TRANS_TABLES", so you need to remove this setting in /etc/my.cnf and restart mysql/mariadb afterwards:
# systemctl restart mariadb # EL7
# service mysqld restart # EL6
If you can't find the stacktrace in EL7 you can easily find it by issuing this command:
# find /tmp -type d -name "nacoma-stacktraces"
-
Tags:
- 1364
- Field 'alias' doesn't have a default value
- A bug was encountered in /monitor/op5/nacoma/index.php
- SQLSTATE[HY000]
- Nacoma
- stacktrace
- sql_mode
- STRICT_TRANS_TABLES
Comments
0 comments
Please sign in to leave a comment.