前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >creating server tcp listening socket 127.0.0.1:6379: bind No error

creating server tcp listening socket 127.0.0.1:6379: bind No error

作者头像
别先生
发布2018-12-19 16:56:37
发布2018-12-19 16:56:37
1.1K00
代码可运行
举报
文章被收录于专栏:别先生别先生
运行总次数:0
代码可运行

参考链接:https://blog.csdn.net/n_fly/article/details/52692480

1、window10环境下面安装的redis,之前安装好弄了一下,过了好几天,再次使用redis-server.exe命令启动,发现报了如下所示的错误:

代码语言:javascript
代码运行次数:0
运行
复制
 1 D:\biehl\redis>redis-server.exe
 2 [16916] 28 Nov 19:43:49.684 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf
 3 [16916] 28 Nov 19:43:49.689 # Creating Server TCP listening socket *:6379: bind: No such file or directory
 4 
 5 D:\biehl\redis>redis-cli.exe
 6 127.0.0.1:6379> shutdown
 7 (error) NOAUTH Authentication required.
 8 127.0.0.1:6379> AUTH 123456
 9 OK
10 127.0.0.1:6379> shutdown
11 not connected> exit
12 
13 D:\biehl\redis>redis-server.exe
14 [12420] 28 Nov 19:46:00.458 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf
15                 _._
16            _.-``__ ''-._
17       _.-``    `.  `_.  ''-._           Redis 3.2.100 (00000000/0) 64 bit
18   .-`` .-```.  ```\/    _.,_ ''-._
19  (    '      ,       .-`  | `,    )     Running in standalone mode
20  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
21  |    `-._   `._    /     _.-'    |     PID: 12420
22   `-._    `-._  `-./  _.-'    _.-'
23  |`-._`-._    `-.__.-'    _.-'_.-'|
24  |    `-._`-._        _.-'_.-'    |           http://redis.io
25   `-._    `-._`-.__.-'_.-'    _.-'
26  |`-._`-._    `-.__.-'    _.-'_.-'|
27  |    `-._`-._        _.-'_.-'    |
28   `-._    `-._`-.__.-'_.-'    _.-'
29       `-._    `-.__.-'    _.-'
30           `-._        _.-'
31               `-.__.-'
32 
33 [12420] 28 Nov 19:46:00.467 # Server started, Redis version 3.2.100
34 [12420] 28 Nov 19:46:00.468 * DB loaded from disk: 0.000 seconds
35 [12420] 28 Nov 19:46:00.468 * The server is now ready to accept connections on port 6379

截图如下所示:

所以呢,自己学习完,也可以将redis进行shutdown,这样养成好的习惯。 redis-cli shutdown,这样可以避免redis正在将内存中的数据同步到硬盘中,因为强行终止redis进行可能会导致数据丢失。 执行此命令后,redis会先断开所有客户端连接,然后根据配置执行持久化,最后完成退出。 Redis可以妥善处理Sigterm信号,所以使用kill redis进行的pid也可以正常结束redis,效果与发送shutdown命令一样。

待续......

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018-11-28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档