Error at bench start

Hi, can anyone please help me with this error i am getting when i do the commend bench start?

/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
00:18:27 system | redis_socketio.1 started (pid=7528)
00:18:27 system | redis_queue.1 started (pid=7531)
00:18:27 redis_queue.1 | 7536:C 12 Apr 2021 00:18:27.568 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
00:18:27 redis_queue.1 | 7536:C 12 Apr 2021 00:18:27.568 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=7536, just started
00:18:27 redis_queue.1 | 7536:C 12 Apr 2021 00:18:27.568 # Configuration loaded
00:18:27 redis_queue.1 | 7536:M 12 Apr 2021 00:18:27.569 * Increased maximum number of open files to 10032 (it was originally set to 1024).
00:18:27 redis_queue.1 | 7536:M 12 Apr 2021 00:18:27.569 # Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
00:18:27 system | redis_queue.1 stopped (rc=1)
00:18:27 system | redis_cache.1 started (pid=7526)
00:18:27 redis_cache.1 | 7529:C 12 Apr 2021 00:18:27.561 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
00:18:27 redis_cache.1 | 7529:C 12 Apr 2021 00:18:27.561 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=7529, just started
00:18:27 redis_cache.1 | 7529:C 12 Apr 2021 00:18:27.561 # Configuration loaded
00:18:27 redis_cache.1 | 7529:M 12 Apr 2021 00:18:27.562 * Increased maximum number of open files to 10032 (it was originally set to 1024).
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
00:18:27 redis_cache.1 | 7529:M 12 Apr 2021 00:18:27.562 # Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
00:18:27 system | redis_cache.1 stopped (rc=1)
00:18:27 system | socketio.1 started (pid=7535)
00:18:27 redis_socketio.1 | 7532:C 12 Apr 2021 00:18:27.564 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
00:18:27 redis_socketio.1 | 7532:C 12 Apr 2021 00:18:27.564 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=7532, just started
00:18:27 redis_socketio.1 | 7532:C 12 Apr 2021 00:18:27.564 # Configuration loaded
00:18:27 redis_socketio.1 | 7532:M 12 Apr 2021 00:18:27.565 * Increased maximum number of open files to 10032 (it was originally set to 1024).
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
00:18:27 redis_socketio.1 | 7532:M 12 Apr 2021 00:18:27.565 # Could not create server TCP listening socket 127.0.0.1:12000: bind: Address already in use
00:18:27 system | redis_socketio.1 stopped (rc=1)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
00:18:27 system | web.1 started (pid=7534)
00:18:27 system | worker_long.1 started (pid=7547)
00:18:27 system | worker_short.1 started (pid=7549)
00:18:27 system | schedule.1 started (pid=7550)
00:18:27 system | watch.1 started (pid=7556)
00:18:27 system | worker_default.1 started (pid=7559)
00:18:27 system | sending SIGTERM to web.1 (pid 7534)
00:18:27 system | sending SIGTERM to socketio.1 (pid 7535)
00:18:27 system | sending SIGTERM to watch.1 (pid 7556)
00:18:27 system | sending SIGTERM to schedule.1 (pid 7550)
00:18:27 system | sending SIGTERM to worker_short.1 (pid 7549)
00:18:27 system | sending SIGTERM to worker_long.1 (pid 7547)
00:18:27 system | sending SIGTERM to worker_default.1 (pid 7559)
00:18:27 system | worker_default.1 stopped (rc=-15)
00:18:27 system | socketio.1 stopped (rc=-15)
00:18:27 system | worker_long.1 stopped (rc=-15)
00:18:27 system | worker_short.1 stopped (rc=-15)
00:18:27 system | watch.1 stopped (rc=-15)
00:18:27 system | web.1 stopped (rc=-15)
00:18:27 system | schedule.1 stopped (rc=-15)

were you able to solve this problem. if yes, let me know, as we are also getting the same error.

Regards
Shreyas

1 Like

Hi, were are at the same situation … hope you remember how did you resolved it

your redis is still running/occupying the socket.
you can find the running redis instances using ps aux|grep redis and then kill then using their pids

Much appreciated @ritwik
wld you please elaborate more … step by step

I’ve encountered the same error when i close my bench instance abruptly (like closing the whole terminal session itself rather than exiting the bench instance) - this leaves redis in the background running and occupying the same port.
So suppose your redis instance (run via bench start) occupies port 11000 and you didnt properly kill the bench process so redis will keep running in the background occupying the same port and when you launch another bench process (by running bench start) it will try to open redis again at the same port which is already occupied by previous bench’s redis instance hence you will see that error that “the socket is already in use”

a way to solve this is by killing the already running redis instance(s) -> run ps aux|grep redis this will list all the running redis processes and you can kill them using their pids by using kill command
(another way would be to let existing ones keep running and change the ports in your conf files :stuck_out_tongue: which will mean you’ll have your already running redis instances and you’ll be spawning new ones :laughing:)

2 Likes

basically this:

1 Like

Thanks TONs , it works :slightly_smiling_face:

1 Like