Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:13:55+00:00 2026-06-03T15:13:55+00:00

We are using node_redis client to access the redis at present. I need to

  • 0

We are using node_redis client to access the redis at present. I need to use HAProxy in front of redis slaves which in my case is 3 nos. I installed the HAProxy and configured it to load balance the redis slaves. But when I tried to create connection from the node_redis client to the HAProxy I was not able to create the connection and was getting a error

   Error: Redis reply parser error: Error: Protocol error, got "H" as reply type byte
at HiredisReplyParser.execute (/home/user1/doosra/node-exp/node_modules/redis/lib/parser/hiredis.js:32:31)
at RedisClient.on_data (/home/user1/doosra/node-exp/node_modules/redis/index.js:440:27)
at Socket.<anonymous> (/home/user1/doosra/node-exp/node_modules/redis/index.js:70:14)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:347:14)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:13:58+00:00Added an answer on June 3, 2026 at 3:13 pm

    Posting the haproxy configuration would have helped …

    The most likely explanation is haproxy is not configured to process generic TCP traffic but HTTP traffic.

    Example:

    With the following configuration:

    global
        daemon
        maxconn 256
    
    defaults
        mode http
        timeout connect 5000ms
        timeout client 50000ms
        timeout server 50000ms
    
    frontend redis
        bind *:1521
        default_backend servers
    
    backend servers
        server R1 127.0.0.1:6379 maxconn 1000
    

    and the following node.js script:

    var redis = require('redis')
    var redis_client = redis.createClient(1521, 'localhost');
    redis_client.get( 'key', function(e,o) {
        console.log("return "+e+o);
    });
    

    … we get the same exact error:

    Error: Redis reply parser error: Error: Protocol error, got "H" as reply type byte
    

    It is expected, because the Redis protocol parser does not understand HTTP.
    To fix it, just alter the haproxy configuration to enforce a generic TCP mode:

        mode http
    
    to be changed into:
    
        mode tcp
    

    … and now it works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm using https://github.com/mranney/node_redis as my node redis client. client.retry_delay is set to 250ms
Must be missing something here, but I'm using Node_redis as Node.js client for Redis.
I am using redis and node (with node_redis ) and I would like to
Is there a way to directly connect to Redis using client side (not Node.js)
I am trying to do data replication using redis server and jedis client. What
I'm using Redis To Go in combination with the https://github.com/mranney/node_redis library. Redis gives me
I'm using Node.js w/ node_redis and am looping through an object and looking up
Ok, so I am developing a multiplayer game using: Node.js, Sockets.io & Redis Anyway
I have the following express node.js app. It's using the 'redis' npm package. app.get(/test,function(req,res){
I need to know when data is written on specific keys on a Redis

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.