openmeetings / openmeetings-docker

Docker image for OM
Apache License 2.0
110 stars 57 forks source link

sql failed to start #2

Closed activedecay closed 7 years ago

activedecay commented 7 years ago

I have an ubuntu VM created with vagrant, installed docker with debops.docker ansible role, cloned this repo, and typed docker build .

it failed to start mysql.

does the master branch work? should I try another git-tagged version, check that out and build again?

I'll update with the error message. Just wondering how well supported this project is

solomax commented 7 years ago

Should work as expected I'll double check

solomax commented 7 years ago

Please provide your steps :)

activedecay commented 7 years ago

good deal!

i have a vagrant box using a ceph/ubuntu-xenial basebox

# vagrant init ceph/ubuntu-xenial
# vagrant up
# vagrant ssh

the prompt is now vagrant@thebox:~$

  1. sudo apt-get remove docker docker-engine docker.io
  2. sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
  3. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  4. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  5. sudo apt-get update
  6. sudo apt-get install -y docker-ce
  7. sudo usermod -aG docker $USER
  8. sudo systemctl enable docker
  9. logout and log back in to enable the group changes to the user

do the needful

git clone https://github.com/openmeetings/openmeetings-docker.git
cd openmeetings-docker
nohup docker build . &

a link to nohup.out https://drive.google.com/file/d/0B-Yoemv8xz62RF9GNTVOOHRWeWs/view?usp=sharing

activedecay commented 7 years ago

please check the link for output

solomax commented 7 years ago

Will try to check the script(s) tonight, seems MySql server was updated and have to be installed differently Maybe will switch to PostgeSql

solomax commented 7 years ago

Should work now, please check

activedecay commented 7 years ago

i dunno, but seems like the same failure https://drive.google.com/file/d/0BwKUTsk23OzZRnpwNHpJN2o4U3M/view?usp=sharing

solomax commented 7 years ago

hmm, you have

 * Starting MySQL database server mysqld
   ...fail!

in your logs .... not sure why, will try to reproduce

solomax commented 7 years ago

Can you start thr Docker and try to start MySql manually? What would be the error?

activedecay commented 7 years ago

after messing around, I finally figured out what __HASH__ means. it's the IMAGE ID found when executing docker image ls -- and it's the one without a repository, i guess...

This shows up in the mysql error log

2017-10-16T15:34:33.731594Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table storage engine for 'proxies_priv' doesn't have this option
2017-10-16T15:34:33.731679Z 0 [ERROR] Aborting

full context: https://hastebin.com/dewitiyuwu.pl

activedecay commented 7 years ago

https://serverfault.com/a/872576/398062 is this the solution? the stackoverflow question is nearly identical to my experience.

solomax commented 7 years ago

Sorry, don't have much time to test right now :((( You can login to docker image as described in README:

docker run -it __HASH__
activedecay commented 7 years ago

i've been editing my comments, please see above. the sql error and the stackoverflow solution don't seem to work. thanks for your time, no rush

solomax commented 7 years ago

Hello, just performed clean install using:

docker rmi -f $(docker images -a -q)
docker build .
docker run -it __HASH__

all good :(( Docker: latest under Ubuntu 17.04 Maybe you are performing any additional steps?

activedecay commented 7 years ago

I'll try under 17.04 I've been using 16.04 🌶️

solomax commented 7 years ago

should be the same, will try using 16.04 later this week Docker image is based on 16.04 .... something weird :(

solomax commented 7 years ago

Checking on 16.04 ... Oracle java8 fails to be downloaded, will double-check tomorrow and will replace with openjdk ...

activedecay commented 7 years ago

Nice catch!

On Oct 17, 2017 8:40 PM, "Maxim Solodovnik" notifications@github.com wrote:

Checking on 16.04 ... Oracle java8 fails to be downloaded, will double-check tomorrow and will replace with openjdk ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openmeetings/openmeetings-docker/issues/2#issuecomment-337443815, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGWlvF3OUR7ks9YeMG8uBYXXeq9gdbSks5stWU3gaJpZM4PoItE .

solomax commented 7 years ago

Will also try to build and publish image, so it will be available without re-building

solomax commented 7 years ago

Please try with pre-built latest image: docker run -i --rm --name om-server -p 5080:5080 -p 1935:1935 openmeetings-docker-registry.bintray.io/server:latest Works for me as expected

activedecay commented 7 years ago

docker: Error response from daemon: unauthorized: Repository '/openmeetings/registry' does not support Docker API version v2.

~$ docker run -i --rm --name om-server -p 5080:5080 -p 1935:1935 openmeetings-docker-registry.bintray.io/server:latest
Unable to find image 'openmeetings-docker-registry.bintray.io/server:latest' locally
docker: Error response from daemon: unauthorized: Repository '/openmeetings/registry' does not support Docker API version v2.
See 'docker run --help'.
activedecay commented 7 years ago

Docker version 17.09.0-ce, build afdb6d4

solomax commented 7 years ago

I have tested on Ubuntu 16.04

Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be

Will try to check on Ubuntu 17.10 and find workaround ...

solomax commented 7 years ago
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017

Also works on my machine, will double-check tonight on different machine

solomax commented 7 years ago

Seems to be reproducible :(((( Will try to find what is wrong :(

JohnnyC1951 commented 7 years ago

I am getting exactly the same today on Ubuntu 16.04 using a plain vanilla docker build with today's image. Also seeing this during build: at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304) at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290) ... 33 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Just for info

andreasferber commented 7 years ago

I experienced the same problem. I solved it by switching to MariaDB instead, by doing the following

solomax commented 7 years ago

Hopefully I was able to fix this Could you try new image:

docker run -i --rm --name om-server -p 5080:5080 -p 1935:1935 openmeetings-docker-images.bintray.io/server:latest
JohnnyC1951 commented 7 years ago

Just a quick question? Is there any persistence built into this image?

solomax commented 7 years ago

What do you mean by persistence?

JohnnyC1951 commented 7 years ago

Simple example, if you installed some new features in the Docker Image, and you unloaded and reloaded the docker, would the changes survive? They won't unless you have some special strategy.

solomax commented 7 years ago

This is my first docker image :) It is created to simplify "run and test" process :)

PRs are welcome :) The only "special strategy" I can imagine is to use external DB :) ....

JohnnyC1951 commented 7 years ago

There are 'Data Volumes' and other strategies. http://www.computerweekly.com/feature/Docker-storage-how-to-get-persistent-storage-in-Docker

solomax commented 7 years ago

Thanks! Will try to check these docs and add persistence

activedecay commented 7 years ago

your instructions work now. thanks you can probably close this

solomax commented 7 years ago

Thanks for checking!