inflearn logo
강의

講義

知識共有

Grafanaインストールとダッシュボード作成

PostgreSQLのインストール

posgresSQL 설치시 에러 내용

240

nysims

投稿した質問数 5

0

안녕하세요. grafana 수강자 입니다. posgresSQL 설치시 에러 내용 입니다. .' Error response from daemon: ports are not available: exposing port TCP 0.0.0.0:5432 -> 127.0.0.1:0: listen tcp 0.0.0.0:5432: bind: address already in use ''

port 번호를 변경하면 실행이 안돼는것 같습니다. 어떻게 해야 할까요?

postgresql docker elasticsearch prometheus grafana

回答 3

1

kjlab

안녕하세요. 5432 포트가 이미 사용중인것 같습니다.

 

linux, mac의 경우 lsof -i :5432 명령어로 사용중인지 여부를 알수 있습니다.

혹은, docker ps 실행해보시면 PORTS 열에서, 이미 postgres를 설치했거나 다른 container가 5432 포트를 사용중인지 알수 있습니다.

 

docker container 를 지우고 싶다면 docker rm -f 컨데이너ID 로 삭제하실 수 있고,

lsof 명령어에서 PID를 확인하셨다면 kill -9 프로세스ID 로 종료가능합니다.

0

nysims

안녕하세요. docker -down -v 해서 다시 설치하면 포트번호는 맞게 들어가는데. 포트가 개방이 안돼는것 같습니다. ; CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

fae5488c6056 postgres:latest "docker-entrypoint.s…" 5 seconds ago Restarting (1) 1 second ago postgres_db '

 

0

kjlab

다시 삭제하고 포트 설정을 아래처럼 한다음 해보실래요?

ports:
  - "5433:5432"

0

kjlab

down 한 상태에서 lsof -i :5432 명령어 결과도 공유해주시면 좋을것같습니다.

0

nysims

안녕하세요. 5432포트를 변경해서 5433으로 변경을하면 ,docker 에서 실행은돼는데. 또다른 에러메세지가 나오네요.. ㅜㅜ

"in 18+, these Docker images are configured to store database data in a

format which is compatible with "pg_ctlcluster" (specifically, using

major-version-specific directory names). This better reflects how

PostgreSQL itself works, and how upgrades are to be performed.

See also https://github.com/docker-library/postgres/pull/1259⁠

Counter to that, there appears to be PostgreSQL data in:

/var/lib/postgresql/data (unused mount/volume)

This is usually the result of upgrading the Docker image without

upgrading the underlying database using "pg_upgrade" (which requires both

versions).

The suggested container configuration for 18+ is to place a single mount

at /var/lib/postgresql which will then place PostgreSQL data in a

subdirectory, allowing usage of "pg_upgrade --link" without mount point

boundary issues.

See https://github.com/docker-library/postgres/issues/37⁠ for a (long)

discussion around this process, and suggestions for how to do so. "

DB 설치하는부분이 힘드네요..

1

kjlab

혹시 postgres 버전을 변경하셨을까요?

docker-compose down -v
docker-compose up -d

설치 내용을 삭제하고 다시 실행해보면 좋을것같습니다.

처음에 실패하고 이것저것 시도 하시면서 뭔가 꼬인것 같습니다.

파킹 페이지와 대기열 큐 질문입니다.

0

13

0

virtualbox 설치시

1

20

1

실행중인 컨테이너를 모두 삭제하는 방법(윈도우버전)

0

25

2

winpty docker 설정

0

21

2

vs code설치했는데도, easy docker 파일 열기에서 vs code 아이콘은 안보여요

0

18

1

aws 계정 생성 질문

1

53

1

verify.sh 4단계 실패 — Jenkins 컨테이너에서 127.0.0.1:6443 connection refused

0

55

2

섹션 2 - 9강. API 관련 질문

0

66

2

환경 셋팅관련 동영상이 어디에 업로드되어 있나요?

1

57

1

11강 [실습] Docker로 MySQL1 분만에 실행하기

0

80

2

11강 [실습] Docker로 MySQL1 분만에 실행하기

0

63

2

강의 목차와 영상 내용 불일치

1

62

2

구현 방법에 대한 문의

0

70

2

Github repo 404 not found

0

52

1

MSA 통신방식에 대해서 질문 있습니다.

0

50

1

코드 깃허브는 없을까요?

1

55

2

안녕하세요 질문있습니다.!

0

58

2

@Modifying에 관하여

1

62

1

동영상오류-[실습] 팀채널 구분하여 보내기

0

46

3

가중이동평균매출 lag함수 활용

0

71

2

Chat URL 시작이 http로 시작

0

85

3

24강 소스코드 관련

0

54

1

스웨거 접속이 안되는데 확인 부탁드립니다.

0

61

1

postgres 수업중 case 함수 스크립트 자료

0

96

1