Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using docker compose in windows to start TiDB, I meet the following error #36

Open
ghost opened this issue Sep 7, 2018 · 13 comments
Open

Comments

@ghost
Copy link

ghost commented Sep 7, 2018

use docker-compose up -d, i start all the containers

but use docker ps, i found

image

use docker logs for one of the TiKV

image

continue to logs one of PD, i got

image

my docker version is Docker version 18.06.1-ce, build e68fc7a
docker compose version is docker-compose version 1.22.0, build f46880fe

@tennix
Copy link
Member

tennix commented Sep 7, 2018

We haven't tested tidb-docker-compose on Windows platform. Did you use Docker for Windows or Docker Toolbox? tidb-docker-compose cannot run on the legacy Docker Toolbox. Besides, you should check if the container has the permission to write to the mounted host path and if the network between different containers can communicate with each other.

@AdityaZZ
Copy link

liunx centOS 7 also had this problem

@tennix
Copy link
Member

tennix commented Sep 12, 2018

@LanSMD @XieZiXi I'm sorry that we've accidentally reset max-open-files argument for TiKV. This would cause TiKV fail to start if ulimit isn't configurated large enough. You can modify this argument as in #38 to see if it starts correctly.

@verglor
Copy link

verglor commented Oct 9, 2018

Hi, I have the same problem in Docker for Windows 18.09.0-ce-beta1 and docker-compose 1.22.0.

@gregwebs
Copy link

gregwebs commented Oct 9, 2018

@verglor are you using the latest commit from this repo?

@verglor
Copy link

verglor commented Oct 9, 2018

@gregwebs Yes, 557c355 (with max-open-files = 1024 in tikv.toml)

@verglor
Copy link

verglor commented Oct 9, 2018

The problem seems to be in pd containers - tikv containers fail because they cannot connect to pd.
From inside pd0 container I can ping pd1 and pd2 and ulimit -n returns 1048576.
Also connection to localhost:2379/v2/members freezes.

See logs with info level.

@verglor
Copy link

verglor commented Oct 9, 2018

When I comment out - --data-dir=/data/pd* from pd containers, pd cluster starts up successfully.
Then I have to comment out - --data-dir=/data/tikv* from tikv containers for tikv cluster to start up successfully.
./data dir is prefectly writable on windows host - some files are written there by pd and tikv containers, but probably some specific permissions are required that are not supported in Windows.

@verglor
Copy link

verglor commented Oct 16, 2018

Also using named volume instead of mounting local directory works fine:

Replacing

    volumes:
      - ./data:/data

with

    volumes:
      - data:/data
volumes:
  data:

@tennix
Copy link
Member

tennix commented Oct 16, 2018

Seems the directory ./data still not writeable for PD. Where the named volume reside?

@SSebo
Copy link

SSebo commented Mar 11, 2019

ubuntu 16.04 runs on Parallels Desktop on Mac has this problem when sharing folders with host os.
Problem disappears when I move the tidb-docker-compose folder under ubuntu VM.

@Lihuanghe
Copy link

I got an error log in docker on windows
[fatal] etcdserver: [create wal error: sync /data/pd0/member: invalid argument]

@nolouch
Copy link
Member

nolouch commented Jan 31, 2021

link pingcap/tidb#22620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants