i’ve got the same issue and spend plenty of time resolving this.
in my case my proxy block the installation of the mapper-attachment.
then i’ve got an failure by creating the searchindex (sudo zammad run rake searchindex:rebuild), only because the service of elasticsearch wasn´t restarted and enabled, but running.
with a “clean” internet connection, using the discription at https://docs.zammad.org/en/latest/install-elasticsearch.html it worked for me. only use elasticsearch 2.4 or 5.5 and don´t update this (delete it from the /etc/apt/sources.list.d/elastic-5.x.list). Because every time the Error comes again…