oven-sh / bun

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

haproxy health check error #8790

Open rex-gaohaidong opened 9 months ago

rex-gaohaidong commented 9 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

VesperQuartz commented 8 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