My json file was formatted exactly because the one during the dilemma but none of the methods here labored out. At last I discovered a workaround on another Stackoverflow thread. "struggling to verify the very first certificate" when connecting to elasticsearch from nodejs utilizing self-generated certificates See additional linked queries https://vona209jwh2.blog5star.com/profile