Metaswitch / clearwater-docker

Docker integration for Project Clearwater
Other
41 stars 64 forks source link

Building ellis fails due to mysql error #71

Closed chbndrhnns closed 7 years ago

chbndrhnns commented 7 years ago

Symptoms

Building ellis fails with

Building ellis
Step 1/12 : FROM clearwater/base
 ---> 89622cf6d6c2
Step 2/12 : MAINTAINER maintainers@projectclearwater.org
 ---> Using cache
 ---> 3330d6638bc9
Step 3/12 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes mysql-server
 ---> Using cache
 ---> 3f4ebd787719
Step 4/12 : RUN /etc/init.d/mysql start && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes ellis
 ---> Running in 380b4d2a037b
 * Starting MySQL database server mysqld
   ...fail!
ERROR: Service 'ellis' failed to build: The command '/bin/sh -c /etc/init.d/mysql start && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes ellis' returned a non-zero code: 1

Impact

docker-compose cannot be used to create deployment.

Release and environment

Docker 17.0.3.1 on Mac OS X 10.12.6

Steps to reproduce

Follow steps on homepage:

derekoco commented 7 years ago

This same error is also impacting the Kubernetes build

Errors were encountered while processing:
 ellis
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install -y --force-yes ellis' returned a non-zero code: 100

Any logs I can get you please let me know.

derekoco commented 7 years ago

@MatMeredith @plwhite Have you had the time to investigate this build error yet?

plwhite commented 7 years ago

I can't repro this, having done a clean build today.

Does it repro if you rebuild clearwater/base with --no-cache? In the past I've seen weird behaviour because apt-get was confused because the last update was far in the past.

chbndrhnns commented 7 years ago

I first pulled the latest version. With --no-cache, the base image gets build and docker compose up fails with

Unpacking sprout-bgcf (1.0-170731.115837) ...
dpkg: error processing archive /var/cache/apt/archives/sprout-bgcf_1.0-170731.115837_amd64.deb (--unpack):
 trying to overwrite '/usr/share/clearwater/clearwater-config-manager/scripts/print-bgcf-configuration', which is also in package clearwater-config-manager 1.0-161108.170154
sprout: unrecognized service
Selecting previously unselected package sprout-mmtel-as.
Preparing to unpack .../sprout-mmtel-as_1.0-170731.115837_amd64.deb ...
Unpacking sprout-mmtel-as (1.0-170731.115837) ...
Selecting previously unselected package sprout.
Preparing to unpack .../sprout_1.0-170731.115837_amd64.deb ...
Unpacking sprout (1.0-170731.115837) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 /var/cache/apt/archives/sprout-bgcf_1.0-170731.115837_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: Service 'sprout' failed to build: The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes sprout' returned a non-zero code: 100
chbndrhnns commented 7 years ago

This happened due to not changing stable to latest for the repo.

derekoco commented 7 years ago

Ellis is still failing to build....

 * Starting MySQL database server mysqld
   ...fail!
The command '/bin/sh -c /etc/init.d/mysql start && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes ellis' returned a non-zero code: 1

@chbndrhnns Can you elaberate more as to what you have done to resolve this build error please?

chbndrhnns commented 7 years ago

I happened to use the stable repository and after following the README it worked:

If you are using the master branch of clearwater-docker then it will sometimes be dependent upon the latest Clearwater packages. To use these instead update base/Dockerfile to reference http://repo.cw-ngv.com/latest instead before building the base Docker image.

Then build the base image, then run docker-compose.

This at least brings up the system fine here.

derekoco commented 7 years ago

Thanks for the feedback very appreciated