oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.01k stars 2.66k forks source link

haproxy health check error #8790

Open rex-gaohaidong opened 7 months ago

rex-gaohaidong commented 7 months ago

What version of Bun is running?

v1.0.26

What platform is your computer?

ubuntu22

What steps can reproduce the bug?

index.js

import express from 'express';
const app = express();

app.use('/health', (req, res) => {
  res.status(200);
  return res.send();
});

app.listen(10002);

haproxy

frontend myfrontend
    bind *:8000
    mode http
    default_backend mybackend

backend mybackend
    mode http
    balance roundrobin
    option httpchk GET /health HTTP/1.0
    server server2 localhost:10001 weight 1 check

start server

bun run index.js  // NOT WORKING.    Socket error OR Layer7 invalid response
node run index.js // WORKING WELL

what diffrence ?

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

mrlectus commented 6 months ago

I can't believe i spent hours on this not knowing what the fuck is going on, only to find out Bun is the problem because i swapped to node and it worked