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

Something wrong with make devcluster #71

Closed
starnop opened this issue Feb 26, 2019 · 9 comments
Closed

Something wrong with make devcluster #71

starnop opened this issue Feb 26, 2019 · 9 comments
Labels
bug Something isn't working Documentation

Comments

@starnop
Copy link

starnop commented Feb 26, 2019

I was interested in this project, so I had a try with it. I found the fastest way to try it is by running make devcluster after having a look at the documentation. Everything seemed so simple that I thought I could get started quickly. Unfortunately, I failed to do that.
Then, I found some problems:

  • It‘s so slow to make the kraken-herd image
  • We should use --config instead of -config here
  • The container kraken-herd exits with an exception
# docker ps -a
f32695e2870b        kraken-herd:dev                                                  "./herd_start_proces…"   About a minute ago   Exited (1) 57 seconds ago

And I try to find the reason for that. However, I am not familiar with the project, and I am afraid I cannot solve the problem quickly. So I need some help.

# docker logs f32695e2870b
7:C 26 Feb 2019 12:33:42.189 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7:C 26 Feb 2019 12:33:42.189 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=7, just started
7:C 26 Feb 2019 12:33:42.189 # Configuration loaded
7:M 26 Feb 2019 12:33:42.190 * Running mode=standalone, port=14001.
7:M 26 Feb 2019 12:33:42.190 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
7:M 26 Feb 2019 12:33:42.190 # Server initialized
7:M 26 Feb 2019 12:33:42.190 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
7:M 26 Feb 2019 12:33:42.190 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
7:M 26 Feb 2019 12:33:42.190 * Ready to accept connections
kraken-origin exited unexpectedly. Logs:
2019-02-26T12:33:45.219Z	info	cmd/cmd.go:105	Configuring origin with hostname 'host.docker.internal'
candidate: /etc/kraken/config/origin/development.yaml
2019-02-26T12:33:45.229Z	WARN	metrics/metrics.go:62	Skipping version emitting: no GIT_DESCRIBE env variable found
2019-02-26T12:33:45.229Z	WARN	store/cleanup.go:81	TTL disabled for {/var/cache/kraken/kraken-origin/upload/}
2019-02-26T12:33:45.229Z	WARN	store/cleanup.go:81	TTL disabled for {/var/cache/kraken/kraken-origin/cache/}
OK    00001_tagreplication_init.go
OK    00002_writeback_init.go
goose: no migrations to run. current version: 2
2019-02-26T12:33:45.257Z	WARN	networkevent/producer.go:58	Kafka network events disabled
2019-02-26T12:33:45.257Z	WARN	bandwidth/limiter.go:77	Bandwidth limits disabled
2019-02-26T12:33:45.257Z	INFO	scheduler/scheduler.go:194	Scheduler starting as peer a952045ae4fb26449fbda9a97e9fe9c5f3430a84 on addr host.docker.internal:15001
2019-02-26T12:33:45.257Z	FATAL	cmd/cmd.go:181	Error creating cluster host list: invalid config: no dns record or static list supplied
2019-02-26T12:33:45.257Z	INFO	scheduler/scheduler.go:319	Listening on [::]:15001
nvalid config: no dns record or static list supplied

Something others: Another reason that I can't solve the problem is that I cannot find a good description of the configuration file. Expect that, there are not good comments on the structure fields, so it would be nice to add that.

Looking forward to your reply. 😄

@yiranwang52
Copy link
Collaborator

Are you using Docker-for-mac?
Seems host.docker.internal is not resolvable, so I guess you were using a Linux environment?

@yiranwang52 yiranwang52 added the bug Something isn't working label Feb 26, 2019
@yiranwang52
Copy link
Collaborator

Actually I take it back, there seems to be a real issue with the configs.

@starnop
Copy link
Author

starnop commented Feb 26, 2019

Are you using Docker-for-mac?
Seems host.docker.internal is not resolvable, so I guess you were using a Linux environment?

Yeah, I am using with Linux. In fact, maybe the Linux is more appropriate to be as the default environment. WDYT?

BTY, could you please show me that how to config with Linux. Thanks very much.

@yiranwang52
Copy link
Collaborator

Sure, we can make devcluster work with linux by default, and add a new maccluster target for Docker-for-Mac.

For now I think you can make it work by applying #74 and replacing host.docker.internal with 127.0.0.1 for all config files under examples/config.

@starnop
Copy link
Author

starnop commented Feb 26, 2019

Thanks to your help, I am now running it successfully. 😄

@yiranwang52
Copy link
Collaborator

Thanks for identifying the issues, please let us know if you found more bugs or have feature requests. Opened #76 to track the remaining issue.

@zcc35357949
Copy link

Thanks for identifying the issues, please let us know if you found more bugs or have feature requests. Opened #76 to track the remaining issue.

I make it work by replacing host.docker.internal with 127.0.0.1, kraken-herd and kraken-agent works well, but found pull image error:
# docker pull localhost:16000/library/golang:1.11
Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<html><head><title>403 Forbidden</title></head>\r\n<body bgcolor=\"white\"><center><h1>403 Forbidden</h1></center><hr><center>nginx/1.10.3</center></body></html>"

@evelynl94
Copy link
Collaborator

Could be because of this.

Maybe the request kraken-agent is seeing is not actually from localhost (for example, docker on mac uses a default bridge 172.17.0.1). You can probably see the actually client IP if you enable debug here.

@zcc35357949
Copy link

Could be because of this.

Maybe the request kraken-agent is seeing is not actually from localhost (for example, docker on mac uses a default bridge 172.17.0.1). You can probably see the actually client IP if you enable debug here.

I remove deny all in nginx/config/agent.go, but I still can not pull library image from docker hub..

# docker pull localhost:16000/library/busybox:latest
Error response from daemon: manifest for localhost:16000/library/busybox:latest not found

this time, I can push & pull images by proxy port 15000.

# docker pull localhost:15000/library/busybox:latest
latest: Pulling from library/busybox
697743189b6d: Pull complete 
Digest: sha256:4415a904b1aca178c2450fd54928ab362825e863c0ad5452fd020e92f7a6a47e
Status: Downloaded newer image for localhost:15000/library/busybox:latest
# docker push localhost:15000/library/busybox:latest
The push refers to a repository [localhost:15000/library/busybox]
adab5d09ba79: Layer already exists 
latest: digest: sha256:4415a904b1aca178c2450fd54928ab362825e863c0ad5452fd020e92f7a6a47e size: 527

Could you give me some suggestions?Looking forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Documentation
Projects
None yet
Development

No branches or pull requests

4 participants