Debugging Elasticsearch Start-up

After doing an Ansible update of an Elasticsearch host, Elasticsearch wouldn't start at all. The only thing I got from it was "check the logs" but there was nothing in /var/log/elasticsearch/ . Kind of hard to debug. A bit of searching online got me to run from the command line (as root):

# /usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch/elasticsearch.pid --default.config=/etc/elasticsearch/elasticsearch.yml --default.path.home=/usr/share/elasticsearch --default.path.logs=/var/log/elasticsearch --default.path.data=/var/lib/elasticsearch --default.path.work=/tmp/elasticsearch --default.path.conf=/etc/elasticsearch

I presume this is essentially what the startup script (ie. /etc/init.d/elasticsearch start or systemctl start elasticsearch) would do. In my case, it caught a rather critical error: I had created the config files with Jinja2 filters (Ansible) and it had left a Jinja2 comment ({# comment #}) in the file ... making Elasticsearch unable to parse it. I don't know why and have to investigate, but removing the Jinja2 comment fixed the problem.