1

I have installed an ARA portal to watch the Ansible playbook executed status. But, I always got an error as below said from ARA portal:

sqlalchemy.exc.OperationalError OperationalError: (pymysql.err.OperationalError) (2006, "MySQL server has gone away (error(32, 'Broken pipe'))") [SQL: u'SELECT files.id AS files_id, files.playbook_id AS files_playbook_id, files.path AS files_path, files.content_id AS files_content_id, files.is_playbook AS files_is_playbook \nFROM files \nWHERE files.id = %(param_1)s'] [parameters: {u'param_1': u'9e533f28-1780-49ac-99d8-306040567d9b'}] (Background on this error at: http://sqlalche.me/e/e3q8)

I ensure my ARA installation was following the below link:

https://ara.readthedocs.io/en/latest/installation.html

My setting showing in below:

OS: Ubuntu 16.04

Python: 3.5, and also tried using Python 2.7, but both error.

MySQL: 5.7.23 ( All dbs and tables use the utf8mb4 )

pymysql: 0.9.2, and also tried using 0.7.1 version, but both error.

sqlalchemy: 1.2.11

I used below command to start ARA portal:

export ARA_DATABASE="mysql+pymysql://ara:password@localhost/ara?charset=utf8mb4"

ara-manage runserver -h <server_ip> -p 9191 -d

I have confirmed my ARA and connection to MySQL, and MySQL 'ara' database keep Ansible playbook executed logs.

Could anyone help me?

Cain Chen
  • 33
  • 1
  • 4
  • [Gone Away](https://dev.mysql.com/doc/refman/5.7/en/gone-away.html) cases can have various cases however [max_allowed_packet size](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet) is a common cause. – danblack Sep 07 '18 at 03:58
  • I tried tweaking the settings but could not find a solution. did you? – phiphi Sep 20 '18 at 17:22

2 Answers2

0

I've found that the newer versions of ara (~0.16.1) are not entirely compatible with MySQL. In addition to modifying max_allowed_packet_size as suggested in the comments, installing ara version 0.14.6 has worked for me.

pip install ara==0.14.6

Here's some more context on ara and MySQL compatibility

Ryan Johnson
  • 1
  • 1
  • 1
0

I'm the author of ARA and just came across this question.

The support for MySQL has been vastly improved in the rewrite that happened for the ARA 1.0 release and it is actually integration tested now.

There is currently no sql migrations for a database to be upgraded from 0.x to 1.x due in large part to the re-write of the backend so you would need to start with a fresh database.

I would definitely appreciate if you could test it and let me know if it is better now. If you find any issues or improvement opportunities, feel free to open an issue on GitHub: https://github.com/ansible-community/ara/issues

Thanks !