无效的字符串;意外字符:253十六进制:fd

时间:2017-11-06 01:27:35

标签: java elasticsearch kubernetes elastic-stack kops

我正在尝试在kubernetes上运行elasticsearch https://github.com/pires/kubernetes-elasticsearch-cluster

我用于在群集上部署的yaml文件如下所示:

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"

我得到的错误是:

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 

我正在运行Es版本1.7,这就是为什么我将这个新的名称重命名为elasticsearch5。我希望这个命名不是问题的原因。 我最初没有NETWORK_HOST的eth0,从自述文件中查看故障排除标准,我添加但现在得到253 hex:fd错误。 其他网络主机值无效。

我真的很感激有关这方面的任何想法。

1 个答案:

答案 0 :(得分:0)

当我尝试在IntelliJ想法中使用较高版本的弹性搜索来编译较低版本的弹性搜索时,遇到了此问题。我的机器上运行了弹性搜索1.5,并尝试使用IntelliJ idea的弹性搜索6.5.1依赖项来实现它。我希望这会有所帮助。