代码之家  ›  专栏  ›  技术社区  ›  Xavi Font

请求不带curl标志的容器化OpenSearch

  •  1
  • Xavi Font  · 技术社区  · 2 年前

    我可以通过 curl -XGET https://localhost:9200 -u 'admin:admin' --insecure 但当我想自动化对它的请求时没有用……我需要能够访问它,即使通过HTTP也是可以的(不安全意味着不是HTTPS)。

    命令:

    curl -XGET https://localhost:9200
    

    error:
        curl: (60) SSL certificate problem: unable to get local issuer certificate
        More details here: https://curl.se/docs/sslcerts.html
    
    curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above.
    

    我确实进入了那个环节,而不是一个解决方案,只是一个解释,让我陷入了一个兔子洞,我刚刚能够走出。

    可怕的是,这件事以前发生在我身上,我修复了它,但它不在码头集装箱上,我不记得我是如何修复的。

    0 回复  |  直到 2 年前
        1
  •  0
  •   Romain Prévost    2 年前

    你可以 disable security 在Dockerfile中:

    RUN echo "plugins.security.disabled: true" >> /usr/share/opensearch/config/opensearch.yml
    

    您的OpenSearch将通过http://localhost:9200之后我这样做是为了设置我的数据,然后将/usr/share/opensearch/data加载到另一个设置了安全性的容器中。