- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 docker 上运行 Elasticsearch
我为与 mysql 容器连接的 rails 应用程序构建了一个容器
我想将这个 rails 容器与弹性容器连接起来
但我收到这个错误
无法打开到 localhost:9200 的 TCP 连接(无法分配请求的地址 - “localhost”端口 9200 的 connect(2))
当我运行 docker-compose up
这些网址工作正常
http://localhost:3000/
http://localhost:9200/
但我在这个网址上遇到了那个错误
http://localhost:3000/messages
无法打开到 localhost:9200 的 TCP 连接(无法分配请求的地址 - “localhost”端口 9200 的 connect(2))
我想从这个网址得到回复
http://localhost:3000/messages
我怎样才能打开端口 9200 ??????????????
这是我的 docker-compose.yml 文件
version: '2'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: chat_system
MYSQL_USER: appuser
MYSQL_PASSWORD: password
ports:
- "3307:3306"
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
environment:
TAKE_FILE_OWNERSHIP: "true"
network.host: "0.0.0.0"
http.port: "9200"
transport.host: localhost
transport.tcp.port: "9300"
xpack.ml.enabled: "false"
# volumes:
# - ./.data/elastic:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
ulimits:
nofile:
soft: "65536"
hard: "65536"
app:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- ".:/chat_system"
ports:
- "3000:3000"
depends_on:
- db
- elastic
links:
- db
- elastic
environment:
DB_USER: root
DB_NAME: chat_system
DB_PASSWORD: password
DB_HOST: db
ELASTIC_HOST: "localhost"
ELASTIC_PORT: "9200"
sudo docker-compose logs elastic
Attaching to docker_chat_elastic_1
elastic_1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
elastic_1 | [2019-09-24T17:58:29,261][INFO ][o.e.n.Node ] [] initializing ...
elastic_1 | [2019-09-24T17:58:29,722][INFO ][o.e.e.NodeEnvironment ] [WwjX-hI] using [1] data paths, mounts [[/ (overlay)]], net usable_space [735.2gb], net total_space [895.5gb], types [overlay]
elastic_1 | [2019-09-24T17:58:29,723][INFO ][o.e.e.NodeEnvironment ] [WwjX-hI] heap size [989.8mb], compressed ordinary object pointers [true]
elastic_1 | [2019-09-24T17:58:29,729][INFO ][o.e.n.Node ] [WwjX-hI] node name derived from node ID [WwjX-hIPSZ-7L9XS1bYQFA]; set [node.name] to override
elastic_1 | [2019-09-24T17:58:29,730][INFO ][o.e.n.Node ] [WwjX-hI] version[6.4.0], pid[1], build[default/tar/595516e/2018-08-17T23:18:47.308994Z], OS[Linux/4.4.0-142-generic/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13]
elastic_1 | [2019-09-24T17:58:29,731][INFO ][o.e.n.Node ] [WwjX-hI] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.arEsgr84, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
elastic_1 | [2019-09-24T17:58:31,488][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [aggs-matrix-stats]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [analysis-common]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [ingest-common]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-expression]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-mustache]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-painless]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [mapper-extras]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [parent-join]
elastic_1 | [2019-09-24T17:58:31,489][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [percolator]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [rank-eval]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [reindex]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [repository-url]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [transport-netty4]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [tribe]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-core]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-deprecation]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-graph]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-logstash]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-ml]
elastic_1 | [2019-09-24T17:58:31,490][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-monitoring]
elastic_1 | [2019-09-24T17:58:31,491][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-rollup]
elastic_1 | [2019-09-24T17:58:31,491][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-security]
elastic_1 | [2019-09-24T17:58:31,491][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-sql]
elastic_1 | [2019-09-24T17:58:31,491][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-upgrade]
elastic_1 | [2019-09-24T17:58:31,491][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-watcher]
elastic_1 | [2019-09-24T17:58:31,492][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded plugin [ingest-geoip]
elastic_1 | [2019-09-24T17:58:31,492][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded plugin [ingest-user-agent]
elastic_1 | [2019-09-24T17:58:33,514][WARN ][o.e.d.s.ScriptModule ] Script: returning default values for missing document values is deprecated. Set system property '-Des.scripting.exception_for_missing_value=true' to make behaviour compatible with future major versions.
elastic_1 | [2019-09-24T17:58:35,286][INFO ][o.e.x.s.a.s.FileRolesStore] [WwjX-hI] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]
elastic_1 | [2019-09-24T17:58:36,476][INFO ][o.e.d.DiscoveryModule ] [WwjX-hI] using discovery type [zen]
elastic_1 | [2019-09-24T17:58:37,104][INFO ][o.e.n.Node ] [WwjX-hI] initialized
elastic_1 | [2019-09-24T17:58:37,105][INFO ][o.e.n.Node ] [WwjX-hI] starting ...
elastic_1 | [2019-09-24T17:58:37,256][INFO ][o.e.t.TransportService ] [WwjX-hI] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
elastic_1 | [2019-09-24T17:58:40,338][INFO ][o.e.c.s.MasterService ] [WwjX-hI] zen-disco-elected-as-master ([0] nodes joined)[, ], reason: new_master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{iaR_00fyTMuqfMiCpiq1UQ}{localhost}{127.0.0.1:9300}{xpack.installed=true}
elastic_1 | [2019-09-24T17:58:40,343][INFO ][o.e.c.s.ClusterApplierService] [WwjX-hI] new_master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{iaR_00fyTMuqfMiCpiq1UQ}{localhost}{127.0.0.1:9300}{xpack.installed=true}, reason: apply cluster state (from master [master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{iaR_00fyTMuqfMiCpiq1UQ}{localhost}{127.0.0.1:9300}{xpack.installed=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)[, ]]])
elastic_1 | [2019-09-24T17:58:40,359][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [WwjX-hI] publish_address {172.18.0.2:9200}, bound_addresses {0.0.0.0:9200}
elastic_1 | [2019-09-24T17:58:40,359][INFO ][o.e.n.Node ] [WwjX-hI] started
elastic_1 | [2019-09-24T17:58:40,672][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [WwjX-hI] Failed to clear cache for realms [[]]
elastic_1 | [2019-09-24T17:58:40,751][INFO ][o.e.g.GatewayService ] [WwjX-hI] recovered [0] indices into cluster_state
elastic_1 | [2019-09-24T17:58:42,283][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.watch-history-9] for index patterns [.watcher-history-9*]
elastic_1 | [2019-09-24T17:58:42,437][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.watches] for index patterns [.watches*]
elastic_1 | [2019-09-24T17:58:42,665][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.triggered_watches] for index patterns [.triggered_watches*]
elastic_1 | [2019-09-24T17:58:42,859][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-6-*]
elastic_1 | [2019-09-24T17:58:43,045][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.monitoring-es] for index patterns [.monitoring-es-6-*]
elastic_1 | [2019-09-24T17:58:43,305][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.monitoring-alerts] for index patterns [.monitoring-alerts-6]
elastic_1 | [2019-09-24T17:58:44,163][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.monitoring-beats] for index patterns [.monitoring-beats-6-*]
elastic_1 | [2019-09-24T17:58:44,422][INFO ][o.e.c.m.MetaDataIndexTemplateService] [WwjX-hI] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-6-*]
elastic_1 | [2019-09-24T17:58:45,050][INFO ][o.e.l.LicenseService ] [WwjX-hI] license [9f6ac6c0-620a-4b71-b3e7-da5bb37b8337] mode [basic] - valid
elastic_1 | [2019-09-24T18:00:15,514][INFO ][o.e.n.Node ] [WwjX-hI] stopping ...
elastic_1 | [2019-09-24T18:00:15,525][INFO ][o.e.x.w.WatcherService ] [WwjX-hI] stopping watch service, reason [shutdown initiated]
elastic_1 | [2019-09-24T18:00:15,764][INFO ][o.e.n.Node ] [WwjX-hI] stopped
elastic_1 | [2019-09-24T18:00:15,764][INFO ][o.e.n.Node ] [WwjX-hI] closing ...
elastic_1 | [2019-09-24T18:00:15,770][INFO ][o.e.n.Node ] [WwjX-hI] closed
elastic_1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
elastic_1 | [2019-09-24T18:00:28,430][INFO ][o.e.n.Node ] [] initializing ...
elastic_1 | [2019-09-24T18:00:28,776][INFO ][o.e.e.NodeEnvironment ] [WwjX-hI] using [1] data paths, mounts [[/ (overlay)]], net usable_space [735.1gb], net total_space [895.5gb], types [overlay]
elastic_1 | [2019-09-24T18:00:28,777][INFO ][o.e.e.NodeEnvironment ] [WwjX-hI] heap size [989.8mb], compressed ordinary object pointers [true]
elastic_1 | [2019-09-24T18:00:28,782][INFO ][o.e.n.Node ] [WwjX-hI] node name derived from node ID [WwjX-hIPSZ-7L9XS1bYQFA]; set [node.name] to override
elastic_1 | [2019-09-24T18:00:28,783][INFO ][o.e.n.Node ] [WwjX-hI] version[6.4.0], pid[1], build[default/tar/595516e/2018-08-17T23:18:47.308994Z], OS[Linux/4.4.0-142-generic/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13]
elastic_1 | [2019-09-24T18:00:28,783][INFO ][o.e.n.Node ] [WwjX-hI] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.wSQUCcFj, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
elastic_1 | [2019-09-24T18:00:30,057][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [aggs-matrix-stats]
elastic_1 | [2019-09-24T18:00:30,057][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [analysis-common]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [ingest-common]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-expression]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-mustache]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [lang-painless]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [mapper-extras]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [parent-join]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [percolator]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [rank-eval]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [reindex]
elastic_1 | [2019-09-24T18:00:30,058][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [repository-url]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [transport-netty4]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [tribe]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-core]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-deprecation]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-graph]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-logstash]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-ml]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-monitoring]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-rollup]
elastic_1 | [2019-09-24T18:00:30,059][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-security]
elastic_1 | [2019-09-24T18:00:30,060][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-sql]
elastic_1 | [2019-09-24T18:00:30,060][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-upgrade]
elastic_1 | [2019-09-24T18:00:30,060][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded module [x-pack-watcher]
elastic_1 | [2019-09-24T18:00:30,060][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded plugin [ingest-geoip]
elastic_1 | [2019-09-24T18:00:30,060][INFO ][o.e.p.PluginsService ] [WwjX-hI] loaded plugin [ingest-user-agent]
elastic_1 | [2019-09-24T18:00:31,792][WARN ][o.e.d.s.ScriptModule ] Script: returning default values for missing document values is deprecated. Set system property '-Des.scripting.exception_for_missing_value=true' to make behaviour compatible with future major versions.
elastic_1 | [2019-09-24T18:00:33,335][INFO ][o.e.x.s.a.s.FileRolesStore] [WwjX-hI] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]
elastic_1 | [2019-09-24T18:00:34,159][INFO ][o.e.d.DiscoveryModule ] [WwjX-hI] using discovery type [zen]
elastic_1 | [2019-09-24T18:00:34,790][INFO ][o.e.n.Node ] [WwjX-hI] initialized
elastic_1 | [2019-09-24T18:00:34,790][INFO ][o.e.n.Node ] [WwjX-hI] starting ...
elastic_1 | [2019-09-24T18:00:34,927][INFO ][o.e.t.TransportService ] [WwjX-hI] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
elastic_1 | [2019-09-24T18:00:38,001][INFO ][o.e.c.s.MasterService ] [WwjX-hI] zen-disco-elected-as-master ([0] nodes joined)[, ], reason: new_master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{CzEAmK5jRsOh6lrRagMi_Q}{localhost}{127.0.0.1:9300}{xpack.installed=true}
elastic_1 | [2019-09-24T18:00:38,005][INFO ][o.e.c.s.ClusterApplierService] [WwjX-hI] new_master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{CzEAmK5jRsOh6lrRagMi_Q}{localhost}{127.0.0.1:9300}{xpack.installed=true}, reason: apply cluster state (from master [master {WwjX-hI}{WwjX-hIPSZ-7L9XS1bYQFA}{CzEAmK5jRsOh6lrRagMi_Q}{localhost}{127.0.0.1:9300}{xpack.installed=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)[, ]]])
elastic_1 | [2019-09-24T18:00:38,023][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [WwjX-hI] publish_address {172.18.0.3:9200}, bound_addresses {0.0.0.0:9200}
elastic_1 | [2019-09-24T18:00:38,023][INFO ][o.e.n.Node ] [WwjX-hI] started
elastic_1 | [2019-09-24T18:00:38,721][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [WwjX-hI] Failed to clear cache for realms [[]]
elastic_1 | [2019-09-24T18:00:38,762][INFO ][o.e.l.LicenseService ] [WwjX-hI] license [9f6ac6c0-620a-4b71-b3e7-da5bb37b8337] mode [basic] - valid
elastic_1 | [2019-09-24T18:00:38,772][INFO ][o.e.g.GatewayService ] [WwjX-hI] recovered [0] indices into cluster_state
最佳答案
docker-compose 公开服务“弹性”。此服务可在您的 docker 网络中解析,因此您的 Rails 应用程序应该像这样连接:
ELASTIC_HOST: "elastic"
关于ruby-on-rails - 无法打开到本地主机的 TCP 连接 :9200 (Cannot assign requested address - connect(2) for "localhost" port 9200),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58084493/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!