redis-server places redis.sock in wrong folder
redis unix socket vs tcp
get_redis_ctx: redis connection error: no such file or directory
redis no such file or directory
redis-server is not running
redis and sockets
Im configuring openvas and the scanner looks for the redis.sock by default in /tmp/redis.sock.
I have edited to the redis.conf config file to show
Upon restarting the service, it instead places the redis.sock in /tmp/systemd-private34823472372937527347-redis-server/tmp/redis.sock
Any help? Debian stretch 9.1 redis-server : 3.2.6
After every restart of the redis-server (sudo service redis-server restart), If I manually move the redis.sock back to /tmp then it fixes the issues. But, not great having to manually move it with every restart of redis-server.
Instead of turning off the privatetmp security feature of systemd configure redis (redis.conf) to use /var/run/redis/redis.sock and add the following to your $prefix/etc/openvas/openvassd.conf:
kb_location = /var/run/redis/redis.sock
redis server version 3.2.6 places redis.sock in wrong directory , On debian stretch 9.1, after editing the redis.conf file and adding unixsocket /tmp/redis.sock unixsocketperm 777 Upon restarting the service, Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. redis-server places redis.sock in wrong folder
If your Privatetemp is set to enabled in your systemd file then it will create it in this private directory. Simply turning that off worked great
redis.conf, redis-server /path/to/redis.conf # Note on units: when memory size is needed, it is There is no default, so Redis will not listen # on a unix socket when not specified. is best effort: if Redis is not able to create it # nothing bad happens, the server Since version 5 of RDB a CRC64 checksum is placed at the end of the file. I've confirmed that the socket file is there when redis.server starts up. I'm trying to start up openvassd, but getting the following error: (openvassd:20208): lib kb_redis-CRITICAL **: get_redis_ctx: redis connection error: No such file or directory
I had similar issue where openvas-check-status resulted in:"
FIX: You should start the redis-server or configure it to listen on socket: /var/run/redis-openvas/redis-server.sock
Reviewing the loading process I found these error in the log files:
redis-server.service: Can't open PID file /var/run/redis/redis-server.pid(yet?) after start: No such file or directory
I know its bad practice but it solved the issue for me, I run:
chmod 777 redis-server-openvas.log
**also - it should be noted that I also attempted a whole lot of other fixes before doing that , so maybe it was a combination of some of them, and this one just help finishing it off.
How to Edit the Redis Configuration File, Redis is configured by making changes to a configuration file named redis.conf. The location for your redis.conf file will depend on how you installed it, but If port 0 is specified Redis will not listen on a TCP socket. port 6379 if Redis is not able to create it # nothing bad happens, the server will start and ls -la /tmp/redis.sock srwxrwxrwx 1 iportal wheel 0B 1 úno 11:31 /tmp/redis.sock You should do every step again in Redis section. This comment has been minimized.
redis.conf, redis-server /path/to/redis.conf # Note on units: when memory size is needed, it is You can specify a custom pid file location here. pidfile /var/run/redis.pid There is no default, so Redis will not listen # on a unix socket when not specified. like a server power outage, or a single write if something # wrong with the Redis atm, there seems no possibility to use unix domain socket instead of tcp socket to connect to redis. due to speed issues, that'd be a great benefit
redis: redis.conf, redis-server /path/to/redis.conf 7 8 # Note on units: when memory size is There is no default, so Redis will not listen 107 # on a unix socket when not specified. if Redis is not able to create it 227 # nothing bad happens, the server will start and Since version 5 of RDB a CRC64 checksum is placed at the end of the file. time redis-benchmark -s /tmp/redis.sock 42.90 real 34.96 user 7.42 sys A 14% speed difference is significant and we should take advantage of this even when using Docker.
Using Redis in a hostile environment (Advanced), You can typically find this out by running ps caux |grep redis-server. It is important that you protect the Redis data directory, and not individual data files, Enabling Redis to listen on a Unix socket is fairly straightforward: someone who wanted to do bad things could easily write a program to repeatedly The Greenbone Community Edition (GCE, being a derivate of the GSM ONE) comes as a virtual machine and allows for fast and easy way of testing our solution on Windows, Linux or Mac.