【Redis】Redis集群搭建错误解决方案 “FATAL CONFIG FILE ERROR Reading the configuration file,at line2… ”
2018-03-05 15:03
507 查看
【背景】
在Linux上搭建Redis集群,搭建伪分布式,所以只用一台虚拟机运行6个redis实例。redis安装还算顺利,修改好配置文件里的端口号,写好了启动所有redis的.sh文件,启动的时候,报配置文件有错。如下图
【解决方案】
我当时一脸懵,看来是第一个配置文件改的时候,就改出问题了,因为后面几个redis都是复制的第一个的redis。仔细看报错信息,第二行有误,怎么还有welcome to nginx 了呢?上网查解决方案,未果。但冥冥就觉得配置文件不对劲。
寻求帮助的时候又到了,小伙伴检查.sh文件,没有问题,尝试只启动一个redis,这时一个都起不来了。但是在改redis.conf之前redis是可以起来的。所以我们判定就是配置文件有问题。
于是乎,最直接的解决方案,就是传来了一个正确的配置文件。使用WinSCP把redis-cluster文件下的redis.conf文件都替换了一遍(对应端口的conf文件替换)。
然后再运行.sh文件,所有的redis都启动成功了!
已把正确的redis.conf上传到csdn资源,有需要的小伙伴自行下载。
【小结】
发现了一个惊人的规律,逢改配置文件,必出问题。下次我先备份好一份配置文件再动手改。
在Linux上搭建Redis集群,搭建伪分布式,所以只用一台虚拟机运行6个redis实例。redis安装还算顺利,修改好配置文件里的端口号,写好了启动所有redis的.sh文件,启动的时候,报配置文件有错。如下图
【解决方案】
我当时一脸懵,看来是第一个配置文件改的时候,就改出问题了,因为后面几个redis都是复制的第一个的redis。仔细看报错信息,第二行有误,怎么还有welcome to nginx 了呢?上网查解决方案,未果。但冥冥就觉得配置文件不对劲。
寻求帮助的时候又到了,小伙伴检查.sh文件,没有问题,尝试只启动一个redis,这时一个都起不来了。但是在改redis.conf之前redis是可以起来的。所以我们判定就是配置文件有问题。
于是乎,最直接的解决方案,就是传来了一个正确的配置文件。使用WinSCP把redis-cluster文件下的redis.conf文件都替换了一遍(对应端口的conf文件替换)。
然后再运行.sh文件,所有的redis都启动成功了!
已把正确的redis.conf上传到csdn资源,有需要的小伙伴自行下载。
【小结】
发现了一个惊人的规律,逢改配置文件,必出问题。下次我先备份好一份配置文件再动手改。
相关文章推荐
- 错误提示「URL file-access is disabled in the server configuration」解决方案
- KettleXMLException: 错误从XML文件读取转换 (error during reading transform from the xml file )
- 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
- SQL Server错误日志:A fatal error occurred while reading the input stream from the network
- VS2005打不开项目(解决方案)怎么办?/安装vs2008中文时出现错误Write error in the file 。。。。。
- KettleXMLException: 错误从XML文件读取转换 (error during reading transform from the xml file )
- Qt5:"Designer: An error has occurred while reading the UI file at line 1, column 0: Premature end of document."错误
- emulator: ERROR: no search paths found in this AVD's configuration. Weird, the AVD's config.ini file
- Fatal error: Incompatible file format: The encoded file has format major ID 1...解决方案
- 关于 error: LINK1123: failure during conversion to COFF: file invalid or corrupt 错误的解决方案
- Install myphpamin and find the error: The configuration file now needs a secret passphrase (blowfish_secret).
- IDEA报错:Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. ('crmWatcherService'错误)
- 突然断电,出现'an error occurred during the file system check'错误解决办法
- an error occurred during the file system check错误的解决
- Android 错误(The APK file *.apk does not exist on disk Error while Installing APK)解决方法
- Ubuntu出现错误 ----Fatal error: Python.h: No such file or Directory
- error LNK1104: cannot open file 错误解决方案
- fatal error: file has been modified since the precompiled header
- redis源码安装出现fatal error: jemalloc/jemalloc.h: No such file or directory
- redis-搭建集群的错误集锦