3

I am trying to run elasticsearch on kubernetes following https://github.com/pires/kubernetes-elasticsearch-cluster

The yaml file that I am using to deploy on the cluster looks like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: es5-master
  ...
spec:
  ...
    spec:
      initContainers:
      - name: init-sysctl
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["sysctl", "-w", "vm.max_map_count=262144"]
        securityContext:
          privileged: true
      containers:
      - name: es5-master
        securityContext:
          privileged: false
          capabilities:
            add:
              - IPC_LOCK
              - SYS_RESOURCE
        image: quay.io/pires/docker-elasticsearch-kubernetes:5.6.0
        imagePullPolicy: Always
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: "CLUSTER_NAME"
          value: "myes5db"
        - name: "NUMBER_OF_MASTERS"
          value: "2"
        - name: NODE_MASTER
          value: "true"
        - name: NODE_INGEST
          value: "false"
        - name: NODE_DATA
          value: "false"
        - name: HTTP_ENABLE
          value: "false"
        - name: "ES_JAVA_OPTS"
          value: "-Xms256m -Xmx256m"
        - name: "NETWORK_HOST"
          value: "_eth0_"
        ports:
        - containerPort: 9300
          name: transport
          protocol: TCP
        livenessProbe:
          tcpSocket:
            port: 9300
        volumeMounts:
        - name: storage
          mountPath: /data
      volumes:
          - emptyDir:
              medium: ""
            name: "storage"

The error that I am getting is:

java.io.IOException: Invalid string; unexpected character: 253 hex: fd
    at org.elasticsearch.common.io.stream.StreamInput.readString(StreamInput.java:372) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.<init>(ThreadContext.java:362) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.<init>(ThreadContext.java:352) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.common.util.concurrent.ThreadContext.readHeaders(ThreadContext.java:186) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1372) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) ~[transport-netty4-5.6.0.jar:5.6.0]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.13.Final.jar:4.1.13.Final]
    at 

I am running Es version 1.7 and that's why I renamed this new one to elasticsearch5. I hope this naming is not the cause of the problem. I initially didn't have eth0 for NETWORK_HOST , reviewing Troubleshooting par from the readme doc, I added in but now getting 253 hex: fd error. Other network host values didnt work.

I really appreciate any ideas regarding that.

ali
  • 350
  • 2
  • 15
  • According to [discuss.elastic.co](https://discuss.elastic.co/t/not-able-to-search-from-java/99928/12) that error will materialize if one sends a query to the clustering port, but I don't see anything in your config that would cause such a thing. Do the members of your 1.7 cluster have anything ugly in their logs? – mdaniel Nov 07 '17 at 04:26
  • @MatthewLDaniel I can't see anything in version 1.7 though. Do you think this new version 5.6 has conflicts with the old 1.7 containers? – ali Nov 09 '17 at 05:21
  • 1
    well, hopefully you have correctly segregated them from one another so their traffic is not intermingled; I was merely asking about the 1.7 to see if it is something in your cluster that might affect both of them. I'd try the discuss.elastic.co forums and see if they can help – mdaniel Nov 09 '17 at 05:26

1 Answers1

0

I faced this issue when I tried hitting a lower version of elastic search with the higher version of elastic search compiling in my IntelliJ idea. I had elastic search 1.5 running in my machine and was trying to hit it using elastic search 6.5.1 dependencies from IntelliJ idea. I hope this will help.

Dmitriy
  • 5,525
  • 12
  • 25
  • 38