Bench start failed (frappe docker)

my frappe docker bench start command failed with following error


Is this happening on first use of a new installation? it may help to say the operating environment and tell us a bit of the history of commands that were issued prior to this event. What does bench setup redis return?

yes it is happening on first use of new installation

enviornment is docker container in vs code windows

aftersome workarround now the error changed to

the comands used before bench start was
bench set-redis-cache-host redis-cache:6379
bench set-redis-queue-host redis-queue:6379
bench set-redis-socketio-host redis-socketio:6379

as per git doc

im just a beginer in frappe, sorry for any in incomplete info.

ERROR: Command ‘redis-server --version’ returned non-zero exit status 127.
Traceback (most recent call last):
File “/home/frappe/.local/bin/bench”, line 33, in
sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())
File “/home/frappe/.bench/bench/”, line 121, in cli
raise e
File “/home/frappe/.bench/bench/”, line 111, in cli
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 1128, in call
return self.main(*args, **kwargs)
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 1053, in main
rv = self.invoke(ctx)
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/.local/lib/python3.9/site-packages/click/”, line 754, in invoke
return __callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/”, line 53, in setup_redis
File “/home/frappe/.bench/bench/config/”, line 15, in generate_config
redis_version = get_redis_version()
File “/home/frappe/.bench/bench/config/”, line 82, in get_redis_version
version_string = subprocess.check_output(‘redis-server --version’, shell=True)
File “/home/frappe/.pyenv/versions/3.9.9/lib/python3.9/”, line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/home/frappe/.pyenv/versions/3.9.9/lib/python3.9/”, line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘redis-server --version’ returned non-zero exit status 127.

this is the result for bench setup redis

Has redis-server been installed on the host? Does redis-cli open?

this is my docker container

Without experience with Docker installs, I will hope someone else can help. If your needs are immediate you may try contacting Castlecraft for help.

thanks for your time buddy

you’ve to make sure the redis and db hosts are pointing to containers instead of localhost

make sure you don’t start redis with bench start, as it is already running as container

refer frappe_docker/development at main · frappe/frappe_docker · GitHub

you can change db and redis hosts in common_site_config.json using these commands frappe_docker/development at main · frappe/frappe_docker · GitHub

closing this cause i figured it out

it was the issue with seting redis port in site config

try restarting the system