版本
- 磁性:2.4.4
- 打开搜索:1.2.4
- 代客泊车2.3.1
- PHP 7.4语言
- 扩展坞4.10.1
- curl 度7.79.1
当我试着 curl 时,我会出现以下错误
$ curl -u admin:admin -i https://localhost:9200/_cluster/health
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.
如果我在curl中使用--insecure
标签,它就可以工作,但是在Magento中不允许这样做,所以我真的不知道该怎么做。
这里的错误,我得到在Magento运行重新索引或安装升级
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
以下是我在Magento 2 env.php文件中的ElasticSearch设置
'elasticsearch7_server_hostname' => 'https://localhost',
'elasticsearch7_server_port' => '9200',
'elasticsearch7_index_prefix' => 'test',
'elasticsearch7_enable_auth' => '1',
'elasticsearch7_server_timeout' => '15',
'elasticsearch7_username' => 'admin',
'elasticsearch7_password' => 'admin'
但它不会在Magento连接,因为端口9200没有有效的证书,即使我的根域。我有我的Magento网站运行在代客泊车和我的opensearch是通过一个Docker容器运行。
有人能请帮助我一直试图修复这些这么长时间,我是相当新的张贴在这里,所以如果我错过了任何信息只是说,我会添加它。
干杯干杯干杯
更新日期:
我尝试过使用这种方法https://opensearch.org/docs/latest/security-plugin/configuration/disable/,但由于某种原因,我没有opensearch.yml或opensearch文件夹,即使它列在我的docker文件中
$ cd /usr/share/opensearch
cd: no such file or directory: /usr/share/opensearch
My docker-compose.yml
opensearch-node1:
image: opensearchproject/opensearch:1.2.4
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_master_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- opensearch-net
2条答案
按热度按时间hgqdbh6s1#
配置文件位于/etc/opensearch文件夹中
kq4fsx7k2#
我知道也许我来晚了,但是您可以使用
plugins.security.disabled=false
禁用HTTPS。例如,如果您遵循opensearch documentation for docker,当它显示运行容器的命令时,只需添加plugins.security.disabled=false
:docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" opensearchproject/opensearch:latest
这样,我就可以在本地计算机上使用
http://localhost:9200
进行工作。