Sonar Database Upgradation Problem

180 views
Skip to first unread message

Saurabh Agrawal

unread,
May 3, 2016, 1:19:05 AM5/3/16
to SonarQube
I am upgrading sonarqube from 4.5.6 to sonarqube-4.5.7(LTS). But when I import database(MySql) from old ver to new ver then It shows problem

"ERROR 2006 (HY000) at line 195: MySQL server has gone away
Operation failed with exitcode 1"

The problem is to import table "snapshot_sources".

Is anyone tell me the solution?

Julien Lancelot

unread,
May 3, 2016, 2:40:21 AM5/3/16
to Saurabh Agrawal, SonarQube
Hi,

Could ou please send us the whole server log ?

Thanks

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/7a97f07d-9e9a-4f72-8c90-1308f7916e84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Julien LANCELOT | SonarSource

Saurabh Agrawal

unread,
May 3, 2016, 4:14:31 AM5/3/16
to SonarQube, skagraw...@gmail.com
These are the server logs.

13:39:06 [ERR][wb_admin_main.py:shutdown:217]: shutting down admn
13:39:06 [INF][wb_admin_control.py:server_polling_thread:556]: Monitoring thread done.
13:39:09 [INF][wb_admin_control.py:server_polling_thread:540]: Monitoring thread running...
13:39:43 [ERR][wb_admin_control.py:get_config_options:728]: Could not open the file "C:\Program Files\MySQL\mysql-5.7.12-win32\my-default.ini": [Errno 2] No such file or directory: 'C:\\Program Files\\MySQL\\mysql-5.7.12-win32\\my-default.ini'
13:39:43 [INF][wb_admin_control.py:query_server_installation_info:828]: Currently connected to MySQL server version '5.6.28-log', conn status = True, active plugins = ['partition', 'sha256_password', 'INNODB_CMPMEM_RESET', 'INNODB_SYS_FIELDS', 'INNODB_BUFFER_POOL_STATS', 'CSV', 'mysql_native_password', 'INNODB_SYS_TABLES', 'INNODB_FT_BEING_DELETED', 'INNODB_BUFFER_PAGE', 'INNODB_CMP_PER_INDEX_RESET', 'PERFORMANCE_SCHEMA', 'ARCHIVE', 'INNODB_FT_INDEX_CACHE', 'INNODB_CMP', 'INNODB_SYS_FOREIGN_COLS', 'INNODB_FT_CONFIG', 'InnoDB', 'INNODB_FT_DEFAULT_STOPWORD', 'INNODB_TRX', 'binlog', 'INNODB_LOCKS', 'INNODB_CMPMEM', 'INNODB_SYS_DATAFILES', 'INNODB_FT_INDEX_TABLE', 'INNODB_LOCK_WAITS', 'MEMORY', 'INNODB_SYS_TABLESPACES', 'INNODB_METRICS', 'INNODB_SYS_INDEXES', 'MRG_MYISAM', 'INNODB_CMP_PER_INDEX', 'mysql_old_password', 'INNODB_FT_DELETED', 'BLACKHOLE', 'INNODB_SYS_TABLESTATS', 'MyISAM', 'INNODB_SYS_FOREIGN', 'INNODB_CMP_RESET', 'INNODB_SYS_COLUMNS', 'INNODB_BUFFER_PAGE_LRU']
13:39:44 [INF][wb_admin_control.py:acquire_admin_access:284]: Target OS detection returned: os_type=windows, os_name=Windows 7 Enterprise, os_variant=Windows, os_version=Microsoft Windows [Version 6.1.7601]
13:39:44 [INF][wb_log_reader.py:__init__:386]: Will use plain file access to get contents of log file C:\ProgramData\MySQL\MySQL Server 5.6\Data\DO-SAURABH-A109.err
13:39:44 [INF][wb_log_reader.py:__init__:386]: Will use plain file access to get contents of log file C:\ProgramData\MySQL\MySQL Server 5.6\Data\DO-SAURABH-A109-slow.log
13:40:02 [ERR][wb_admin_export.py:process_db:243]: Error from task: ERROR 2006 (HY000) at line 195: MySQL server has gone away

13:40:02 [WRN][wb_admin_export.py:process_db:269]: Task exited with code 1
13:41:53 [ERR][wb_admin_main.py:shutdown:217]: shutting down admn
13:41:54 [INF][wb_admin_control.py:server_polling_thread:556]: Monitoring thread done.

Julien Lancelot

unread,
May 3, 2016, 4:50:43 AM5/3/16
to Saurabh Agrawal, SonarQube
Thanks, but these logs are not coming from SonarQube.

Could you please send us the file found in logs/sonar.log please ?
Thanks.

Regards


For more options, visit https://groups.google.com/d/optout.

Saurabh Agrawal

unread,
May 3, 2016, 5:29:58 AM5/3/16
to SonarQube, skagraw...@gmail.com
Hello Julien,

sonar.log is not updating when I import data from previous version to new version.

I am again explaining my issue.
Step 1: I have downloaded sonarqube 4.6.7 and locate in someplace and make necessary changes in sonar.properties file.
Step 2: Remove the data/es directory. and Backup your old sonar database.
Step 3: Create an empty schema name sonar in MySql.
Step 4: Now run StartSonar file.  Sonar successfully up and sonar database having some auto generated tables.
Step 5: Now import the old database into new database.
When I import it then showing one issue.

12:42:20 Restoring sonar (snapshot_sources)
Running: mysql.exe --defaults-file="c:\users\saurabh.a1\appdata\local\temp\tmpm2c3wd.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=sonar < "C:\\Users\\saurabh.a1\\Documents\\dumps\\Dump3May\\sonar_snapshot_sources.sql"
ERROR 2006 (HY000) at line 197: MySQL server has gone away


Operation failed with exitcode 1

"ERROR 2006 (HY000) at line 195: MySQL server has gone away
Operation failed with exitcode 1"

Please suggest the solution..

Julien Lancelot

unread,
May 3, 2016, 5:48:09 AM5/3/16
to Saurabh Agrawal, SonarQube
I've have no idea what is happening, maybe the SQL backup is corrupted ?

But a question is coming to my mind, as the upgrade was successful, why do you need to import the old database to the new version of SonarQube ?


For more options, visit https://groups.google.com/d/optout.

CSchulz

unread,
May 3, 2016, 5:52:25 AM5/3/16
to SonarQube, skagraw...@gmail.com
Here some information about gone away errors https://dev.mysql.com/doc/refman/5.6/en/gone-away.html

I made the experience that the server can crash during restore caused of too small cache/pool size for IMDB (which is heavily used by SQ).
Reply all
Reply to author
Forward
0 new messages