복붙노트

[REDIS] ubuntu14.04에서 레디 스 서버 : 이미 사용 바인드 주소

REDIS

ubuntu14.04에서 레디 스 서버 : 이미 사용 바인드 주소

나는 터미널에 입력하여 우분투에 레디 스 서버를 시작 : $는 레디 스 서버를

다음이 결과> http://paste.ubuntu.com/12688632/

aruns ~ $ redis-server
27851:C 05 Oct 15:16:17.955 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
27851:M 05 Oct 15:16:17.957 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
27851:M 05 Oct 15:16:17.957 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
27851:M 05 Oct 15:16:17.958 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
27851:M 05 Oct 15:16:17.958 # Creating Server TCP listening socket *:6379: bind: Address already in use

나는이 문제를 해결할 수있는 방법, 어떤 수동 또는 자동화 된 프로세스는이 바인딩이 해결합니다.

해결법

  1. ==============================

    1.

    $ ps aux | grep redis
    

    그 내 경우에 .. 실행하는 포트를 찾습니다 ..

    MyUser  8821   0.0  0.0  2459704    596   ??  S    4:54PM   0:03.40 redis-server *:6379
    

    그리고 수동으로 포트를 닫습니다

    $ kill -9 8821
    

    다시 실행 레디 스

    $ redis-server
    
  2. ==============================

    2.나를 위해, 문제를 많이 한 후,이 내 문제를 해결 :

    나를 위해, 문제를 많이 한 후,이 내 문제를 해결 :

     root@2c2379a99b47:/home/ ps -aux | grep redis
        redis     3044  0.0  0.0  37000  8780 ?        Ssl  14:59   0:00 /usr/bin/redis-server *:6379  
    

    레디 스를 찾은 후, 죽일!

    root@2c2379a99b47:/home# sudo kill -9 3044
    root@2c2379a99b47:/homek# sudo service redis-server restart
    Stopping redis-server: redis-server.
    Starting redis-server: redis-server.
    root@2c2379a99b47:/home# sudo service redis-server status 
    redis-server is running
    
  3. ==============================

    3.내가 http://www.redis.io에 대한 설명서를 읽고 난 레디 스 서버를 구성 할 수 redis.conf 파일을 열어, 그 /etc/redis/redis.conf에 위치

    내가 http://www.redis.io에 대한 설명서를 읽고 난 레디 스 서버를 구성 할 수 redis.conf 파일을 열어, 그 /etc/redis/redis.conf에 위치

    $ sudo subl /etc/redis/redis.conf
    

    대신 숭고한 편집기 당신은 즉 당신의 선택의 편집기를 사용할 수 있습니다. 나노, 바이올렛, 이맥스, 정력, gedit를.

    이 파일에서 나는 #bind 127.0.0.1 라인을 주석 처리. 따라서, 대신 0.0.0.0:6379의 이제 127.0.0.1:6379

    레디 스 서버를 다시 시작

    $ sudo service redis-server restart
    

    이 서버는 포트 6379에서 연결을 받아 들일 준비가 완료, 상태 것이다

    이것은 당신이 우분투에이 레디 스 서버를 따를 수 있습니다 더 자세한 구성과 설정은 서버를 둘 것이다

  4. ==============================

    4.

    sudo service redis-server stop
    
  5. ==============================

    5.난 그냥이 직후, 레디 스-CLI 종료를 입력하여 Mac에서이 문제를 해결 터미널 및 유형 redid 서버를 다시 열 그것은 작동합니다.

    난 그냥이 직후, 레디 스-CLI 종료를 입력하여 Mac에서이 문제를 해결 터미널 및 유형 redid 서버를 다시 열 그것은 작동합니다.

  6. ==============================

    6.나는 명령을 param -ef를 사용하는 것을 선호

    나는 명령을 param -ef를 사용하는 것을 선호

    ps -ef|grep redis
    

    -efmeans

    -A      Display information about other users' processes, including those
             without controlling terminals.
    -e      Identical to -A.
    
    -f      Display the uid, pid, parent pid, recent CPU usage, process start
            time, controlling tty, elapsed CPU usage, and the associated com-
            mand.  If the -u option is also used, display the user name
            rather then the numeric uid.  When -o or -O is used to add to the
            display following -f, the command field is not truncated as se-
            verely as it is in other formats.
    

    다음 PID를 죽일

    kill -9 $pid
    
  7. ==============================

    7.당신은 시도 할 수 있습니다

    당신은 시도 할 수 있습니다

    $ 메이크업

    그때

    $ sudo는 CP SRC / 레디 스-CLI / usr / 지방 / 빈 / 단자 레디 스과의 레디 스-CLI 명령을 설치할.

    마지막으로, 당신은 레디 스-CLI 종료 명령을 사용할 수 있습니다. 이 대답은 당신을 도울 수 있기를 바랍니다.

  8. ==============================

    8.그것이 말하는 그래서 같이 프로세스가 이미 최선 이렇게하려면 실행중인 것은 그것을 중지하는 것입니다, 분석하고 그것을 다시 시작하고 그래서 여기에 할 일 다음 명령은 다음과 같습니다 :

    그것이 말하는 그래서 같이 프로세스가 이미 최선 이렇게하려면 실행중인 것은 그것을 중지하는 것입니다, 분석하고 그것을 다시 시작하고 그래서 여기에 할 일 다음 명령은 다음과 같습니다 :

    redis-cli ping #should return 'PONG'
    

    그리고 이것은 내 문제를 해결 :

    $ ps -ef |grep redis
    
    root      6622  4836  0 11:07 pts/0    00:00:00 grep redis
    redis     6632     1  0 Jun23 ?        04:21:50 /usr/bin/redis-server *:6379
    

    레디 스 프로세스를 찾아 그것을 그만!

    $ kill -9 6632
    $ service redis restart
    
    
    Stopping redis-server: [  OK  ]
    Starting redis-server: [  OK  ]
    
    
    $ service redis status
    

    그렇지 않으면이 그냥 작동하지 않는 모든 경우에하는 것은-CLI 레디 스를 입력하려고

    희망이 도움이 :)

  9. ==============================

    9.운영 체제에서 부팅이 나를 위해 일한 후 실행중인 프로세스를 죽이는. 우분투 OS에서 시작시 시작 레디 스를 방지하기 위해 :

    운영 체제에서 부팅이 나를 위해 일한 후 실행중인 프로세스를 죽이는. 우분투 OS에서 시작시 시작 레디 스를 방지하기 위해 :

    sudo systemctl disable redis-server
    
  10. from https://stackoverflow.com/questions/32947076/redis-server-in-ubuntu14-04-bind-address-already-in-use by cc-by-sa and MIT license