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

In cli mode of docker container, set autodetectCluster=true to cause read access timeout #316

Open
siyecoo opened this issue Jan 12, 2022 · 6 comments

Comments

@siyecoo
Copy link

siyecoo commented Jan 12, 2022

In cli mode of docker container, set autodetectCluster=true to cause read access timeout
go
image

image
The method here performs the IP address read into the container, resulting in a timeout that occurs when the container is deployed

@siyecoo
Copy link
Author

siyecoo commented Jan 12, 2022

image

@yii-bot
Copy link

yii-bot commented Jan 12, 2022

Thanks for posting in our issue tracker.
In order to properly assist you, we need additional information:

  • When does the issue occur?
  • What do you see?
  • What was the expected result?
  • Can you supply us with a stacktrace? (optional)
  • Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)

Thanks!

This is an automated comment, triggered by adding the label status:need more info.

@samdark
Copy link
Member

samdark commented Jan 12, 2022

Sounds like a very specific environment is needed to reproduce it. Would you please provide a bit more details on the problem so this specifity isn't required? Maybe a unit test?

@siyecoo
Copy link
Author

siyecoo commented Jan 12, 2022

I can give an example of my application scenario

My Yii project is deployed in the docker container, and elasticsearch is also deployed in one container. The two containers are under the same network. When I configure components, the configured node node is 127.0.0.1:9200 (ports have been mapped between the host and the container). In the PHP FPM scenario, when I execute model:: findone ($ID), there is no problem with the data, When the problem occurs in cli mode, I know through breakpoint printing that the problem is that when the variable autodetectcluster is set to true, the code executes to the file yiisoft / yii2-elasticsearch / connection In the open() method under PHP, $this - > populatenodes(), this method will trigger $response = $this - > httprequest ('Get ', "$protocol: / / $host / _nodes / _all / HTTP"); As a result, the node node will be u 。
Please look at my screenshot above

@samdark
Copy link
Member

samdark commented Jan 12, 2022

So there is a timeout during container deployed? How should it behave in this case?

@schmunk42
Copy link
Contributor

When the problem occurs in cli mode

How do you run cli mode? Via docker exec or docker run - should be exec, otherwise you'll spin up a new container which might cause issues.

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

No branches or pull requests

4 participants