Error starting bench in frappe

when I tried bench start command the following error arises. from my understand I tried to kill the process in which the redis running. but whenever killing the process redis started running in another process

the error is given below

bench start
12:22:43 system | redis_cache.1 started (pid=11860)
12:22:43 system | redis_queue.1 started (pid=11862)
12:22:43 system | web.1 started (pid=11868)
12:22:43 system | socketio.1 started (pid=11870)
12:22:43 system | watch.1 started (pid=11874)
12:22:43 system | schedule.1 started (pid=11878)
12:22:43 system | worker.1 started (pid=11882)
12:22:43 redis_cache.1 | 11863:C 11 Feb 2025 12:22:43.260 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:22:43 redis_cache.1 | 11863:C 11 Feb 2025 12:22:43.260 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=11863, just started
12:22:43 redis_cache.1 | 11863:C 11 Feb 2025 12:22:43.260 # Configuration loaded
12:22:43 redis_queue.1 | 11866:C 11 Feb 2025 12:22:43.260 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:22:43 redis_queue.1 | 11866:C 11 Feb 2025 12:22:43.260 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=11866, just started
12:22:43 redis_queue.1 | 11866:C 11 Feb 2025 12:22:43.260 # Configuration loaded
12:22:43 redis_cache.1 | 11863:M 11 Feb 2025 12:22:43.261 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:22:43 redis_cache.1 | 11863:M 11 Feb 2025 12:22:43.261 * monotonic clock: POSIX clock_gettime
12:22:43 redis_cache.1 | 11863:M 11 Feb 2025 12:22:43.261 # Warning: Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
12:22:43 redis_cache.1 | 11863:M 11 Feb 2025 12:22:43.261 # Failed listening on port 13000 (TCP), aborting.
12:22:43 redis_queue.1 | 11866:M 11 Feb 2025 12:22:43.261 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:22:43 redis_queue.1 | 11866:M 11 Feb 2025 12:22:43.261 * monotonic clock: POSIX clock_gettime
12:22:43 redis_queue.1 | 11866:M 11 Feb 2025 12:22:43.261 # Warning: Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
12:22:43 redis_queue.1 | 11866:M 11 Feb 2025 12:22:43.261 # Failed listening on port 11000 (TCP), aborting.
12:22:43 system | redis_cache.1 stopped (rc=1)
12:22:43 system | sending SIGTERM to redis_queue.1 (pid 11862)
12:22:43 system | sending SIGTERM to web.1 (pid 11868)
12:22:43 system | sending SIGTERM to socketio.1 (pid 11870)
12:22:43 system | sending SIGTERM to watch.1 (pid 11874)
12:22:43 system | sending SIGTERM to schedule.1 (pid 11878)
12:22:43 system | sending SIGTERM to worker.1 (pid 11882)
12:22:43 system | redis_queue.1 stopped (rc=1)
12:22:43 system | worker.1 stopped (rc=-15)
12:22:43 system | web.1 stopped (rc=-15)
12:22:43 system | watch.1 stopped (rc=-15)
12:22:43 system | socketio.1 stopped (rc=-15)
12:22:43 system | schedule.1 stopped (rc=-15)

what should I do here ?

@NanduG something is running the port 11000 .
find out which process is running the port 11000 using : lsof -i :11000
kill the process using : kill id .
you can do both steps using : fuser -k 11000/tcp

Yes I tried it and delete the process. when I did it again the same error is occuring
then I tried sudo lsof -i : 11000 what I saw in another process redis is running

so what is happening is that whenever I kill the redis process it is started running in another process so the bench start is not working again

@NanduG is the server running on production mode ? if not then stop redis and supervisor services .

No server is running on development mode.
I used these commands
sudo supervisorctl stop all
and stop redis as well
after this what should I do ?

@NanduG kill the process if still exist and bench start again

Now when I tried the sudo lsof -i : 11000

it is not showing anything !

@NanduG what about bench start ?

when bench start it is showing a lot of deprecation warning

@NanduG beside that , is it working ?

It shows running on a port but nothing is loading on that port

bench start
13:48:26 system | redis_cache.1 started (pid=14037)
13:48:26 system | redis_queue.1 started (pid=14039)
13:48:26 system | web.1 started (pid=14041)
13:48:26 system | socketio.1 started (pid=14046)
13:48:26 system | watch.1 started (pid=14053)
13:48:26 system | schedule.1 started (pid=14054)
13:48:26 system | worker.1 started (pid=14058)
13:48:27 redis_queue.1 | 14045:C 11 Feb 2025 13:48:27.021 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
13:48:27 redis_cache.1 | 14044:C 11 Feb 2025 13:48:27.021 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
13:48:27 redis_queue.1 | 14045:C 11 Feb 2025 13:48:27.021 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=14045, just started
13:48:27 redis_queue.1 | 14045:C 11 Feb 2025 13:48:27.021 # Configuration loaded
13:48:27 redis_cache.1 | 14044:C 11 Feb 2025 13:48:27.021 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=14044, just started
13:48:27 redis_cache.1 | 14044:C 11 Feb 2025 13:48:27.021 # Configuration loaded
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.021 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.021 * monotonic clock: POSIX clock_gettime
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.021 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.021 * monotonic clock: POSIX clock_gettime
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.023 * Running mode=standalone, port=11000.
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.023 # Server initialized
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.023 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can 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.
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.023 * Running mode=standalone, port=13000.
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.024 # Server initialized
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.024 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can 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.
13:48:27 redis_cache.1 | 14044:M 11 Feb 2025 13:48:27.025 * Ready to accept connections
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * Loading RDB produced by version 7.0.15
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * RDB age 87 seconds
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * RDB memory usage when created 1.31 Mb
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * Done loading RDB, keys loaded: 7, keys expired: 6.
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * DB loaded from disk: 0.001 seconds
13:48:27 redis_queue.1 | 14045:M 11 Feb 2025 13:48:27.025 * Ready to accept connections
13:48:27 socketio.1 | listening on *: 9000
13:48:27 watch.1 | yarn run v1.22.22
13:48:27 watch.1 | warning …/…/package.json: No license field
13:48:27 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
13:48:27 web.1 | * Restarting with inotify reloader
13:48:27 watch.1 | $ node rollup/watch.js
13:48:28 web.1 | * Debugger is active!
13:48:28 web.1 | * Debugger PIN: 218-350-225

@NanduG open it on your browser and share screenshot

this is what I am gettting

Hi,

Is bench running on the same Windows computer as the web browser? What is the operating environment for Frappe?

I am using windows subsystem for linux

Restart system and Try again

Have you tried localhost:8000 ?

Tried restarting a lot but what the problem is somehow redis related services are running again in another process

May be you have setup supervisor for bench which is creating the issue. In development server, never setup supervisor. For now, try removing supervisor and then re-initialize the bench after removing the folder you’ll get your thing working.

I have deleted the current brench and initialized a new bench now after bench start it is running successfully but even though I am getting success response but when I am accessing the 8000 port in browser it is showing

127.0.0.1 does not exist

and in the terminal it is showing 404 against 127.0.0.1