That is the weird thing, what you see in that SO question is my logs, it
starts with the first node and then I restart, there are no errors or
warnings, nothing really.
The only way I know something is wrong is because it gives me the 503 when
I come to query and of course HQ plugin says the status is red.
Other than that there is no indication from elastic itself that anything is
wrong.
The exact commands I executed where:
sam@ubuntu:~/elasticsearch-0.90.8/bin$ sudo ./elasticsearch
After having downloaded the source, then I run my index setup script:
<?php
function p($message){
print $message . "\n";
}
require '../glue/components/vendor/autoload.php';
$client = new Elasticsearch\Client();
$init = false;
p("OK! Setting up Elastic Search");
if($client->indices()->exists(array('index' => 'main')) &&
in_array('--reindex', $_SERVER['argv'])){
p("Deleting the index...");
var_dump($client->indices()->delete(array('index' => 'main')));
p("Sleeping 10 seconds to let the delete take effect");
sleep(10);
}
if(!$client->indices()->exists(array('index' => 'main')) ||
in_array('--reindex', $_SERVER['argv'])){
p("Creating the index...");
var_dump($client->indices()->create(array(
'index' => 'main',
'body' => array(
'settings' => array(
'number_of_shards' => 5,
'number_of_replicas' => 2,
'analysis' => array(
'analyzer' => array(
'noStopFilter' => array(
'tokenizer' => 'standard',
'filter' => array("standard", "lowercase"),
)
)
)
)
))));
$init = true;
p("Sleeping 10 seconds to let the index take effect");
sleep(10);
}
if(in_array('--reindex', $_SERVER['argv']) || in_array('--remap',
$_SERVER['argv']) || $init){
p('Adding the mapping...');
var_dump($client->indices()->putMapping(array(
'index' => 'main',
'type' => '_default_',
'body' => array(
'_default_' => array(
'properties' => array(
'title' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'userId' => array(
'type' => 'string',
'index' => 'not_analyzed'
),
'username' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'tags' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
)
)
)
)
)));
var_dump($client->indices()->putMapping(array(
'index' => 'main',
'type' => 'help',
'body' => array(
'help' => array(
'properties' => array(
'title' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'normalisedTitle' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'path' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'username' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
),
'tags' => array(
'type' => 'string',
'analyzer' => 'noStopFilter'
)
)
)
)
)));
p('done adding the mapping');
}
p('done setting up Elastic Search...let\'s see if it works');
And then I search for a program on the port:
sudo netstat -lpn |grep :9200
And simply kill it:
sudo kill 9567
with 9567 being the process id.
and then rerun the first command:
sam@ubuntu:~/elasticsearch-0.90.8/bin$ sudo ./elasticsearch
And that is when I get status red.
On Sunday, 22 December 2013 17:00:01 UTC, Jörg Prante wrote:
>
> Can you provide your logs for review somewhere, and the exact sequence of
> commands you executed? Thanks.
>
> Jörg
>
>
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/60bd35f3-1629-4d39-95bb-c5e73cc4d421%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.