I am also experiencing this problem, with the IOException trying to
write to /usr/share/elasticsearch/data/elasticsearch/nodes/49 when
$ sudo -u elasticsearch bash -x /usr/share/elasticsearch/bin/elasticsearch.
My /etc/elasticsearch/elasticsearch.yml does not have path.data set (it
is unchanged from what is shipped with the package; indeed, I haven't
touched anything in the package, and did not previously have upstream's
package installed either). I can see that /etc/init.d/elasticsearch sets
the DATA_DIR to /var/lib/elasticsearch, but nothing is written there.
This is the maintainer address of Debian's Java team
debian-j...@lists.debian.org for discussions and questions.