Tag: elasticsearch

Docker中的ElasticSearch java.net.NoRouteToHostException

[2015-10-11 13:08:26,587][WARN ][transport.netty ] [Joseph] exception caught on transport layer [[id: 0x7e9f652b]], closing connection java.net.NoRouteToHostException: No route to host at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152) at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 在Docker中启动elasticsearch时得到这个exception(其实我在CentOS7 docker主机中只有这个问题) 首先,我的Dockefile公开UDP端口。 EXPOSE 9200 9300/udp 9301/udp 9302/udp 9303/udp 9304/udp 9305/udp 当我启动Docker容器时,我通过-p 9200:9200 -p 9300:9300/udp -p 9301:9301/udp -p […]

当elasticsearch位于容器中时,覆盖`tcp.publish_port`会中断群集

我试图运行一个elasticsearch集群,每个es-node运行在自己的容器中。 这些容器在多台机器上使用ECS进行部署,这些机器可能正在运行其他不相关的容器。 为了避免端口冲突,一个容器暴露的每个端口被分配一个随机值。 这些随机端口在所有相同types的正在运行的容器中是一致的。 换句话说,所有正在运行的es-node容器都将端口9300映射到相同的随机数。 这里是我使用的configuration: network: host: 0.0.0.0 plugin: mandatory: cloud-aws cluster: name: ${ES_CLUSTER_NAME} discovery: type: ec2 ec2: groups: ${ES_SECURITY_GROUP} any_group: false zen.ping.multicast.enabled: false transport: tcp.port: 9300 publish_port: ${_INSTANCE_PORT_TRANSPORT} cloud.aws: access_key: ${AWS_ACCESS_KEY} secret_key: ${AWS_SECRET_KEY} region: ${AWS_REGION} 在这种情况下, _INSTANCE_PORT_TRANSPORT是9300绑定在主机上的端口。 我已经确认上面使用的所有环境variables都是正确设置的。 我还通过命令行arg将network.publish_host设置为主机的本地IP。 当我强制_INSTANCE_PORT_TRANSPORT (反过来transport.publish_port )为9300时,一切运行良好,但只要给定一个随机值,节点就不能再相互连接了。 我看到这样的错误使用logger.discovery=TRACE : ConnectTransportException[[][10.0.xxx.xxx:9300] connect_timeout[30s]]; nested: ConnectException[Connection refused: /10.0.xxx.xxx:9300]; at org.elasticsearch.transport.netty.NettyTransport.connectToChannelsLight(NettyTransport.java:952) at […]

为什么Docker上的相同弹性search图像的不同容器退出?

我试图两次运行相同的弹性search图像,但一个容器退出。 只有一个弹性search容器运行,其他人退出。 任何解决scheme/build议都会有所帮助。 我用下面的命令运行它: docker run -d my_es:v3 elasticsearch 下面是正在退出的进程的日志文件。 root@ubuntu-512mb-nyc3-01:~/AnyElastic# docker logs e2cbd47927af [2016-06-16 21:36:12,339][INFO ][node ] [Angela Del Toro] version[2.3.3], pid[1], build[218bdf1/2016-05-17T15:40:04Z] [2016-06-16 21:36:12,343][INFO ][node ] [Angela Del Toro] initializing … [2016-06-16 21:36:14,014][INFO ][plugins ] [Angela Del Toro] modules [reindex, lang-expression, lang-groovy], plugins [], sites [] [2016-06-16 21:36:14,053][INFO ][env ] [Angela Del Toro] […]

如何在docker中有“运行”命令 – 撰写类似于docker文件?

Docker文件 FROM elasticsearch:2 RUN /usr/share/elasticsearch/bin/plugin install –batch cloud-aws 从https://www.elastic.co/blog/elasticsearch-docker-plugin-management 有人可以帮我添加ES插件在docker-compose文件中吗? version: '2' services: nitrogen: build: . ports: – "8000:8000" volumes: – ~/mycode:/mycode depends_on: – couchdb – elasticsearch elasticsearch: image: elasticsearch:1.7.5 volumes: – ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml ports: – "9200:9200" – "9300:9300" 在上面的docker-compose中缺less的是插件的安装。 试过这个,但它运行在本地机器,而不是docker集装箱。 command: /usr/share/elasticsearch/bin/plugin install elasticsearch/elasticsearch-river-couchdb/2.6.0

Docker-compose – 卷驱动程序的本地含义

我正在用这个链接做一些docker-compose的yml文件。 在此configuration中,驱动程序的含义是什么:在顶层卷中是本地的? volumes: esdata1: driver: local esdata2: driver: local

使用nginx作为docker的代理

我目前尝试使用nginx作为elasticsearch引擎的代理,全部使用docker。 我的elasticsearch的运行命令如下: docker run –name elasticsearch_5.2.1 \ -d \ elasticsearch:5.2.1 nginx的一个: docker run –name nginx_1.11.10 \ -p 8200:80 \ -l elasticsearch_5.2.1:elasticsearch \ -v /my.conf:/etc/nginx/nginx.conf:ro \ -d \ nginx:1.11.10 而我的nginxconfiguration是: user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { upstream elasticsearch_proxy { server elasticsearch:9200; } server { listen 80; […]

无法连接到docker中的elasticsearch容器

我试图使用NoNodeAvailableException[None of the configured nodes are available官方弹性search图像,我遵循这个指南,但是当我试图连接到NoNodeAvailableException[None of the configured nodes are available集群我有一个例外NoNodeAvailableException[None of the configured nodes are available 我的代码 TransportClient client = new PreBuiltTransportClient(Settings.builder().put("cluster.name", "docker-cluster") .build()) .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300)); 要运行elasticsearch容器,我使用了这个命令 docker run -p 9200:9200 -p 9300:9300 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.2.2 当我在localhost:9200上打开浏览器时localhost:9200浏览器显示这个文本 { "name" : "J5oojcO", "cluster_name" : "docker-cluster", "cluster_uuid" : "SfkgAJmaT_Sb3erfYUl7sQ", "version" : […]

Docker centos7 systemctl deos不工作:连接D-bus失败

我正试图在docker上运行elasticsearch。 我的function如下 主机系统:OSX 10.12.5 docker工人:17.05.0-ce docker操作图像: centos:latest 我正在关注这篇文章 ,但它坚持systemctl daemon-reload 。 我发现CentOS 官方回应了这个D-bus错误,但是当我运行docker run命令时,它显示了下面的消息。 [!!!!!!] Failed to mount API filesystems, freezing. 我怎么能解决这个问题? 仅供参考,这里是Dockerfile我build立的形象 FROM centos MAINTAINER juneyoung <juneyoung@hanmail.net> ARG u=elastic ARG uid=1000 ARG g=elastic ARG gid=1000 ARG p=elastic # add USER RUN groupadd -g ${gid} ${g} RUN useradd -d /home/${u} -u ${uid} -g ${g} -s […]

通过文件初始化Elasticsearch数据库

我有一个在Docker容器中运行的elasticsearch实例。 出于testing目的,我想用一组数据初始化数据库。 与postgres类似,可以在容器启动时执行.sql文件。 使用elasticsearch完成这件事的最好方法是什么?

我应该如何replaceDocker Swarm中的IP引用

我正在尝试在Docker Swarm模式下安装ELK。 然后,我需要告诉filebeat发送日志到logstash。 这是我的filebeatconfiguration文件: #=========================== Filebeat prospectors ============================= ## Each – is a prospector. Most options can be set at the prospector level, so ## you can use different prospectors for various configurations. ## Below are the prospector specific configurations. filebeat.prospectors: – input_type: log enabled: true paths: {% for log in in_filebeat_dict.filebeat.logs | default([]) %} […]