twemproxy icon indicating copy to clipboard operation
twemproxy copied to clipboard

Weird Port Already in use Issue

Open jennyfountain opened this issue 10 years ago • 3 comments

nutcracker -c /etc/nutcracker/nutcracker.yml [2016-02-08 15:53:50.403] nc.c:187 nutcracker-0.4.1 built for Linux 2.6.32-573.3.1.el6.x86_64 x86_64 started on pid 8376 [2016-02-08 15:53:50.404] nc.c:192 run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one [2016-02-08 15:53:50.428] nc_stats.c:840 bind on m 3 to addr '0.0.0.0:22222' failed: Address already in use [2016-02-08 15:53:50.428] nc.c:198 done, rabbit done

Nutcracker isn't running already and the port is not listed in the config file:

listen: 127.0.0.1:22212 listen: 127.0.0.1:22213 listen: 127.0.0.1:22214 listen: 127.0.0.1:22215 listen: 127.0.0.1:22216 listen: 127.0.0.1:22217 listen: 127.0.0.1:22218 listen: 127.0.0.1:22219 listen: 127.0.0.1:22220 listen: 127.0.0.1:22221 listen: 127.0.0.1:22223 listen: 127.0.0.1:22224 listen: 127.0.0.1:22225 listen: 127.0.0.1:22226 listen: 127.0.0.1:22227 listen: 127.0.0.1:22228 listen: 127.0.0.1:22229 listen: 127.0.0.1:22230 listen: 127.0.0.1:22231 listen: 127.0.0.1:22232 listen: 127.0.0.1:22233 listen: 127.0.0.1:22234 listen: 127.0.0.1:22235 listen: 127.0.0.1:22236 listen: 127.0.0.1:22237 listen: 127.0.0.1:22238 listen: 127.0.0.1:22239 listen: 127.0.0.1:22240 listen: 127.0.0.1:22241 listen: 127.0.0.1:22242 listen: 127.0.0.1:22243 listen: 127.0.0.1:22244 listen: 127.0.0.1:22245 listen: 127.0.0.1:22246 listen: 127.0.0.1:22247 listen: 127.0.0.1:22248 listen: 127.0.0.1:22249 listen: 127.0.0.1:22250 listen: 127.0.0.1:22251 listen: 127.0.0.1:22252 listen: 127.0.0.1:22253 listen: 127.0.0.1:22254

It will eventually start but takes a few tries.

thanks for any input.

jennyfountain avatar Feb 08 '16 21:02 jennyfountain

I am facing this too

bgdsh avatar Feb 23 '16 10:02 bgdsh

I have the same problem, and later i notice that the service was already running.

LinuxEvangelist avatar Feb 26 '16 20:02 LinuxEvangelist

Figured this out. Apache was holding a port in time-wait.

jennyfountain avatar May 25 '16 00:05 jennyfountain