Problem description: Redis has been installed on the Mac, and an error is suddenly reported when starting redis on the terminal: Could not create server TCP listening socket *:6379: bind: Address already in use , the error is shown in the following figure: Show View Image prompts me for the port address of 6379 (Redis default port) is occupied. Solution:
The search result is shown in the figure below: 2) Find the PID of 65947, use the kill -9 command to forcibly kill the process, the command statement is as follows:
The operation is shown in the figure below: 3) Enter the redis directory and restart redis, the statement is as follows:
The result is shown below: View Image
설치 방법 Redis 사이트: http://redis.io/topics/quickstart wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make
예제1. command 창에 redis-server 명령어 실행
2. 새로운 터미널 윈도우 창을 하나 연 뒤, redis 서버가 실행 중인지 확인 (redis-cli ping)3. Redis 명령창으로 접속4. get, set 명령어 실행127.0.0.1:6379> set mykey "myvalue" 127.0.0.1:6379> get mykey 5. Redis-server 정지 (redis-cli shutdown)127.0.0.1:6379> shutdown save // 서버 스탑, 지금까지 내용 저장하지 않음 127.0.0.1:6379> shutdown nosave
6. redis-server 실행중 에러
10773:C 27 May 13:29:32.080 # Warning: no config file specfied, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 10773:M 27 May 13:29:32.082 * Increased maximum number of open files to 10032 (it was originally set to 256). 10773:M 27 May 13:29:32.082 # Creating Server TCP listening socket *:6379: bind: Address already in use 글뷰관련 태그목록 더보기
Start up redis Times wrong # Creating Server TCP listening socket *:6379: bind: Address already in use The reason for the error 6379 The address is already in use (6379 yes redis Default port ) resolvent
Get information like this 501 2267 1 0 3 119 ?? 8:17.40 redis-server *:6379 Be accomplished 48678:C 24 Jan 15:18:20.870 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 48678:C 24 Jan 15:18:20.871 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=48678, just started 48678:C 24 Jan 15:18:20.871 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 48678:M 24 Jan 15:18:20.873 * Increased maximum number of open files to 10032 (it was originally set to 256). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 4.0.11 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 48678 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 48678:M 24 Jan 15:18:20.889 # Server initialized 48678:M 24 Jan 15:18:31.003 * DB loaded from disk: 10.114 seconds 48678:M 24 Jan 15:18:31.003 * Ready to accept connections Error handling ——# Creating Server TCP listening socket *:6379: bind: Address already in use More articles aboutRandom recommendation
ps-ef | grep redis Check whether the port is occupied then kill -15 pid perhaps kill -9 pid redis-server[230033]: 230033:C 19 Mar 2022 11:14:19.860 # Fatal error, can't open config file '/usr/ redis-cli -h 127.0.0.1 -p 6379 -a " password " linux above Start client Report errors : as a result of : Has not started Server side redis Relevant command :
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. Could not connect to Redis at 127.0.0.1:6379: Connection refused
I am trying to install redis, according to the instructions here : https://redis.io/download, but getting the error :
when I run command ps -ef|grep redis i see : nomi 1168 947 0 2434 ? 00:00:00 grep --color=auto redisI type kill 1168 where 1168 is my PID and the process is not killed:
next time i run the command ps -ef|grep redis i get diffrent PID number for example : 1170 How can I remove this process? 7 |