[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
*** This bug is a duplicate of bug 1571865 *** https://bugs.launchpad.net/bugs/1571865 This looks like bug 1571865 to me. I wonder if it's possible that my.cnf.migrated remains with an alternative listed even if all packages are purged? That may be related to an issue with how the my.cnf symlink is handled. ** This bug has been marked a duplicate of bug 1571865 mysql fails to start after upgrade if previous defaults were customised -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
A first step would be to give a more helpful error message than «It didn't work». Running mysqld --verbose --help 2>&1 > /dev/null can let us detect errors without starting up the database fully: lars@lars-xenial2:~/git/mysql-5.7$ mysqld --verbose --help 2>&1 > /dev/null 2016-04-15T05:19:25.553086Z 0 [ERROR] unknown variable 'myisam-recover=BACKUP' 2016-04-15T05:19:25.555137Z 0 [ERROR] Aborting So if that command fails we can abort early and pass on the error -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
It's actually worse than that, because: (1) apt leaves the package dangling, not fully installed, requires a fix with "apt-get install -f" ... and (2) it leaves the databases and tables in the old pre-5.6 format because it didn't finish installation So it's a bit of a mess. After manually fixing the my.cnf problem and doing a -f, it goes ahead and converts the databases and tables as well and finishes. It's not Ubuntu's responsibility to fix the my.cnf problem, but maybe Ubuntu could allow some easy way to revert to 5.6 after a failed 5.7 upgrade, because right now it's a little scary for those who don't have much expertise to fix it themselves. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
We might be able to prevent this causing the installation to fail by ensuring the server doesn't read config files during installation (but need to test this to verify). However if that is the case then the issue would be less visible as the server would simply fail to start after installation since the deprecated config values are still there, and will need to be removed from the configuration files I'm not sure what the desired behavior is here, since this is likely to affect a number of people who upgrade from earlier versions of the server. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Apologies, I misread your message when you said "mysql-common". When I try to install that one, I get the error: update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist I noticed there is already a bug open for that. However: This current bug is valid. My first message in this bug shows that I was unable to upgrade from mysql 5.6 on Xenial. The configuration halted because: [ERROR] unknown variable 'key_buffer=16M' And the whole installation exited with the same message as the bug title. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
>> ... but the dir /etc/mysql/conf.d/ does not exist. This should be removed as >> it blocks the install! > > The mysql-common package provides /etc/mysql/conf.d/mysql.cnf and others. If > you have deleted it locally, then this user choice will be preserved. To fix > your system, try purging all mysql packages and then reinstalling. Please read my previous message fully. I specifically said I purged all mysql packages and installed fresh, and included very detailed steps about the problem, with error messages and with fixes I had to apply. It is definitely not a local configuration problem. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
> ... but the dir /etc/mysql/conf.d/ does not exist. This should be removed as it blocks the install! The mysql-common package provides /etc/mysql/conf.d/mysql.cnf and others. If you have deleted it locally, then this user choice will be preserved. To fix your system, try purging all mysql packages and then reinstalling. Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete. If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New. This relates to Harish's original report. claus and Alex, if you think you have separate issues and that they are bugs present in Ubuntu's packaging of MySQL (rather than local system misconfigurations), then please file separate reports. ** Changed in: mysql-5.7 (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
** Changed in: mysql-5.7 (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
I just wiped all mysql server completely, including databases, and tried to install 5.7 in xenial but it still fails. I had to do quite a few manual steps ... Details below. First, the my.cnf file has the line !includedir /etc/mysql/conf.d/ ... but the dir /etc/mysql/conf.d/ does not exist. This should be removed as it blocks the install! Full steps (note that I'm wiping everything, including all databases!): # apt-get purge mysql-server* # rm -rf /etc/mysql /var/lib/mysql* /var/log/mysql* # apt-get -V install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: mysql-server-5.7 (5.7.11-0ubuntu5) mysql-server-core-5.7 (5.7.11-0ubuntu5) Suggested packages: tinyca (0.7.5-6) The following NEW packages will be installed: mysql-server (5.7.11-0ubuntu5) mysql-server-5.7 (5.7.11-0ubuntu5) mysql-server-core-5.7 (5.7.11-0ubuntu5) 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/10.1 MB of archives. After this operation, 94.6 MB of additional disk space will be used. Do you want to continue? [Y/n] Preconfiguring packages ... Selecting previously unselected package mysql-server-core-5.7. (Reading database ... 56768 files and directories currently installed.) Preparing to unpack .../mysql-server-core-5.7_5.7.11-0ubuntu5_amd64.deb ... Unpacking mysql-server-core-5.7 (5.7.11-0ubuntu5) ... Selecting previously unselected package mysql-server-5.7. Preparing to unpack .../mysql-server-5.7_5.7.11-0ubuntu5_amd64.deb ... grep: /etc/mysql/: No such file or directory Unpacking mysql-server-5.7 (5.7.11-0ubuntu5) ... Selecting previously unselected package mysql-server. Preparing to unpack .../mysql-server_5.7.11-0ubuntu5_all.deb ... Unpacking mysql-server (5.7.11-0ubuntu5) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for systemd (229-4ubuntu1) ... Processing triggers for ureadahead (0.100.0-19) ... Setting up mysql-server-core-5.7 (5.7.11-0ubuntu5) ... Setting up mysql-server-5.7 (5.7.11-0ubuntu5) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for systemd (229-4ubuntu1) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) # systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Tue 2016-04-12 19:57:53 BST; 3min 1s ago Process: 19174 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE) Main PID: 14227 (code=exited, status=0/SUCCESS) Apr 12 19:57:53 lin systemd[1]: mysql.service: Control process exited, code=exited status=1 Apr 12 19:57:53 lin systemd[1]: Failed to start MySQL Community Server. Apr 12 19:57:53 lin systemd[1]: mysql.service: Unit entered failed state. Apr 12 19:57:53 lin systemd[1]: mysql.service: Failed with result 'exit-code'. Apr 12 19:57:53 lin systemd[1]: mysql.service: Service hold-off time over, scheduling restart. Apr 12 19:57:53 lin systemd[1]: Stopped MySQL Community Server. Apr 12 19:57:53 lin systemd[1]: mysql.service: Start request repeated too quickly. Apr 12 19:57:53 lin systemd[1]: Failed to start MySQL Community Server. // Worthless log info! # journalctl -xe -- Unit mysql.service has begun starting up. Apr 12 20:03:00 lin mysql-systemd-start[19459]: MySQL system database not found. Please run mysql_install_db tool. Apr 12 20:03:00 lin systemd[1]: mysql.service: Control process exited, code=exited status=1 Apr 12 20:03:00 lin systemd[1]: Failed to start MySQL Community Server. // Ok ... # mysql_install_db mysql_install_db: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory) mysql_install_db: [ERROR] Fatal error in defaults handling. Program aborted! // grrr, edited my.cnf and commented the line "!includedir /etc/mysql/conf.d/" # mysql_install_db 2016-04-12 20:05:49 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize 2016-04-12 20:05:49 [ERROR] The data directory needs to be specified. // grrr! # mysqld --initialize
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
I'm posting this bug here, although the upgrade process in my case did finish (upgraded from 5.6 to 5.7 on Xenial) but left it in a failed state <...SNIP...> Installing new version of config file /etc/mysql/mysql.conf.d/mysqld.cnf ... Job for mysql.service failed because the control process exited with error code. See "systemctl stat us mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for systemd (229-4ubuntu1) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) Logs say: 2016-04-12T17:12:04.333194Z 0 [ERROR] unknown variable 'key_buffer=16M' 2016-04-12T17:12:04.333206Z 0 [ERROR] Aborting Commenting out the line 'key_buffer=16M' and running 'apt-get install -f' appeared to continue successfully, reporting upgrading the databases too. However, looking in the log again, I saw this: 2016-04-12T17:18:17.643847Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2016-04-12T17:18:17.643990Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2016-04-12T17:18:17.814693Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-04-12T17:18:17.815303Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11-0ubuntu5) starting as process 14227 ... 2016-04-12T17:18:17.820389Z 0 [Note] InnoDB: PUNCH HOLE support available 2016-04-12T17:18:17.820440Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-04-12T17:18:17.820462Z 0 [Note] InnoDB: Uses event mutexes 2016-04-12T17:18:17.820494Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2016-04-12T17:18:17.820501Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 2016-04-12T17:18:17.820511Z 0 [Note] InnoDB: Using Linux native AIO 2016-04-12T17:18:17.820783Z 0 [Note] InnoDB: Number of pools: 1 2016-04-12T17:18:17.820911Z 0 [Note] InnoDB: Using CPU crc32 instructions 2016-04-12T17:18:17.832665Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2016-04-12T17:18:17.842499Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-04-12T17:18:17.845028Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2016-04-12T17:18:17.857904Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2016-04-12T17:18:17.897639Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2016-04-12T17:18:17.897896Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2016-04-12T17:18:17.915828Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2016-04-12T17:18:17.917207Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2016-04-12T17:18:17.917243Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2016-04-12T17:18:17.917712Z 0 [Note] InnoDB: Waiting for purge to start 2016-04-12T17:18:17.970631Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 5501485 2016-04-12T17:18:17.971034Z 0 [Note] Plugin 'FEDERATED' is disabled. 2016-04-12T17:18:17.971681Z 0 [Warning] System table 'plugin' is expected to be transactional. 2016-04-12T17:18:17.972924Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2016-04-12T17:18:17.973183Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160412 18:18:17 2016-04-12T17:18:17.973509Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2016-04-12T17:18:17.973813Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2016-04-12T17:18:17.973832Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2016-04-12T17:18:17.973847Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2016-04-12T17:18:17.973878Z 0 [Note] Server socket created on IP: '127.0.0.1'. 2016-04-12T17:18:17.974131Z 0 [Warning] Failed to open optimizer cost constant tables 2016-04-12T17:18:17.987727Z 0 [Warning] System table 'time_zone_leap_second' is expected to be transactional. 2016-04-12T17:18:17.987788Z 0 [Warning] System table 'time_zone_name' is expected to be
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Thanks for the info. myisam-recover has been removed as a valid option (it's replaced by myisam-recover-options as mentioned in the deprecation warning in 5.6, so you should be able to just rename it). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
I had a similar (or the same error) today. I found this in my syslog: Apr 8 18:51:25 mail mysqld[30197]: 2016-04-08T16:51:25.015211Z 0 [ERROR] unknown variable 'myisam-recover=BACKUP' Apr 8 18:51:25 mail mysqld[30197]: 2016-04-08T16:51:25.015314Z 0 [ERROR] Aborting And an older message: Apr 8 18:45:01 mail mysqld: 2016-04-08 18:45:01 28781 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead. For me disabling the line "myisam-recover=..." in /etc/mysql/mysql.conf.d/mysqld.cnf and rerunning apt-get upgrade fixed the problem. HTH -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1567884] Re: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: mysql-5.7 (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1567884 Title: package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs