Skip to content

Data Receiver Issues

Fix Data Receiver bind failures and CPU/memory resource exhaustion.

3 min read Updated SS RS

Below are the issues related to Data Receiver:

  • Failed to Bind Error for Datareceiver_2 Service
  • CPU and Memory Resource Exhaustion in Data Receiver

For reference:

The following section contains basic Linux commands: Basic Commands

Failed to Bind Error for Datareceiver_2 Service#

We are encountering a "failed to bind" error while starting the Datareceiver_2 service. The defined ports are not in use, but the service remains pending.

Solution:

Case 1: Misconfiguration in General Configuration File#

This issue may occur due to a misconfiguration in the general configuration file. If you want to run multiple Data receiver instances, you must specify DATA_RECEIVER:3 . However, if the configuration is set as DATA_RECEIVER:1, DATA_RECEIVER, the error may occur.

Case 2: "Failed to Bind" Error During Scaling Up#

To resolve this issue, follow the below steps steps:

  1. Access the Docker Image:

    docker cp <datareceiver-container-id>:/etc/consul-
    template/templates/conf.properties.tmpl
    /install_path/Appsone_Service/conf/
    
  2. Navigate to the Configuration Directory:

    cd /install_path/Appsone_Service/conf/
    
  3. Rename the Configuration File:

    mv conf.properties.tmpl drconf.properties.tmpl
    
  4. Change the Jaeger Port:

    Modify the port in the configuration file to avoid conflicts:

    --collector.grpc-server.host-port=<new port number>
    
Datareceiver_2 "Failed to Bind" troubleshooting — Scaling Up / Jaeger port configuration
Datareceiver_2 — "Failed to Bind" / Scaling-Up configuration

CPU and Memory Resource Exhaustion in Data Receiver#

The Data Receiver service encountered issues with CPU and memory resources, as indicated by error logs in the Data Receiver Core log. The system was unable to start new threads, with errors such as:

Failed to start the native thread for java.lang.Thread "grpc-worker-
thread"   pthread_create failed (EAGAIN) for attributes: stacksize:
1024k, guardsize: 0k, detached.

After increasing CPU resources on the node, the service worked for some time but eventually exited again.

Solution :

  1. Port Configuration for Multiple Data Receivers: The node was running another Data Receiver service, so additional ports were configured for the new instance.

    Three new ports were added using firewall-cmd :

    sudo firewall-cmd --add-port=11203/tcp --permanent                      # grpc
    sudo firewall-cmd --add-port=11205/tcp --permanent                      # http
    sudo firewall-cmd --add-port=11121/tcp --permanent                      # jmx
    
  2. HAProxy Configuration: Update the HAProxy configuration file to handle the load balancing for the Data Receiver instances:

    backend data_receiver_grpc_backend
     balance roundrobin
     server 203.0.113.16_DATARECEIVER_1 192.0.2.142:11202 check inter 3s
    rise 2 fall 3 ssl verify none alpn h2
     server 192.0.2.17_DATARECEIVER_1 192.0.2.143:11202 check inter 3s
    rise 2 fall 3 ssl verify none alpn h2
     server 203.0.113.16_DATARECEIVER_2 192.0.2.142:11203 check inter 3s
    rise 2 fall 3 ssl verify none alpn h2
    
  3. Nomad File and Consul KV Updates: Create a centralized folder for the Data Receiver Nomad configuration.

    Update the ports for the new Data Receiver instance in the Nomad file:

    JMX_PORT="
    {{key"service/data_receiver/203.0.113.16_DATARECEIVER_2/port/jmx"}}"
    updated as 2 network {
                                                   port "jmx_port" {
                                                         static = "11121"
                                                         to = 11121
                                                         }
                                                   port "http_port" {
                                                         static = "11205"
                                                         to = 11205 }
                                                   port "grpc_port" {
                                                         static = "11203"
                                                         to = 11203 }
                                               }
    
  4. Consul Key-Value Store Updates: Update the necessary port mappings in Consul KV,

    consul kv put service/datareceiver2/rpc/server/port 11203
    consul kv put service/datareceiver2/http/server/port 11205
    consul kv put
    service/data_receiver/203.0.113.16_DATARECEIVER_2/port/jmx 11121
    
  5. Service Restart and Resource Optimization: Restart the HAProxy service and reload the firewall configurations.

    Clear the buffer cache, which had grown to 40GB, using the command:

    sync; echo 1 > /proc/sys/vm/drop_caches
    

    Monitor the system for 30 minutes, during which the Data Receiver remained stable and did not exit the container.