Skip to content

Commit 65dc8e4

Browse files
committed
Debug elastcisearch8 connection
1 parent aff8b7e commit 65dc8e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Elasticsearch/Setup/Validator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ public function validate(): array
3737
{
3838
$errors = [];
3939
try {
40-
$client = $this->clientResolver->create();
4140
echo "Check elasticsearch8 server up or not with command line\n";
4241
shell_exec("curl localhost:9200/");
43-
42+
4443
$output = shell_exec('netstat -tuln');
4544
echo "<pre>$output</pre>";
45+
46+
$client = $this->clientResolver->create();
4647
if (!$client->testConnection()) {
4748
$errors[] = 'Could not validate a connection to Elasticsearch.'
4849
. ' Verify that the Elasticsearch host and port are configured correctly.';

0 commit comments

Comments
 (0)