Comments (13)
I suspect this has nothing to do with this Ansible role, more likely someone screwed the MySQL package at Debian...
from ansible-role-mysql.
Switching to MariaDB is my current workaround ...
from ansible-role-mysql.
Yeah, definitely looks like a package issue with apt :(
I'll leave this open in case anyone else has any ideas or sees a different solution besides temporarily (or permanently!) switching to MariaDB on any systems getting this error.
from ansible-role-mysql.
@hrstoyanov can you share your playbook, vars, roles and all other files. I can try to solve this problem.
from ansible-role-mysql.
@mightydok @geerlingguy Here is how to reproduce it with Docker container:
a. Create a docker image "test" based on this Dockerfile:
docker build -q -t test .
# Configure a minimal Debian image with: systemd, sshd and cron. Also, some basic utils are added. Locale is configured to make PostgresSQL installation happy.
FROM debian:latest
ENV container docker
#ENV LANG en_US.UTF-8
#ENV LANGUAGE en_US.UTF-8
ENV LANG C
ENV LANGUAGE C
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get --yes install dnsutils traceroute apt-utils sudo python cron zip unzip git nano wget curl \
&& apt-get --purge remove openssh-server \
&& apt-get --yes install systemd \
&& cd /lib/systemd/system/sysinit.target.wants \
&& ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1 \
&& rm -f /lib/systemd/system/multi-user.target.wants/* \
&& rm -f /etc/systemd/system/*.wants/* \
&& rm -f /lib/systemd/system/local-fs.target.wants/* \
&& rm -f /lib/systemd/system/sockets.target.wants/*udev* \
&& rm -f /lib/systemd/system/sockets.target.wants/*initctl* \
&& rm -f /lib/systemd/system/basic.target.wants/* \
&& rm -f /lib/systemd/system/anaconda.target.wants/* \
&& rm -f /lib/systemd/system/plymouth* \
&& rm -f /lib/systemd/system/systemd-update-utmp* \
&& apt-get --yes install openssh-server \
&& systemctl set-default multi-user.target \
&& systemctl enable ssh \
&& systemctl enable cron \
&& apt-get --yes install locales \
# && dpkg-reconfigure locales \
# && locale-gen en_US \
# && locale-gen en_US.UTF-8 \
&& apt-get autoremove
#Allows root login with SSH, change shell, generate locales
RUN mkdir /var/run/sshd \
&& echo 'root:root' | chpasswd \
&& sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& chsh -s /bin/bash \
# && echo "export LANGUAGE=en_US.UTF-8" >>/etc/bash.bashrc \
# && echo "export LANG=en_US.UTF-8" >>/etc/bash.bashrc \
# && echo "export LC_ALL=C" >>/etc/bash.bashrc \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& echo "export LANGUAGE=C" >>/etc/bash.bashrc \
&& echo "export LANG=C" >>/etc/bash.bashrc \
&& echo "export LC_ALL=C" >>/etc/bash.bashrc \
&& /usr/sbin/locale-gen
EXPOSE 22 3306 5432 80 443 8080 9990
ENV init /lib/systemd/systemd
VOLUME [ "/sys/fs/cgroup" ]
ENTRYPOINT ["/lib/systemd/systemd"]
CMD ["systemd.unit=emergency.service"]
b. Create container devbox.
docker create -it -p 2200:22 -p 3306:3306 -p 5432:5432 -p 80:80 -p 443:443 \
--privileged=true \
--workdir="/projects" \
--volume /dev/shm:/dev/shm \
--volume $SSH_AUTH_SOCK:/ssh-agent \
--volume /tmp/.X11-unix:/tmp/.X11-unix:ro \
--env DISPLAY=$DISPLAY \
--env SSH_AUTH_SOCK=/ssh-agent \
--device /dev/snd \
--name devbox test /bin/bash
c. Start the container
docker start devbox
and make sure you can SSH to it as root/root:
ssh root@localhost -p 2200 ls /
d. Run playbook that takes the default mysql_packages
and see it fail, like:
ansible-playbook -e ansible_ssh_port=2200 mysql.yml
- hosts: localhost
become: yes
roles:
- geerlingguy.mysql
e. After the test, you can clean up with: docker rm -f devbox; docker rmi test
.
from ansible-role-mysql.
@hrstoyanov, oh i see:
-e ansible_ssh_port=2200
Ansible will not use this var without inventory file, so i think you run playbook on host server, NOT docker container.
So this line:
Aborting downgrade from (at least) 10.0 to 5.5.
I think apt raise an error when u try downgrade ur HOST mariadb 10 server to mysql 5.5.
You must use inventory file for ansible-playbook, just run:
echo localhost >> /etc/ansible/hosts
And try to rerun role, all will install successfully.
from ansible-role-mysql.
@mightydok
Sorry, I do use inventory file, where I specify the ssh port and root ssh user and I do see the MariaDB getting installed in the container. Please create the inventory file to see the issue with MySQL.
[db]
#Ansible 1.9.x
localhost ansible_ssh_user=root ansible_ssh_port=2200
from ansible-role-mysql.
@hrstoyanov i create inventory file and successfully use role for mysql install in just created container of debian stable. I recheck and sure that mysql install in container, so i cant reproduce your error.
Maybe you try change mariadb to mysql in container, i`am not sure that it will be so easy.
So just recreate container and try.
from ansible-role-mysql.
I think I am experiencing a similar issue.
vagrant@db:~$ sudo apt-get update
.
.
.
vagrant@db:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
libsql-statement-perl libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 12 newly installed, 0 to remove and 52 not upgraded.
Need to get 9072 kB of archives.
After this operation, 96.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6364 B]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.46-0ubuntu0.14.04.2 [14.1 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.46-0ubuntu0.14.04.2 [597 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl amd64 4.025-1 [99.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [706 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1461 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [3223 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 amd64 5.5.46-0ubuntu0.14.04.2 [1981 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server all 5.5.46-0ubuntu0.14.04.2 [12.4 kB]
Fetched 9072 kB in 8s (1071 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libaio1:amd64.
(Reading database ... 61004 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.109-4_amd64.deb ...
Unpacking libaio1:amd64 (0.3.109-4) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../mysql-common_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_amd64.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mysql-client-core-5.5.
Preparing to unpack .../mysql-client-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 61367 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Unpacking mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-server (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libaio1:amd64 (0.3.109-4) ...
Setting up libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mysql-client-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-core-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.95-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is the first thing I do an a fresh ubuntu/trusty64 box and I get these errors. I am not that familiar with these types of issues. Does this mean that mysql-server can't be installed on ubuntu systems? Is there a way for me to change the package being installed?
New to ansible ... would really like to be able to use this ansible role :)
from ansible-role-mysql.
Typically you'd use this role to do the complete installation; does this role fail, or does the failure only occur if you ssh in and run apt-get install mysql-server
?
from ansible-role-mysql.
As an aside, I've been using this role with Raspbian 8/Jessie for Raspberry Pi work and haven't encountered any issues. I wonder if the AMD64 packages for MySQL in Debian's repos are at fault?
from ansible-role-mysql.
Originally I thought it was this package causing the problem (sorry), but then I managed to recreate the issue on a fresh install of ubuntu/trusty64 (no other changes) and executing apt-get install mysql-server
. I also tried to update the apt-get repository, but that didn't work either. I also tried fixing the locale issue, but that didn't help the situation either.
I think you are correct, it looks like Debian's repos are the problem. I will see if I can get a response from them on their forums. Cheers.
from ansible-role-mysql.
I'm going to close out this issue as I can't reproduce on Ubuntu 14.04, Ubuntu 16.04, or Debian 8 currently. Probably a temporary packaging issue.
from ansible-role-mysql.
Related Issues (20)
- best way to use mysql installation default settings HOT 2
- mariadbd: can't create/write to file '/var/run/mariadb/mariadb.pid (Errcode 2 'No such file or directory') HOT 3
- Allow custom MariaDB version using upstream repos HOT 2
- Check master replication status. HOT 3
- Skip replication tasks HOT 8
- Change mysql_bind_address: '0.0.0.0' to mysql_bind_address: '127.0.0.1' in defaults HOT 2
- Add additional innodb tunables to configuration HOT 4
- Missing community.mysql HOT 2
- ERROR! 'include_tasks' is not a valid attribute for a Play HOT 4
- MySQL fails to start when `mysql_datadir` is set to anything other than MySQL's default HOT 13
- Make apt update_cache optional or ignore errors HOT 2
- mysql_extra_config for my.cnf HOT 2
- force mariadb installation on ubuntu 22.04 not working HOT 1
- mysql_bind_address does not override all conf files
- FAILED! => {"changed": false, "msg": "Could not find the requested service mysql: host"} HOT 5
- secure-installation fails on RHEL8 at remove test database. HOT 3
- includedir is set only if mysql_config_include_files is set HOT 2
- error "couldn't resolve module/action 'mysql_user'" when i used in awx HOT 4
- add innodb settings HOT 2
- Warning "Option column_case_sensitive is not provided" during MySQL user setup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-mysql.