Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

2 votes
1 answers
127 views
CentOS - Specifying an alternate redis.conf with systemctl
I used `systemctl` to enable automatic start up of `redis` on my server. This works fine. But I would like to change the name of my `redis.conf`, and have multiple `redis` instances. How do I use `systemctl` to start `redis` with the non-default configuration file? --- I used this command to start m...
I used systemctl to enable automatic start up of redis on my server. This works fine. But I would like to change the name of my redis.conf, and have multiple redis instances. How do I use systemctl to start redis with the non-default configuration file? --- I used this command to start my redis instance before: sudo systemctl enable redis
TheCatWhisperer (121 rep)
Oct 4, 2017, 03:49 PM • Last activity: May 2, 2025, 07:01 PM
0 votes
0 answers
1052 views
Why is the connection refused by the redis-server?
There is an instance of redis server running on centos 7.6, and it looks fine there (192.168.0.24:6379). I have tried to connect to this server by a client from another machine in same network (192.168.0.22). There is an incoming request from that client in tcpdump interfaces. The monitor of redis s...
There is an instance of redis server running on centos 7.6, and it looks fine there (192.168.0.24:6379). I have tried to connect to this server by a client from another machine in same network (192.168.0.22). There is an incoming request from that client in tcpdump interfaces. The monitor of redis service doesn't show anything.. so it is obvious something block connection which make me suspect on firewall of course.. I did exactly what this article says.. no problem occurred during installation, But still I get message like: > "No connection could be made because the target machine actively > refused it 192.168.0.24:6379" **Note**: redis is running on port 6379
Y3N3RRR (139 rep)
Apr 22, 2019, 10:18 PM • Last activity: Apr 29, 2025, 08:41 AM
0 votes
1 answers
1623 views
Why does the redis-server take too long to load in memory the database at boot?
My Linux distribution uses the `redis` database. At boot the `redis-server` needs about 80 seconds to load the dataset. The following is a log that shows what I have written: ``` redis-server[249]: 249:M 17 Oct 2022 16:29:55.173 * DB loaded from append only file: 79.442 seconds ``` If a Python progr...
My Linux distribution uses the redis database. At boot the redis-server needs about 80 seconds to load the dataset. The following is a log that shows what I have written:
redis-server: 249:M 17 Oct 2022 16:29:55.173 * DB loaded from append only file: 79.442 seconds
If a Python program tries querying the database before the redis-server has finished the loading in memory operation, it is raised the Exception: redis.exceptions.BusyLoadingError. The Exception description is: Redis is loading the dataset in memory and is compliant with the context that I have described (that is the database is loading data in memory). Because I'm using the default configuration of redis-server in this moment I don't know exactly what is the type of persistence used by redis-server. The file redis.conf is very long so, here, I report settings that I think are most important:
...
########################### SNAPSHOTTING  ###########################
#
# Save the DB on disk:
#
#   save  
#
#   Will save the DB if both the given number of seconds and the given
#   number of write operations against the DB occurred.

# OE: tune for a small embedded system with a limited # of keys.
save 120 1
save 60 100
save 30 1000

######################### APPEND ONLY MODE #########################
# OE: changed default to enable this
appendonly yes

# The name of the append only file (default: "appendonly.aof")
appendfilename "appendonly.aof"
...
These settings (in particular appendonly yes) seem indicate that the persistence type used by the database is: Append Only File (AOF). I think these settings are causing this long loading time. Is it possible to use settings that avoid a too long loading time at boot?
User051209 (498 rep)
Oct 17, 2022, 03:43 PM • Last activity: Apr 29, 2025, 04:46 AM
0 votes
1 answers
155 views
How to compare output of a program with a reference value in a shell script?
I have my own implementation of a Redis server which I'd like to test through a shell script. The general idea is to feed it with some commands through `nc`, and since `nc` prints the output of my program (response) to `stdout`, to capture the response in a script variable and compare it with the ex...
I have my own implementation of a Redis server which I'd like to test through a shell script. The general idea is to feed it with some commands through nc, and since nc prints the output of my program (response) to stdout, to capture the response in a script variable and compare it with the expected output. I haven't been able to get it to work and I don't know what the issue is and how to solve it. This is a part of the script:
#!/bin/bash

set -eu

PORT=6380;

RUST_LOG=info ./run.sh --port $PORT 2>/dev/null & sleep 1; # Give it some time to start.

i=0;

i=$((i+1)); printf 'Running test #%d...' "$i";
response=$(printf "*1\r\n\$4\r\nPING\r\n" | nc localhost $PORT);
if [ "$response" = '+PONG\r\n' ]; then
  printf ' PASSED'
else
  printf ' FAILED\nGot:\n%s\n\n' "$response"
fi;
sleep 0.1;

pkill redis-server;
That's just one example of a test. When a user sends the PING command, the expected response is PONG, but it is encoded and sent back as +PONG\r\n. The CLI output of this test run ($ ./test.sh) is:
Running test #1... FAILED
Got:
+PONG
So, it seems that the variable $response indeed contains what it should. I tried removing +, \r, \n, \r\n from the reference output to no avail, just to see if that would help. I'll have more complicated tests that include a character that needs to be escaped ($), such as \$5\r\nHello, in the response. By the way, manually setting response works as expected.
response='+PONG\r\n';
if [ "$response" = '+PONG\r\n' ]; then
  echo Equal
else
  echo Different
fi;
This prints Equal, as expected. After adding debug output through set -ex, I can see that $response stores +PONG\r, i.e., without \n.
Running test #1...++ printf '*1\r\n$4\r\nPING\r\n'
++ nc localhost 6380
+ response=$'+PONG\r'
+ '[' $'+PONG\r' = '+PONG\r\n' ']'
+ printf ' FAILED\nGot:\n%s\n\n' $'+PONG\r'
 FAILED
Got:
+PONG
Okay, so then setting the reference output to +PONG\r should work, right?
Running test #1...++ printf '*1\r\n$4\r\nPING\r\n'
++ nc localhost 6380
+ response=$'+PONG\r'
+ '[' $'+PONG\r' = '+PONG\r' ']'
+ printf ' FAILED\nGot:\n%s\n\n' $'+PONG\r'
 FAILED
Got:
+PONG
Clearly not. I tried wrapping response in {}, like this: if [ "${response}" = '+PONG\r' ]; then, to no avail. What am I missing? I'm also curious to know how and why \n got lost. I'm running it from zsh on a mac if that should be noted, but the shebang clearly tells it to use bash. If I execute ps -p $$ from the test script, I get 51547 ttys003 0:00.02 /bin/bash ./test.sh.
ivanbgd (111 rep)
Apr 17, 2025, 03:55 PM • Last activity: Apr 18, 2025, 05:43 AM
0 votes
2 answers
2841 views
Unable to establish an SSH tunnel using Redis Desktop Manager
I am trying to connect to an Elasticache Redis Server via an AWS Ubuntu instance and using an ssh tunnel. When I try to configure Redis Desktop Manager to connect via an ssh tunnel and provide credentials and .pem file, I have authentication issues. However, this same .pem file doesn't create issues...
I am trying to connect to an Elasticache Redis Server via an AWS Ubuntu instance and using an ssh tunnel. When I try to configure Redis Desktop Manager to connect via an ssh tunnel and provide credentials and .pem file, I have authentication issues. However, this same .pem file doesn't create issues when I try to connect via shell. Am I missing something here ? should I change the file permission (as for now it is 400). This a screenshot on the errors shown on the RDM system log enter image description here
Addonis1990 (101 rep)
Jan 22, 2016, 01:59 AM • Last activity: Apr 17, 2025, 09:05 AM
0 votes
1 answers
1914 views
Remove temporary files from disk caused by Redis command BGREWRITEAOF
Context description --- My Linux distribution contains redis-server 6.0.5. Redis is configured to use persistence `AOF` (Append Only File) and the `RDB` persistence is disabled ([Redis persistence](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/)). At boot a script request...
Context description --- My Linux distribution contains redis-server 6.0.5. Redis is configured to use persistence AOF (Append Only File) and the RDB persistence is disabled ([Redis persistence](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/)) . At boot a script requests to redis-server the execution of BGREWRITEAOF command. This request starts a process (with PID=`) which creates a file temp-rewriteaof-.aof in the same data Redis path where is written the appendonly.aof` file. This is the normal working of BGREWRITEAOF command. The usefulness of this command is proved by what it's written in [this post](https://unix.stackexchange.com/questions/721321/why-does-the-redis-server-take-too-long-to-load-in-memory-the-database-at-boot) . What's the problem --- The problem comes when the system is switch off while the BGREWRITEAOF is not completed. In this case the file temp-rewriteaof-.aof is still present at reboot and it takes up space on the disk. Because the system can be switch off in every moment I risk that my disk can become full. In my opinion, the unique solution for this problem is to create a script that remove all files temp-rewriteaof-*.aof from the data Redis folder. Question --- Does someone know a better solution? Redis has got a **clean** procedure/command for solve this problem?
User051209 (498 rep)
Oct 28, 2022, 02:34 PM • Last activity: Feb 21, 2025, 09:59 AM
1 votes
2 answers
1341 views
Starting a background job on the remote host over ssh hangs the calling script
I have this code : ``` for i in $ipb $ipc $ipd; do ssh -i ~/.ssh/'key' 'name'@${i} /bin/bash Enter to be able to type other commands. The problem is not Redis-related, but most likely comes from how the script is written, so no need to know about Redis for this one I think.  Ssh is also working...
I have this code : ``` for i in $ipb $ipc $ipd; do ssh -i ~/.ssh/'key' 'name'@${i} /bin/bash Enter to be able to type other commands. The problem is not Redis-related, but most likely comes from how the script is written, so no need to know about Redis for this one I think.  Ssh is also working fine. What must I change to make it run all three commands (one on each IP address)?
aveillon (21 rep)
Mar 24, 2021, 01:20 AM • Last activity: Jan 3, 2025, 07:08 AM
0 votes
2 answers
1248 views
Open web browser on host machine via private ip after installing software on Linux server
I need to open a web browser on the host machine. I am given a private IP address after installing software on a Red Hat Enterprise 7.9 Linux server. Here are the steps I have taken so far: - SSH into server using a 'SSH name@serverAddress' - I follow the instructions and install Redis Enterprise fo...
I need to open a web browser on the host machine. I am given a private IP address after installing software on a Red Hat Enterprise 7.9 Linux server. Here are the steps I have taken so far: - SSH into server using a 'SSH name@serverAddress' - I follow the instructions and install Redis Enterprise for Red Hat Enterprise 7.9 - It is a success and gives me the following instructions inside the Linux terminal where I installed the software.
[!] Please logout and login again to make sure all environment changes are applied.
[!] Point your browser at the following URL to continue:
[!] https://privateIpAddress:8443 
I would now like to follow these instructions. Where do I go to open this browser? If you would like the full instructions, they can be found here. I am on step 2: set up a cluster. https://docs.redislabs.com/latest/rs/getting-started/ My current thoughts (very possible they are wrong): I return to where the terminal where I originally SSH into the Linux box and type some command. Possibly something like
ssh -L 127.0.0.1:80:intra.example.com:80 gw.example.com
But I do not know what the exact command would be. Or I do something inside the actual Linux server to open the browser. I believe the answer is extremely easy and it is escaping me. Otherwise, they would have noted something to the instructions. once again, the information I have is: - SSH name@myserveraddress - and now a private IP: - https://privateIpAddress:8443 And this obviously does not open on a browser on my local machine. Let me know if I need to give any more information. Thanks
brandog (101 rep)
Jan 5, 2021, 01:44 PM • Last activity: May 31, 2024, 08:53 AM
0 votes
0 answers
869 views
How to install redis 7.2 on amazon linux 2023
How to install redis 7.2 on amazon linux 2023. When I do the default installation it only install redis 6.x.
How to install redis 7.2 on amazon linux 2023. When I do the default installation it only install redis 6.x.
kumar (221 rep)
Mar 1, 2024, 06:56 AM
0 votes
0 answers
2323 views
Getting message A stop job is running advanced key-value store no limit
I am using ubuntu OS. when I started my system I am seeing a message " A stop job is running advanced key-value store no limit". My Laptop screen is stuck not able to do anything. Can anyone help me How to fix this.
I am using ubuntu OS. when I started my system I am seeing a message " A stop job is running advanced key-value store no limit". My Laptop screen is stuck not able to do anything. Can anyone help me How to fix this.
sandeep singh (1 rep)
Jul 4, 2023, 05:38 AM • Last activity: Jul 4, 2023, 06:20 AM
1 votes
1 answers
1243 views
How to use redis-cli to export the values of a list only?
I am trying to export all values of a redis list using `redis-cli` as a list of strings in shell scripts. However, there are some unwanted text that I couldn't get rid of. For the following list `q1`: redis:6379> 5 lpush q1 "{\"id\":1}" (integer) 1 (integer) 2 (integer) 3 (integer) 4 (integer) 5 red...
I am trying to export all values of a redis list using redis-cli as a list of strings in shell scripts. However, there are some unwanted text that I couldn't get rid of. For the following list q1: redis:6379> 5 lpush q1 "{\"id\":1}" (integer) 1 (integer) 2 (integer) 3 (integer) 4 (integer) 5 redis:6379> If I export it directly using LRANGE, the result has a row number and a parenthesis at the beginning of each line (which needs to be removed). :/# redis-cli -h redis LRANGE q1 0 -1 1) "{\"id\":1}" 2) "{\"id\":1}" 3) "{\"id\":1}" 4) "{\"id\":1}" 5) "{\"id\":1}" If I use redis-cli --csv, there is a comma between values (that needs to be removed): :/# redis-cli -h redis --csv LRANGE q1 0 -1 "{\"id\":1}","{\"id\":1}","{\"id\":1}","{\"id\":1}","{\"id\":1}" *How can I make redis export just the list values, one in each row?*
tinlyx (1072 rep)
Jul 1, 2023, 03:53 PM • Last activity: Jul 2, 2023, 03:47 PM
25 votes
3 answers
46471 views
systemd rejecting with 'more than one ExecStart= setting'
I'm trying to write a systemd service file for redis. Here's my file: [Unit] PartOf=smp-data-services.target Description=Redis persistent key-value database After=network.target [Service] ExecStart=/opt/eg/share/redis/bin/redis-server ExecStop=/opt/eg/share/redis/bin/redis-cli Restart=on-failure Use...
I'm trying to write a systemd service file for redis. Here's my file: [Unit] PartOf=smp-data-services.target Description=Redis persistent key-value database After=network.target [Service] ExecStart=/opt/eg/share/redis/bin/redis-server ExecStop=/opt/eg/share/redis/bin/redis-cli Restart=on-failure User=eg Group=eg [Install] WantedBy=multi-user.target No matter what I do, I keep getting: # systemctl daemon-reload systemd: redis.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing. I can start redis on the command line with no issue like this: /opt/eg/share/redis/bin/redis-server I've read that redis' daemonized forking process is non-standard, and I should avoid Type=forking or oneshot.
rajat banerjee (401 rep)
Dec 7, 2017, 02:18 AM • Last activity: Apr 13, 2022, 06:14 AM
0 votes
1 answers
674 views
Rspamd Ratelimit doesn't work
I have set up my rspamd and redis server but the ratelimit doesn't work. The Rspamd speaks to Postfix and my log file doesnt show anything unusual. Even GTUBE works --> So, the spam protection works because rspamd won't accept e-mails with the following content: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STA...
I have set up my rspamd and redis server but the ratelimit doesn't work. The Rspamd speaks to Postfix and my log file doesnt show anything unusual. Even GTUBE works --> So, the spam protection works because rspamd won't accept e-mails with the following content: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X The ratelimit file is stored in /etc/rspamd/local.d/ratelimit.conf and its actually the configuration, which rspamd provides --> https://rspamd.com/doc/modules/ratelimit.html # local.d/ratelimit.conf servers="127.0.0.1"; rates { # Selector based ratelimit some_limit = { selector = 'user.lower'; # You can define more than one bucket, however, you need to use array syntax only bucket = [ { burst = 1; rate = "1 / 1min"; } ] } } The rspamd-log shows the following lines: 2022-01-02 11:04:26 #64526(main) ; lua; ratelimit.lua:767: enabled ratelimit: some_limit [1 msgs burst, 0.016666666666667 msgs/sec rate] 2022-01-02 11:04:26 #64526(main) ; cfg; rspamd_init_lua_filters: init lua module ratelimit The command "rspamadm configtest" says --> syntax OK I've added the following lines into the main.cf: milter_protocol = 6 milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen} milter_default_action = accept smtpd_milters = inet:127.0.0.1:11332 non_smtpd_milters = inet:127.0.0.1:11332 However, if i open the redis-cli and search for keys, no keys are stored regarding the redis chache. I've set up the redis configuration as well and i used the following tutorial: https://linuxize.com/post/install-and-integrate-rspamd/ Thank you for your help in advance
cd4user (33 rep)
Jan 2, 2022, 11:27 AM • Last activity: Jan 2, 2022, 02:08 PM
3 votes
5 answers
7275 views
How to resolve systemd (code=exited, status=227/NO_NEW_PRIVILEGES)?
I am trying to install the GitLab community package on a Debian Stretch system, but one of its dependencies, `redis-server`, fails to install when starting the service using systemd. Complete log: ------------- $ sudo dpkg --configure redis-server Setting up redis-server (3:3.2.5-4) ... Job for redi...
I am trying to install the GitLab community package on a Debian Stretch system, but one of its dependencies, redis-server, fails to install when starting the service using systemd. Complete log: ------------- $ sudo dpkg --configure redis-server Setting up redis-server (3:3.2.5-4) ... Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details. invoke-rc.d: initscript redis-server, action "start" failed. ● redis-server.service - Advanced key-value store Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2016-12-15 15:00:17 UTC; 31ms ago Docs: http://redis.io/documentation , man:redis-server(1) Process: 8764 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=227/NO_NEW_PRIVILEGES) Process: 8761 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=227/NO_NEW_PRIVILEGES) Main PID: 24283 (code=exited, status=227/NO_NEW_PRIVILEGES) Dec 15 15:00:17 Serverdatorn-Debian systemd: redis-server.service: Unit entered failed state. Dec 15 15:00:17 Serverdatorn-Debian systemd: redis-server.service: Failed with result 'exit-code'. dpkg: error processing package redis-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: redis-server Starting redis-server by running the executable manually works perfectly: $ sudo /usr/bin/redis-server /etc/redis/redis.conf $ sudo tail /var/log/redis/redis-server.log ... * The server is now ready to accept connections on port 6379 If there is any other information you want me to provide, please tell me. EDIT: ------ I tried setting NoNewPrivileges to both yes and no in the redis.service file, reloading and starting it again, but no luck, same error. I did find that running journalctl -xe showed another message that might be helpful: redis-server.service: Failed at step NO_NEW_PRIVILEGES spawning /usr/bin/redis-server: Invalid argument
Tankernn (33 rep)
Dec 15, 2016, 03:11 PM • Last activity: Oct 23, 2021, 05:14 PM
0 votes
1 answers
781 views
Iptables blocks localhost from accessing redis
I have the following iptables rules: ```` -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -s MY_IP_ADDRESS/32 -p tcp -m tcp --dport 6379 -j ACCEPT -A INPUT -s 127.0.0.1/32 -i lo -p tcp -m tcp --dport 6379 -j ACCEPT -A INPUT -j DROP -A OUTPUT -p...
I have the following iptables rules:
`
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s MY_IP_ADDRESS/32 -p tcp -m tcp --dport 6379 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -i lo -p tcp -m tcp --dport 6379 -j ACCEPT
-A INPUT -j DROP
-A OUTPUT -p tcp -m tcp --sport 22 -j ACCEPT
`` As you can see, I can ssh into my server from everywhere, and I can access my redis db from my local IP (MY_IP_ADDRESS) and localhost. From my computer itself,
-cli -h xx.xx.xx.xx -p 6379
works. But on the server itself, I cannot connect to the redis db from
-cli
. When I delete the following iptables rule, it works again:
`
-A INPUT -j DROP
` How can I allow localhost connections to my redis server?
Sam Leurs (131 rep)
Sep 28, 2021, 08:41 PM • Last activity: Sep 28, 2021, 08:51 PM
4 votes
2 answers
16899 views
nftables allow redis only from specific IP addresses
I am configuring a REDIS server and I want to allow connections only from a set of specific IP addresses. This is a Debian 10 server, and the recommended framework to use is nft, which I haven't used in the past. The default ruleset is this: #!/usr/sbin/nft -f flush ruleset table inet filter { chain...
I am configuring a REDIS server and I want to allow connections only from a set of specific IP addresses. This is a Debian 10 server, and the recommended framework to use is nft, which I haven't used in the past. The default ruleset is this: #!/usr/sbin/nft -f flush ruleset table inet filter { chain input { type filter hook input priority 0; } chain forward { type filter hook forward priority 0; } chain output { type filter hook output priority 0; } } What rule do I need to add in that file to allow incoming connections to redis from IP 1.1.1.1 and 2.2.2.2, dropping everything else? REDIS is using port 6379.
Miguel Mesquita Alfaiate (449 rep)
Dec 23, 2019, 10:24 AM • Last activity: Jul 28, 2021, 07:05 AM
5 votes
5 answers
18898 views
Cannot install redis server
Tried to install redis-server using Kubuntu 16.04 64 bit version using: sudo apt install redis-server But receive this message while installing: Setting up redis-server (2:3.0.7-1~dotdeb+6.1) ... Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.s...
Tried to install redis-server using Kubuntu 16.04 64 bit version using: sudo apt install redis-server But receive this message while installing: Setting up redis-server (2:3.0.7-1~dotdeb+6.1) ... Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details. invoke-rc.d: initscript redis-server, action "start" failed. dpkg: error processing package redis-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: redis-server E: Sub-process /usr/bin/dpkg returned an error code (1) Tried to run "journalctl -xe" and found this: redis-server.service: PID file /var/run/redis/redis-server.pid not readable (yet?) after start-post: No such file or directory Any idea to fix this issue? *** Update *** "df -h" result: Filesystem Size Used Avail Use% Mounted on udev 3,9G 0 3,9G 0% /dev tmpfs 789M 9,6M 780M 2% /run /dev/sda2 909G 24G 840G 3% / tmpfs 3,9G 175M 3,7G 5% /dev/shm tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup /dev/sda1 511M 3,6M 508M 1% /boot/efi tmpfs 789M 0 789M 0% /run/user/118 tmpfs 789M 12K 789M 1% /run/user/1000 "df -h /var/run" result: Filesystem Size Used Avail Use% Mounted on tmpfs 789M 9,6M 780M 2% /run
Yansen Tan (181 rep)
Mar 15, 2017, 04:57 PM • Last activity: Apr 10, 2021, 06:47 PM
2 votes
2 answers
9226 views
Redis logfile permission error, but the permission is already 777
gentoo /var/log/redis # ls -al total 8 drwxrwxr-x 2 root redis 4096 12月 3 16:05 . drw-rw-r-- 5 root root 4096 12月 3 15:57 .. -rwxrwxrwx 1 redis redis 0 12月 3 16:05 redis.log gentoo /var/log/redis # sudo -u redis redis-server /etc/redis.conf *** FATAL CONFIG FILE ERROR *** Reading the configuration f...
gentoo /var/log/redis # ls -al total 8 drwxrwxr-x 2 root redis 4096 12月 3 16:05 . drw-rw-r-- 5 root root 4096 12月 3 15:57 .. -rwxrwxrwx 1 redis redis 0 12月 3 16:05 redis.log gentoo /var/log/redis # sudo -u redis redis-server /etc/redis.conf *** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 175 >>> 'logfile /var/log/redis/redis.log' Can't open the log file: Permission denied I can run redis-server with root user, but I need run it with redis user. And then it print this error log. OS & redis version: Linux gentoo 4.12.12-gentoo #1 SMP Wed Oct 4 09:05:50 CST 2017 x86_64 Virtual CPU a7769a6388d5 GenuineIntel GNU/Linux Redis server v=4.0.2 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=4504b17bcfd3837e
Vonfry (248 rep)
Dec 3, 2017, 08:08 AM • Last activity: Apr 9, 2021, 04:48 AM
0 votes
1 answers
83 views
The RAM load is constantly increasing. Is it possible to reduce it?
RAM load rises to 85% from 32G I have varnish and nginx installed on my server. Recently I noticed that the load on RAM is very high. I am afraid that it will continue to grow and the site will stop working. My varnish has duplicated 200 treads in htop. it does not seem that if you reduce them, then...
RAM load rises to 85% from 32G I have varnish and nginx installed on my server. Recently I noticed that the load on RAM is very high. I am afraid that it will continue to grow and the site will stop working. My varnish has duplicated 200 treads in htop. it does not seem that if you reduce them, then the load will be less. I changed this in the daemon's natsryok but the threads are still 200 after rebooting the server In htop, I have from large loads Redis. enter image description here mysqld enter image description here and 200 varnish threads enter image description here enter image description here
SMA.s0.g_bytes  44.33M  0.00 . 44.31M 44.31M 44.31M
SMA.s0.g_space 6.81G 0.00 . 6.81G 6.81G 6.81G
SMA.Transient.g_bytes 602.84K 0.00 . 601.85K 601.85K 601.85K
enter image description here
MAIN.cache_hit 24576 0.00 12.21 0.39 0.43 0.43
MAIN.cache_miss 3730 0.00 1.85 1.92 2.07 2.07
MAIN.threads 200 0.00 . 200.00 200.00 200.00
How do I reconfigure the system to work correctly? and did not load my RAM activity on the site is now small. Server characteristics: CPU(s): 64 x Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz (2 Sockets) RAM: 32G 1TB NVME SSD Varnish configs: /lib/systemd/system/varnish.service enter image description here
[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,7018m
ExecReload=/usr/share/varnish/varnishreload
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target
/etc/default/varnish enter image description here
DAEMON_OPTS="-a :6081 \
#             -T localhost:6082 \
#             -f /etc/varnish/default.vcl \
#             -S /etc/varnish/secret \
             -p http_resp_hdr_len=65536 \
             -p http_resp_size=98304 \
	     -p vcc_allow_inline_c=on \
             -p thread_pool_add_delay=2 \
             -p thread_pools=2 \
             -p thread_pool_min=25 \
             -p thread_pool_max=70 \
             -p timeout_linger=50 \
             -p first_byte_timeout=300 \
             -p pipe_timeout=300 \
             -p cli_buffer=65536 \
             -p syslog_cli_traffic=off \
             -p workspace_backend=64k \
             -p feature=+esi_disable_xml_check,+esi_ignore_other_elements,+esi_ignore_https \
             -T 127.0.0.1:6082 \
             -u varnish -g varnish \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
	     -t 172800 \
             -s malloc,7018m"
Alice (3 rep)
Feb 5, 2021, 04:03 PM • Last activity: Feb 5, 2021, 04:26 PM
4 votes
2 answers
1692 views
Unable to create a proper PEM for Redis Desktop Manager
On Ubuntu, I have a problem to establish a connection to redis server using SSH tunnel **and** SSH key with Redis Desktop Manager (RDM). What are the symptoms? - I can connect to the server where redis is running using "plain" `ssh` and my `id_rsa`, - other utilities which use either the SSH agent o...
On Ubuntu, I have a problem to establish a connection to redis server using SSH tunnel **and** SSH key with Redis Desktop Manager (RDM). What are the symptoms? - I can connect to the server where redis is running using "plain" ssh and my id_rsa, - other utilities which use either the SSH agent or keys in .ssh can connect to this server and create tunnels (e.g. DB apps), - I can connect with RDM to redis servers using SSH tunnel **and** password (so the question is not a duplicate of https://unix.stackexchange.com/questions/256912/unable-to-establish-an-ssh-tunnel-using-redis-desktop-manager) ; but this is not a perfect solutions, because I would rather use private/public keys authorization, - I cannot convert keys in .ssh to a *working* PEM format required by RDM: any PEM files I've generated using different methods I googled are rejected by RDM with a message Connection: Disconnect on error: SSH Connection error(Authentication Error): Unable to extract public key from private key file: Unable to open private key file, - I tried entering either a path to id_rsa (~/.ssh/id_rsa) or just a path to a directory where my private key is stored (~/.ssh). So, does anyone have an idea how to properly convert my SSH keys to a PEM format RDM needs and accepts?
jacek.ciach (198 rep)
Dec 2, 2018, 11:52 AM • Last activity: Jan 28, 2021, 07:16 PM
Showing page 1 of 20 total questions