Comments (6)
This is the expected behavior. If the extension retried connections to different nodes, this would be a debugging nightmare. If you need that kind of behavior, set up a coordinator node in your cluster:
from yii2-elasticsearch.
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
.
from yii2-elasticsearch.
'elasticsearch' => [
'class' => 'yii\\elasticsearch\\Connection',
'nodes' => [
['http_address' => '172.17.129.190:9200'],
['http_address' => '172.17.129.179:9200'],
// configure more hosts if you have a cluster
],
// set autodetectCluster to false if you don't want to auto detect nodes
'autodetectCluster' => true,
'dslVersion' => 5, // default is 5
],
When the first node hangs up, the system reports an error。
Elasticsearch Database Exception – yii\elasticsearch\Exception
Elasticsearch request failed: 7 - Failed to connect to 172.17.129.190 port 9200: Connection refused
Error Info: Array
(
[requestMethod] => GET
[requestUrl] => http://172.17.129.190:9200/_nodes/_all/http
[requestBody] =>
[responseHeaders] => Array
(
)
[responseBody] =>
)
So have to make sure that the first node works ?
Won't the cluster switch automatically?
from yii2-elasticsearch.
'elasticsearch' => [ 'class' => 'yii\\elasticsearch\\Connection', 'nodes' => [ ['http_address' => '172.17.129.190:9200'], ['http_address' => '172.17.129.179:9200'], // configure more hosts if you have a cluster ], // set autodetectCluster to false if you don't want to auto detect nodes 'autodetectCluster' => true, 'dslVersion' => 5, // default is 5 ],
When the first node hangs up, the system reports an error。
Elasticsearch Database Exception – yii\elasticsearch\Exception Elasticsearch request failed: 7 - Failed to connect to 172.17.129.190 port 9200: Connection refused Error Info: Array ( [requestMethod] => GET [requestUrl] => http://172.17.129.190:9200/_nodes/_all/http [requestBody] => [responseHeaders] => Array ( ) [responseBody] => )
So have to make sure that the first node works ?
Won't the cluster switch automatically?
@knut
@samdark
@yii-bot
@nergal
from yii2-elasticsearch.
Please don't call out people like that, it's not Twitter.
As far as I can see in the code node must reply with non-500 status to switch to a different one. I'm not sure why it's like that since it would be logical to skip it as well. I'm not expert in ES though.
from yii2-elasticsearch.
This is the expected behavior. If the extension retried connections to different nodes, this would be a debugging nightmare. If you need that kind of behavior, set up a coordinator node in your cluster:
If so, what is the point of cluster configuration?
'nodes' => [
['http_address' => '172.17.129.190:9200'],
['http_address' => '172.17.129.179:9200'],
// configure more hosts if you have a cluster
],
from yii2-elasticsearch.
Related Issues (20)
- How to add synonyms in ES? HOT 3
- Problem in creating index even I have one mapping array HOT 3
- There is a problem with the spliced URL when using delete HOT 3
- Fix tests
- Elasticsearch request failed: 2 - easy handle already used in multi handle HOT 2
- Add Support for Runtime Mappings HOT 2
- In cli mode of docker container, set autodetectCluster=true to cause read access timeout HOT 6
- Error on document update HOT 2
- Support Elasticsearch 8.x HOT 1
- Type in delete by query command HOT 2
- Wrong parsing for publish_address HOT 9
- The new curlOptions in 2.1.4 does not work
- ErrorException: Return type of yii\elasticsearch\BatchQueryResult::current() incompatible with Iterator::current(): mixed HOT 2
- update github folder link
- update docs folder links
- update tests folder links
- update root folder links
- auth connection error HOT 2
- There is a bug here HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-elasticsearch.