Bug #81826 X Plugin startup error messages
Submitted: 13 Jun 2016 5:18 Modified: 1 Sep 2016 14:14
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Document Store: X Plugin Severity:S2 (Serious)
Version:5.7.12, 5.7.13 OS:Any
Assigned to: CPU Architecture:Any

[13 Jun 2016 5:18] Roel Van de Paar
Description:
mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
Query OK, 0 rows affected (0.02 sec)

Gives no error, but the error log is full of failures;

2016-06-13T04:46:46.649799Z 0 [Note] /sda/mysql-5.7.12-linux-glibc2.5-x86_64/bin/mysqld: ready for connections.
Version: '5.7.12-log'  socket: '/sda/mysql-5.7.12-linux-glibc2.5-x86_64/socket.sock'  port: 19574  MySQL Community Server (GPL)
2016-06-13T04:46:53.878233Z 2 [Note] Plugin mysqlx reported: 'X plugin tcp connection enable at port 33060.'
2016-06-13T04:46:53.878309Z 2 [ERROR] Plugin mysqlx reported: 'Could not bind to port 33060: Address already in use (98)'
2016-06-13T04:46:53.878434Z 2 [Note] Plugin mysqlx reported: 'Scheduler "work" started.'
2016-06-13T04:46:53.878461Z 2 [Note] Plugin mysqlx reported: 'X plugin initialization successes'
2016-06-13T04:46:53.910762Z 0 [Warning] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2016-06-13T04:46:53.910784Z 0 [Note] Plugin mysqlx reported: 'Using YaSSL for TCP connections'
2016-06-13T04:46:53.910794Z 0 [ERROR] Plugin mysqlx reported: 'Tcp socket creation or bind failed'
2016-06-13T04:46:53.910861Z 0 [ERROR] Plugin mysqlx reported: 'Error preparing to accept connections'
2016-06-13T04:46:53.910870Z 0 [ERROR] Plugin mysqlx reported: 'Delayed startup failed. Plugin is unable to accept connections.'

1) 'Address already in use': after some digging this seems to be related to having to set https://dev.mysql.com/doc/refman/5.7/en/x-plugin-system-variables-options.html#option_mysq... - perhaps this could be made more clearer in the error message 
2) 'X plugin initialization successes': is incorrect, because it just failed 3) "Query OK" is incorrect, because it just failed - perhaps loading can fail if the plugin fails to initialize 
4) 'X plugin initialization successes': typo: needs to be "success"
5) [Warning] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"': "Warning" is not the same as "Failed", and both are reported - which one is it? Is it usable without SSL?
6) 'Tcp socket creation or bind failed': doubled up message

perhaps this can all be made more user friendly.

How to repeat:
Start server, execute INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
[13 Jun 2016 5:19] Roel Van de Paar
Perhaps the default x-plugin port could be server port + 1? Would make it a lot easier for users
[13 Jun 2016 5:23] Roel Van de Paar
Using --mysqlx_port[=value], I also still see this;

2016-06-13T05:08:05.858967Z 0 [Warning] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2016-06-13T05:08:05.858983Z 0 [Note] Plugin mysqlx reported: 'Using YaSSL for TCP connections'

It first fails, then it uses it?
[13 Jun 2016 7:36] MySQL Verification Team
Hello Roel,

Thank you for the report.
Observed this with MySQL Server version 5.7.13 and MySQL Shell 1.0.3.

Thanks,
Umesh
[13 Jun 2016 7:36] MySQL Verification Team
-- Start mysqld with 33060 port, try to install mysqlx plugin

[ushastry@localhost Desktop]$ mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.13 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
Query OK, 0 rows affected (0.08 sec)

mysql> \q
Bye

-- Extract from error log

2016-06-13T07:30:43.184820Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.13'  socket: '/var/lib/mysql/mysql.sock'  port: 33060  MySQL Community Server (GPL)
2016-06-13T07:30:54.338143Z 2 [Note] Plugin mysqlx reported: 'X plugin tcp connection enable at port 33060.'
2016-06-13T07:30:54.338474Z 2 [ERROR] Plugin mysqlx reported: 'Could not bind to port 33060: Address already in use (98)'
2016-06-13T07:30:54.338919Z 2 [Note] Plugin mysqlx reported: 'Scheduler "work" started.'
2016-06-13T07:30:54.338980Z 2 [Note] Plugin mysqlx reported: 'X plugin initialization successes'
2016-06-13T07:30:54.367868Z 0 [Note] Plugin mysqlx reported: 'Using YaSSL for TCP connections'
2016-06-13T07:30:54.367932Z 0 [ERROR] Plugin mysqlx reported: 'Tcp socket creation or bind failed'
2016-06-13T07:30:54.367997Z 0 [ERROR] Plugin mysqlx reported: 'Error preparing to accept connections'
2016-06-13T07:30:54.368005Z 0 [ERROR] Plugin mysqlx reported: 'Delayed startup failed. Plugin is unable to accept connections.'
[1 Sep 2016 14:14] David Moss
Posted by developer:
 
Seems to be a cosmetic change, closing without change log entry.