fix rebooting issue

like 7e4a25015 but for elasticsearch.