Installing: /bin/sh: 1: redis-server: not found
See original GitHub issueFollowing the setup instructions in the README. Looks like the script is expecting to find Redis at a particular hostname that is not aliased in the Docker stack. At the bench init frappe-bench
step:
# [... pip upgrade, git clone, NPM install etc]
Wrote css/frappe-web.css - 65.05 KB
Wrote js/frappe-web.min.js - 137.98 KB
Wrote js/dialog.min.js - 104.44 KB
Wrote css/desk.min.css - 291.98 KB
Wrote css/frappe-rtl.css - 32.37 KB
Wrote js/libs.min.js - 815.22 KB
Wrote js/desk.min.js - 510.13 KB
Wrote js/d3.min.js - 380.17 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 192.87 KB
Wrote css/list.min.css - 14.43 KB
Wrote js/list.min.js - 139.01 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 257.16 KB
Wrote js/web_form.min.js - 247.22 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
/bin/sh: 1: redis-server: not found
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/bench-repo/bench/commands/make.py", line 21, in init
verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
File "/home/frappe/bench-repo/bench/utils.py", line 78, in init
redis.generate_config(path)
File "/home/frappe/bench-repo/bench/config/redis.py", line 39, in generate_config
"redis_version": get_redis_version(),
File "/home/frappe/bench-repo/bench/config/redis.py", line 59, in get_redis_version
version_string = subprocess.check_output('redis-server --version', shell=True).strip()
File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'redis-server --version' returned non-zero exit status 127
# Just seeing what's available...
frappe@9761a4d8f053:~/frappe-bench$ ping redis
ping: unknown host redis
frappe@9761a4d8f053:~/frappe-bench$ ping redis-cache
PING redis-cache (192.168.48.4) 56(84) bytes of data.
64 bytes from redis-cache.frappedocker_default (192.168.48.4): icmp_seq=1 ttl=64 time=0.304 ms
64 bytes from redis-cache.frappedocker_default (192.168.48.4): icmp_seq=2 ttl=64 time=0.083 ms
^C
--- redis-cache ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.083/0.193/0.304/0.111 ms
Which of the 3 Redis instances is redis-server
supposed to be?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:30 (18 by maintainers)
Top Results From Across the Web
How to solve this problem? /bin/sh: 1: redis-server: not found
When i use bench init frappe-bench && cd frappe-bench get an error… so tell me how to resolve it.
Read more >node.js - redis-server - Command Not Found - Stack Overflow
Node.js is working fine and NPM works fine too. I want to play around with Redis so I ran: npm install redis.
Read more >Installing Redis (Simple) | Instant Redis Optimization How-to
The make install command copies all the executables to the /usr/local/bin folder. The configuration files and init scripts are not yet in place...
Read more >How to Get Redis CLI Without Installing Redis Server
Redis CLI is a REPL read–eval–print loop that speaks to the Redis server. Learn how to get Redis CLI without installing a Redis...
Read more >Download - Redis
All installation options ->. Redis downloads. Docker. You can download and run Redis Docker images from DockerHub. Multiple versions are available, usually ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@carlos22 @sunhoww I started a Docker-Compose overhaul at https://github.com/emcniece/frappe_docker/tree/feat/docker-optimization
The documentation isn’t done yet, but try editing the
docker-compose.yml
and runningdocker-compose up -d
.Lots of the container configuration can be moved into environment variables - the MariaDB and Redis files can be eliminated and config can be specified in the
docker-compose.yml
file.I have added an
entrypoint.sh
script here to take care of first-run setup as well, so we don’t have to spend time messing around and hitting these errors.It’s in ~/frappe-bench of the frappe container. You would have to rename both files to the proper names. Just removing the _docker from the filenames would do.
You dont have to rename them, the click option skip-bench-mkdir will take care of this