- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我遇到了Linux和Windows之间的部署差异的问题。我有以下Docker-Compose文件:
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.0
ports:
- 9200:9200
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
environment:
discovery.type: single-node
cluster.routing.allocation.disk.threshold_enabled: "false"
networks:
logmetric:
kibana:
image: docker.elastic.co/kibana/kibana:6.3.0
ports:
- 5601:5601
networks:
logmetric:
depends_on:
- elasticsearch
influxdb:
image: influxdb
ports:
- 8086:8086
volumes:
# Data persistency
- influxdb_data:/var/lib/influxdb
networks:
logmetric:
grafana:
image: grafana/grafana
ports:
- 3000:3000
volumes:
# Data persistency
- grafana_data:/var/lib/grafana
networks:
logmetric:
volumes:
elasticsearch_data:
influxdb_data:
grafana_data:
networks:
logmetric:
driver: 'bridge'
Docker-Compose -f compose_logging.yaml up
时,一切正常旋转,并且所有服务都在工作。
但是,如果我将这个yaml文件转移到我的linux计算机(CentOS 8)上并执行相同的命令,则,Kibana无法连接到 flex 搜索数据库。我收到错误:
kibana_1 | {"type":"log","@timestamp":"2020-04-03T21:41:42Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"} kibana_1 | {"type":"log","@timestamp":"2020-04-03T21:41:42Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{
"name" : "CQ7jdN0",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "swSAp0kUR7iQpqTpW3Iv_g",
"version" : {
"number" : "6.3.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "424e937",
"build_date" : "2018-06-11T23:38:03.357887Z",
"build_snapshot" : false,
"lucene_version" : "7.3.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
docker inspect andy_logmetric
)上进行检查,则会得到
LINUX 网络的以下信息:
[andy@Dev_Linux ~]$ docker inspect andy_logmetric
[
{
"Name": "andy_logmetric",
"Id": "1d6544f05915e1673c5f541bcfe024fc3ad3d445cba43f0109a4bbd1e9faf9a0",
"Created": "2020-04-03T15:59:24.036741117-04:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"091975207ec170c3c98223030add8f9b134f35b1aa05fd2016a31d985c73bc7f": {
"Name": "andy_elasticsearch_1",
"EndpointID": "b8263230459db25d873a79dff94e7d6b0a3cb8a2ed6bfff149559b54748e93cc",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/16",
"IPv6Address": ""
},
"10a22cc7ef65897417f58e0928598066ad899f25d43e2429c903282f5e74cef2": {
"Name": "andy_kibana_1",
"EndpointID": "1f8998efd1c61a40b9876ffd6502f0ec371ec926b5cd1e7851bd6dd31074c1c5",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/16",
"IPv6Address": ""
},
"542d6b764b084d99895f89c881aaf6fdf42edf63494edcd233dd35445706e3fc": {
"Name": "andy_influxdb_1",
"EndpointID": "4247f8fcb961e75fab6662133df9eb012a70707757db5ea6c37d7812c018f520",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"e6fead6035cdb7b60e81114f124fa87084b7eb6b92c9b3800e66072dbcc82ba3": {
"Name": "andy_grafana_1",
"EndpointID": "9a0c892237fe891ef6e714bf8292857c9e2d68ac0f6abd7a99eba6daf6971f3c",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "logmetric",
"com.docker.compose.project": "andy",
"com.docker.compose.version": "1.25.4"
}
}
]
PS C:\Users\Michael> docker inspect docker-composefiles_logmetric
[
{
"Name": "docker-composefiles_logmetric",
"Id": "d1bebbe4e73097fb6dcb4ab15750e2689e2e57da83e880b065063dcde055e576",
"Created": "2020-04-03T21:24:14.531822721Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0820891e073e7e05cbcc7ab834cc599c640e6518bb36c848052b6a6c11b5c069": {
"Name": "docker-composefiles_grafana_1",
"EndpointID": "4e2c85709e89fd4b3bb609fc53eb4a4538b1fd93e51cfd73d8dc030d7707d6e3",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"8ada45e8a940102fe3145dee290af2da06d46d8bd465411da48bddf18d22167a": {
"Name": "docker-composefiles_elasticsearch_1",
"EndpointID": "5cc9b924eb46a7bc1bc07d3985779a1e0bf9ac4012c12333d6cbb96e3f78af2d",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/16",
"IPv6Address": ""
},
"902bec9dc51e542589a3da1f13648a3434bc2d10b6c5755adfa545d813032c18": {
"Name": "docker-composefiles_influxdb_1",
"EndpointID": "a0e5e49121616590260b04932b6943601f06dc3200564f9155ce2f2281625cf9",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
},
"c054af26402fcbee5c9e727b8a3e8b009fd258734f060e1fc9dc19ade5f7f3fa": {
"Name": "docker-composefiles_kibana_1",
"EndpointID": "3f57dcaefde331cfa7bdc862f45a0dc95829cb89604b28347d8c452f0f60f396",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "logmetric",
"com.docker.compose.project": "docker-composefiles",
"com.docker.compose.version": "1.25.4"
}
}
]
Docker version 19.03.8, build afacb8b
[andy@Dev_Linux ~]$ docker-compose --version
docker-compose version 1.25.4, build 8d51620a
Docker version 19.03.8, build afacb8b
PS C:\Users\Michael> docker-compose --version
docker-compose version 1.25.4, build 8d51620a
最佳答案
检查此链接:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-prod-prerequisites
我记得在centos上遇到麋鹿问题,并且在主机上设置内核参数很有帮助。
Docker编写仅仅是docker命令本身上出现的python脚本,因此问题不在于此。事实很可能是,在Windows上您可能使用的是docker-machine,这是linux hyper-v vm,而在centos上则是真正的linux,因此有所不同。
您还可以检查docker log [container name]
以查看elasticsearch在控制台上是否未显示任何警告。
您可以尝试的另一种检查方法是使用docker exec -it /bin/sh
放入容器并ping其他容器。 Docker使用系统内部创建的网络,因此,如果网络中您的centos服务器位于与docker创建的子网相同的子网中,则主机路由机制可能会将数据包发送到“真实”网络,而不是在docker内部。
关于docker - Linux和Windows上的Docker-Compose之间有区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61021063/
我需要修复 getLineNumberFor 方法,以便如果 lastName 的第一个字符位于 A 和 M 之间,则返回 1;如果它位于 N 和 Z 之间,则返回 2。 在我看来听起来很简单,但我不
您好,感谢您的帮助!我有这个: 0 我必须在每次点击后增加“pinli
Javascript 中是否有一种方法可以在不使用 if 语句的情况下通过 switch case 结构将一个整数与另一个整数进行比较? 例如。 switch(integer) { case
我有一列是“日期”类型的。如何在自定义选项中使用“之间”选项? 最佳答案 请注意,您有2个盒子。 between(在SQL中)包含所有内容,因此将框1设置为:DATE >= startdate,将框2
我有一个表,其中包含年、月和一些数字列 Year Month Total 2011 10 100 2011 11 150 2011 12 100 20
这个问题已经有答案了: Extract a substring between double quotes with regular expression in Java (2 个回答) how to
我有一个带有类别的边栏。正如你在这里看到的:http://kees.een-site-bouwen.nl/ url 中类别的 ID。带有 uri 段(3)当您单击其中一个类别时,例如网页设计。显示了一
这个问题在这里已经有了答案: My regex is matching too much. How do I make it stop? [duplicate] (5 个答案) 关闭 4 年前。 我
我很不会写正则表达式。 我正在尝试获取括号“()”之间的值。像下面这样的东西...... $a = "POLYGON((1 1,2 2,3 3,1 1))"; preg_match_all("/\((
我必须添加一个叠加层 (ImageView),以便它稍微移动到包含布局的左边界的左侧。 执行此操作的最佳方法是什么? 尝试了一些简单的方法,比如将 ImageView 放在布局中并使用负边距 andr
Rx 中是否有一些扩展方法来完成下面的场景? 我有一个开始泵送的值(绿色圆圈)和其他停止泵送的值(簧片圆圈),蓝色圆圈应该是预期值,我不希望这个命令被取消并重新创建(即“TakeUntil”和“Ski
我有一个看起来像这样的数据框(Dataframe X): id number found 1 5225 NA 2 2222 NA 3 3121 NA 我有另一个看起来
所以,我正在尝试制作正则表达式,它将解析存储在对象中的所有全局函数声明,例如,像这样 const a = () => {} 我做了这样的事情: /(?:const|let|var)\s*([A-z0-
我正在尝试从 Intellivision 重新创建 Astro-Smash,我想让桶保持在两个 Angular 之间。我只是想不出在哪里以及如何让这个东西停留在两者之间。 我已经以各种方式交换了函数,
到处检查但找不到答案。 我有这个页面,我使用 INNER JOIN 将两个表连接在一起,获取它们的值并显示它们。我有这个表格,用来获取变量(例如开始日期、结束日期和卡号),这些变量将作为从表中调用值的
我陷入了两个不同的问题/错误之间,无法想出一个合适的解决方案。任何帮助将不胜感激 上下文、FFI 和调用大量 C 函数,并将 C 类型包装在 rust 结构中。 第一个问题是ICE: this pat
我在 MySQL 中有一个用户列表,在订阅时,时间戳是使用 CURRENT_TIMESTAMP 在数据库中设置的。 现在我想从此表中选择订阅日期介于第 X 天和第 Y 天之间的表我尝试了几个查询,但不
我的输入是开始日期和结束日期。我想检查它是在 12 月 1 日到 3 月 31 日之间。(年份可以更改,并且只有在此期间内或之外的日期)。 到目前为止,我还没有找到任何关于 Joda-time 的解决
我正在努力了解线程与 CPU 使用率的关系。有很多关于线程与多处理的讨论(一个很好的概述是 this answer )所以我决定通过在运行 Windows 10、Python 3.4 的 8 CPU
我正在尝试编写 PHP 代码来循环遍历数组以创建 HTML 表格。我一直在尝试做类似的事情: fetchAll(PDO::FETCH_ASSOC); ?>
我是一名优秀的程序员,十分优秀!