I found a possible bug whereby Elasticsearch won't start (results in "Failed!" when starting the daemon using Debian) if the hostname is greater than approximately 26 letters.
Does this seem possible?
I'm creating 3-node clusters of the following hostname combinations, and below I've listed where the server will start or won't.
(#=single digit node number e.g. 1,2,3)
elasticsearch-#-vm works
elasticsearch-2-elasticsearch-#-vm fails
elasticsearch-3-elasticsearch-#-vm fails
e2lasticsearch-#-vm works
elasticsearchelasticsearch-#-vm fails
elasti-#-vm works
I get the elusive "Failed!" message when service elasticsearch start is run on any instance in the cluster if the yml file includes 3 "long" hostnames in the zen.hosts string.
Just to make sure I'm using zen.hosts correctly, using the example elasticsearch1-elasticsearch-#-vm, I would put the following in the yml file:
I am NOT listing port numbers. I didn't before and never had an issue.
I have no problems starting elasticsearch when the hostname is short and /_cluster/health shows 3 data nodes with a green status.
I do not get any error logs entries in the log files in /var/log/elasticsearch/*
To give you some more background, I'm updating the click to deploy feature on the Google Console and we now support multiple deployments per project. As a result we ask the user for a deployment name and autopopulate the name elasticsearchn. We insert the deployment name as a prefix to the instance name to avoid instance name conflicts. Therefore the deployment name elasticsearch1 will create the following instances:
This has never been an issue with the current click to deploy version because we capped instance names to about ~20 characters and there was no prefix. this is what's leading me to think the hostname needs to be shorter.
Aug 26 06:29:06 elasticsearchelasticsearch-1-vm rsyslogd-2177: imuxsock begins to drop messages from pid 2554 due to rate-limiting
Aug 26 06:29:06 elasticsearchelasticsearch-1-vm safe_format_and_mount: Running: mount -o discard,defaults /dev/disk/by-id/google-elasticsearchelasticsearch-1-vm-data /elasticsearch
Aug 26 06:29:06 elasticsearchelasticsearch-1-vm kernel: [ 24.347134] EXT4-fs (sdb): mounted filesystem with ordered data mode. Opts: discard
Aug 26 06:30:03 elasticsearchelasticsearch-1-vm dbus[2057]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)
Aug 26 06:30:04 elasticsearchelasticsearch-1-vm dbus[2057]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)
Aug 26 06:30:04 elasticsearchelasticsearch-1-vm polkitd[3104]: started daemon version 0.105 using authority implementation local' version0.105'
Aug 26 06:30:04 elasticsearchelasticsearch-1-vm dbus[2057]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Aug 26 06:30:04 elasticsearchelasticsearch-1-vm dbus[2057]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
cpomeroy@elasticsearchelasticsearch-1-vm:~$ cat /var/log/daemon
cat: /var/log/daemon: No such file or directory
cpomeroy@elasticsearchelasticsearch-1-vm:~$ cat /var/log/upstart
cat: /var/log/upstart: No such file or directory
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.