Problem in starting the bench

when im used bench start the bench automatically stopped

10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.925 # Redis is now ready to exit, bye bye…
10:07:32 system | redis_cache.1 stopped (rc=-15)

so im used this command bench --site devo.local serve --port 8082
i can run my bench why what is the problem in it?

@Sumith-2004 Provide the whole log.

sorry i didn’t get it how can i provide

Copy and paste the whole output of the command bench start

:~/frappe-bench$ bench start
10:07:32 system | redis_cache.1 started (pid=32433)
10:07:32 system | redis_queue.1 started (pid=32437)
10:07:32 system | web.1 started (pid=32441)
10:07:32 system | socketio.1 started (pid=32445)
10:07:32 redis_cache.1 | 32435:C 16 Aug 2024 10:07:32.820 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see vm.max_map_count growing steadily when vm.overcommit_memory is 2 · Issue #1328 · jemalloc/jemalloc · GitHub. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
10:07:32 redis_cache.1 | 32435:C 16 Aug 2024 10:07:32.820 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:07:32 redis_cache.1 | 32435:C 16 Aug 2024 10:07:32.820 * Redis version=7.4.0, bits=64, commit=00000000, modified=0, pid=32435, just started
10:07:32 redis_cache.1 | 32435:C 16 Aug 2024 10:07:32.820 * Configuration loaded
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.821 * Increased maximum number of open files to 10032 (it was originally set to 1024).
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.821 * monotonic clock: POSIX clock_gettime
10:07:32 redis_queue.1 | 32439:C 16 Aug 2024 10:07:32.822 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see vm.max_map_count growing steadily when vm.overcommit_memory is 2 · Issue #1328 · jemalloc/jemalloc · GitHub. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.822 * Running mode=standalone, port=13000.
10:07:32 redis_queue.1 | 32439:C 16 Aug 2024 10:07:32.822 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:07:32 redis_queue.1 | 32439:C 16 Aug 2024 10:07:32.822 * Redis version=7.4.0, bits=64, commit=00000000, modified=0, pid=32439, just started
10:07:32 redis_queue.1 | 32439:C 16 Aug 2024 10:07:32.822 * Configuration loaded
10:07:32 redis_queue.1 | 32439:M 16 Aug 2024 10:07:32.822 * Increased maximum number of open files to 10032 (it was originally set to 1024).
10:07:32 redis_queue.1 | 32439:M 16 Aug 2024 10:07:32.822 * monotonic clock: POSIX clock_gettime
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.823 * Server initialized
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.823 * Ready to accept connections tcp
10:07:32 redis_queue.1 | 32439:M 16 Aug 2024 10:07:32.824 * Running mode=standalone, port=11000.
10:07:32 system | watch.1 started (pid=32449)
10:07:32 redis_queue.1 | 32439:M 16 Aug 2024 10:07:32.824 # Warning: Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
10:07:32 redis_queue.1 | 32439:M 16 Aug 2024 10:07:32.824 # Failed listening on port 11000 (tcp), aborting.
10:07:32 system | schedule.1 started (pid=32453)
10:07:32 system | redis_queue.1 stopped (rc=1)
10:07:32 system | worker.1 started (pid=32461)
10:07:32 system | sending SIGTERM to redis_cache.1 (pid 32433)
10:07:32 system | sending SIGTERM to web.1 (pid 32441)
10:07:32 system | sending SIGTERM to socketio.1 (pid 32445)
10:07:32 system | sending SIGTERM to watch.1 (pid 32449)
10:07:32 system | sending SIGTERM to schedule.1 (pid 32453)
10:07:32 system | sending SIGTERM to worker.1 (pid 32461)
10:07:32 redis_cache.1 | 32435:signal-handler (1723783052) Received SIGTERM scheduling shutdown…
10:07:32 system | web.1 stopped (rc=-15)
10:07:32 system | worker.1 stopped (rc=-15)
10:07:32 system | schedule.1 stopped (rc=-15)
10:07:32 system | watch.1 stopped (rc=-15)
10:07:32 system | socketio.1 stopped (rc=-15)
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.924 * User requested shutdown…
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.924 * Removing the pid file.
10:07:32 redis_cache.1 | 32435:M 16 Aug 2024 10:07:32.925 # Redis is now ready to exit, bye bye…
10:07:32 system | redis_cache.1 stopped (rc=-15)

@Sumith-2004 So, the problem is the Redis queue service is trying to bind to a port (11000), which is already in use by another process.

So, kill the ports and try again.

  1. Identify the process id in port(11000)
sudo lsof -i :11000
  1. Kill the pid
sudo kill -9 <PID>
  1. start the bench again.
bench start

after running the command sudo lsof -i :11000
:~/frappe-bench$ sudo lsof -i :11000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
redis-ser 898 redis 8u IPv4 21244 0t0 TCP localhost:11000 (LISTEN)
redis-ser 898 redis 9u IPv6 21245 0t0 TCP ip6-localhost:11000 (LISTEN)
this is the response now what should i do?

if i directly pass the next command sudo kill -9 means its response is
bash: syntax error near unexpected token `newline’

@Sumith-2004 run sudo kill -9 898 and bench start

still it automatically stoped

:~/frappe-bench$ bench start
10:56:10 system | redis_cache.1 started (pid=35231)
10:56:10 system | redis_queue.1 started (pid=35234)
10:56:10 system | web.1 started (pid=35238)
10:56:10 system | socketio.1 started (pid=35242)
10:56:10 redis_cache.1 | 35235:C 16 Aug 2024 10:56:10.505 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see vm.max_map_count growing steadily when vm.overcommit_memory is 2 · Issue #1328 · jemalloc/jemalloc · GitHub. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
10:56:10 redis_cache.1 | 35235:C 16 Aug 2024 10:56:10.505 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:56:10 redis_cache.1 | 35235:C 16 Aug 2024 10:56:10.505 * Redis version=7.4.0, bits=64, commit=00000000, modified=0, pid=35235, just started
10:56:10 redis_cache.1 | 35235:C 16 Aug 2024 10:56:10.505 * Configuration loaded
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.505 * Increased maximum number of open files to 10032 (it was originally set to 1024).
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.505 * monotonic clock: POSIX clock_gettime
10:56:10 redis_queue.1 | 35236:C 16 Aug 2024 10:56:10.506 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see vm.max_map_count growing steadily when vm.overcommit_memory is 2 · Issue #1328 · jemalloc/jemalloc · GitHub. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
10:56:10 redis_queue.1 | 35236:C 16 Aug 2024 10:56:10.506 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:56:10 redis_queue.1 | 35236:C 16 Aug 2024 10:56:10.506 * Redis version=7.4.0, bits=64, commit=00000000, modified=0, pid=35236, just started
10:56:10 redis_queue.1 | 35236:C 16 Aug 2024 10:56:10.506 * Configuration loaded
10:56:10 redis_queue.1 | 35236:M 16 Aug 2024 10:56:10.506 * Increased maximum number of open files to 10032 (it was originally set to 1024).
10:56:10 redis_queue.1 | 35236:M 16 Aug 2024 10:56:10.506 * monotonic clock: POSIX clock_gettime
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.506 * Running mode=standalone, port=13000.
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.507 * Server initialized
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.507 * Ready to accept connections tcp
10:56:10 system | schedule.1 started (pid=35248)
10:56:10 redis_queue.1 | 35236:M 16 Aug 2024 10:56:10.508 * Running mode=standalone, port=11000.
10:56:10 redis_queue.1 | 35236:M 16 Aug 2024 10:56:10.508 # Warning: Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
10:56:10 redis_queue.1 | 35236:M 16 Aug 2024 10:56:10.508 # Failed listening on port 11000 (tcp), aborting.
10:56:10 system | redis_queue.1 stopped (rc=1)
10:56:10 system | watch.1 started (pid=35246)
10:56:10 system | worker.1 started (pid=35251)
10:56:10 system | sending SIGTERM to redis_cache.1 (pid 35231)
10:56:10 system | sending SIGTERM to web.1 (pid 35238)
10:56:10 system | sending SIGTERM to socketio.1 (pid 35242)
10:56:10 system | sending SIGTERM to watch.1 (pid 35246)
10:56:10 system | sending SIGTERM to schedule.1 (pid 35248)
10:56:10 system | sending SIGTERM to worker.1 (pid 35251)
10:56:10 redis_cache.1 | 35235:signal-handler (1723785970) Received SIGTERM scheduling shutdown…
10:56:10 system | watch.1 stopped (rc=-15)
10:56:10 system | web.1 stopped (rc=-15)
10:56:10 system | worker.1 stopped (rc=-15)
10:56:10 system | schedule.1 stopped (rc=-15)
10:56:10 system | socketio.1 stopped (rc=-15)
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.609 * User requested shutdown…
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.609 * Removing the pid file.
10:56:10 redis_cache.1 | 35235:M 16 Aug 2024 10:56:10.609 # Redis is now ready to exit, bye bye…
10:56:10 system | redis_cache.1 stopped (rc=-15)