1. 程式人生 > >NOAUTH Authentication required redis(二) The server is ruuning without a config file

NOAUTH Authentication required redis(二) The server is ruuning without a config file

    上次進行redis重啟後是可以正常運行了,但是由於工作太忙,而且測試環境一直在用,所以就沒有進行安全設定。直到昨天,一直處於被攻擊狀態,重啟了好幾次。無奈之下只能進行安全設定。

  於是按照網上說的修改redis.conf檔案,但是我是用docker安裝的,redis是以容器形式存在的,由於這個專案啟動的時候我是第一次接觸到這些東西,所以當時gitlab單獨建了個redis,自己做快取的時候又建了個redis容器,加上中間有失敗的,查詢redis.conf檔案的時候發現根本沒有跟我這個redis配套的檔案。問了一個專業運維,對方說不可能沒有這個檔案,要麼你就一個個改。

  好吧,按照大神的思路來。但是我進入這些redis.conf檔案的時候發現其中的資料根本就跟我正在用的redis對應不起來。所以,繼續在網上找方案。一般都是通過config set來設定密碼。這種方案確實可以,只是每當redis重啟的時候設定的密碼就會丟失,原因是這種設定沒有寫入redis.conf檔案。直到在一篇文章中找到config rewrite方法,支援寫入redis.conf檔案,重啟後依然生效。

  這時好像看到了救星,於是開始設定密碼。但是新的問題又來了:The server is ruuning without a config file。具體如下圖:

    這裡說我根本就沒有配置檔案,尷尬了。這個能說明我一直尋找的redis.conf檔案根本就不存在(至少沒有跟我用的相匹配的或者說我根本就沒找到)。看著這個東西的時候徹底放棄通過更改redis.conf檔案來做安全設定了。

    關於The server is ruuning without a config file的問題我在網上搜了,根本就沒有能解決我需要的。沒辦法,只能把原先的redis關了,重新建個容器,重新安裝一個redis。這時我採用的是菜鳥教程裡的方法:

[email protected]:~/redis$ docker run -p 6379:6379 -v $PWD/data:/data  -d redis:3.2 redis-server --appendonly yes

用上邊的方式安裝之後,依然沒有找到redis.conf檔案。好吧,把這個容器刪除,重新安裝。但是上邊的指令我改了下:

[email protected]:~/redis$ docker run -p 1234:6379 -v $PWD/data:/data  -d redis:3.2 redis-server --appendonly yes --requirepass mytest
    乾脆我直接把要設定的密碼在建立的時候給設定好(同時對外的port也改了,因為建立好後同樣不可修改)。OK,執行上邊方法,如果沒其他問題。密碼就設定OK,port也不再是6379。

    搗鼓了半天,總算是把問題解決了。當然我只是個剛接觸docker的開發人員,對其操作真的知道的有限。如果有專業的大神看到,有好的解決方案還請不吝指教。其他朋友也可以給出指點。

相關推薦

NOAUTH Authentication required redis() The server is ruuning without a config file

    上次進行redis重啟後是可以正常運行了,但是由於工作太忙,而且測試環境一直在用,所以就沒有進行安全設定。直到昨天,一直處於被攻擊狀態,重啟了好幾次。無奈之下只能進行安全設定。   於是按照網

NOAUTH Authentication required redis

今天突然之間遇到redis:NOAUTH Authentication required的問題,登入伺服器也無法對redis進行儲存查詢操作。上網查了下說是被黑客攻擊,具體各位可以在網上查到。這裡說下

Redis (error) NOAUTH Authentication required.解決方法

style data- itl digg ews command root details tools 出現認證問題,應該是設置了認證密碼,輸入密碼既可以啦 註意密碼是字符串形式! [plain] view plain copy 127.0.0.1:6379&

Redis服務停止報錯解決方案[NOAUTH Authentication required]

Redis服務停止報錯解決方案[NOAUTH Authentication required] Redis伺服器設定密碼後,使用service redis stop 會出現以下資訊:   service redis stop

redis安全 (error) NOAUTH Authentication required

redis安全 (error) NOAUTH Authentication required   Redis 安全 我們可以通過 redis 的配置檔案設定密碼引數,這樣客戶端連線到 redis 服務就需要密碼驗證,這樣可以讓你的 redis 服務更安全。 例項

service redis stop Stopping ... (error) NOAUTH Authentication required. Waiting

Redis伺服器設定密碼後,使用service redis stop 會出現以下資訊: [[email protected] ~]# service redis stop Stopping ... (error) NOAUTH Authentication required

Redis報錯 : (error) NOAUTH Authentication required.

這個錯誤是因為沒有用密碼登陸認證 , 先輸入密碼試試 . 127.0.0.1:6379> auth "yourpassword" 例如密碼是‘root’,當出現認證問題時候,輸入“auth ‘root’”就可以了. 127.0.0.1:6379> set name "

redis客戶端連線(error) NOAUTH Authentication required

redis客戶端連線成功,但是操作報異常——(error) NOAUTH Authentication required 錯誤的含義是說你沒有認證,說明沒有使用密碼連線 檢視密碼: 進入redis的安裝

redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.

在用jedis叢集中,用ShardedJedisPool對主從進行hash演算法選取redis服務端,然而我在redis主從都設定了密碼,在配置連線時報如下錯誤  at redis.clients.jedis.Protocol.processError(Protocol.

Redis (error) NOAUTH Authentication required. 解決方法

今天去用Jedis去連線我的redis伺服器的時候發現報錯 如何進redis伺服器 在redis的bin資料夾裡,有redis-cli可以進去redis伺服器 如何設定密碼 用vi 進入redis.conf 然後 /requirepasswo

redis (error) NOAUTH Authentication required.

問題描述: 在redis-cli客戶端輸入任務redis命令都會出去以下錯誤 (error) NOAUTH Authentication required. 錯誤截圖: 錯誤分析: 這

Spring boot整合redisNOAUTH Authentication required

1、報這個錯說明redis伺服器設定的有密碼,但客服端訪問時沒有設定密碼。2、在Spring boot的application.properties中配置redis密碼:spring.redis.password=yourpassword,一般認為這樣就可以了,但知道什麼原因

REdis MASTER aborted replication NOAUTH Authentication required

expected use lock sca stat using apr port con 對於REdis集群,如果設置了requirepass,則一定要設置masterauth,否則從節點無法正常工作,查看從節點日誌可以看到哪下內容:19213:S 22 Apr 2019

redis異常解決 :idea啟動本地redis出現 jedis.exceptions.JedisDataException: NOAUTH Authentication required

第一次安裝在本地redis服務,試試跑專案,結果卻出現nested exception is redis.clients.jedi

SQL SERVER – Configuration Manager – Cannot Connect to WMI Provider. You Do Not Have Permission or The Server is Unreachable

hab ssi ima onf wmi manager ges ger connect 打開SQL SERVER Configuarion Manger 出現以下錯誤 SQL Server Configuration Manager—————————Cannot conn

Tomcat伺服器提示:The server is temporarily unable to service your request due to maintenance downtime or capacity problems

今天網站突然不能訪問了,這裡做一下記錄提示: The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again lat

Tomcat服務器提示:The server is temporarily unable to service your request due to maintenance downtime or capacity problems

數據庫連接 gin desc 啟動服務 down 記錄 生效 problems 分析 今天網站突然不能訪問了,這裏做一下記錄提示: The server is temporarily unable to service your request due to mainte

MASTER aborted replication with an error: NOAUTH Authentication required.已解決

MASTER aborted replication with an error: NOAUTH Authentication required. 解決方法: 啟動從redis庫時redis.log報上述錯誤,也

MySQL之——主從server-id不生效,The server is not configured as slave

資料庫已搭建完成,各種配置均已完成,但是在start slave ;的時候,報錯: ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE M

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no

今天碰到了一個查詢異常問題,上網查了一下,感謝原創和譯者 如果你使用的資料庫連線類是 the Data Access Application Blocks "SqlHelper" 或者 SqlClient Class , 你在執行一個很費時的SQL 操作時候,可能就會碰到