ERPNext.com Frappe Cloud Documentation Partners Frappe School Public Chat

Bench start failed (frappe docker)

my frappe docker bench start command failed with following error

Hi,

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/cli.py”, line 121, in cli
raise e
File “/home/frappe/.bench/bench/cli.py”, line 111, in cli
bench_command()
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 1128, in call
return self.main(*args, **kwargs)
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 1053, in main
rv = self.invoke(ctx)
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/.local/lib/python3.9/site-packages/click/core.py”, line 754, in invoke
return __callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/setup.py”, line 53, in setup_redis
generate_config(".")
File “/home/frappe/.bench/bench/config/redis.py”, line 15, in generate_config
redis_version = get_redis_version()
File “/home/frappe/.bench/bench/config/redis.py”, 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/subprocess.py”, 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/subprocess.py”, 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 https://github.com/frappe/frappe_docker/tree/main/development#edit-honchos-procfile

you can change db and redis hosts in common_site_config.json using these commands https://github.com/frappe/frappe_docker/tree/main/development#setup-hosts

closing this cause i figured it out

it was the issue with seting redis port in site config

try restarting the system