Docker container current state 'New' stuck

Lยท2022๋…„ 10์›” 19์ผ
0
post-thumbnail
post-custom-banner

๋…์ž ๋Œ€์ƒ๐Ÿ“ฃ

๐Ÿ‘‰ Docker๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ปจํ…Œ์ด๋„ˆ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ํ•˜์‹œ๋ ค๋Š” ๋ถ„
๐Ÿ‘‰ Ubuntu ํ™˜๊ฒฝ์—์„œ ๊ตฌ์ถ•ํ•˜์‹œ๋Š” ๋ถ„


์ถœ๊ฐ„ ์ด์œ โ“

Docker stack ๋ฐฐํฌ ์‹œ, current state 'New' stuck ์˜ค๋ฅ˜ ๋ฐœ๊ฒฌ


๋ฌธ์ œ ํŒŒ์•…๐Ÿ”

Q: docker stack ๋ฐฐํฌ ํ›„, 'docker service ls' ์ปค๋งจ๋”ฉ ๊ฒฐ๊ณผ,
   replica๊ฐ€ 0/1 ์ด๊ธธ๋ž˜ 'docker service ps'๋กœ ํ™•์ธํ•ด๋ณด๋‹ˆ
   current state ๋ถ€๋ถ„์ด "New x minute ago"์—์„œ
   ๋ฉˆ์ถฐ์žˆ์–ด์š”..๐Ÿ˜ฅ

๋ฌธ์ œ ํ•ด๊ฒฐ๐ŸŽŠ

A: ์šฐ์„  [preparing-error](https://velog.io/@de_youn/Docker-Service-Preparing-error)๋ฅผ ํ™•์ธํ•ด์ฃผ์‹œ๊ณ  ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!๐Ÿ˜€

   ์œ„ ๊ธ€๋กœ ํ•ด๊ฒฐ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ๊ฐ„
   ๋„คํŠธ์›Œํฌ(IP) ์„ค์ • ์‹œ, ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์Šต๋‹ˆ๋‹ค.
   
   ์ด ๋ฌธ์ œ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ IP ์ฃผ์†Œ๊ฐ€ ๋ถ€์กฑํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹คโ—โ—
   ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ฃผ์†Œ ์ˆ˜๋ฅผ ๋Š˜๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹คโ—โ—

   ํ•˜๋‹จ์˜ ๋‚ด์šฉ์„ ์ฐธ๊ณ ํ•˜์—ฌ ์ด Disgustingํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ญ์‹œ์˜คโ—โ—
  1. Docker ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ ์กฐ์ •

    # docker๋Š” ๊ธฐ๋ณธ 24์˜ ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ๋ฅผ ๊ฐ–๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
    # ์ด ๋งˆ์Šคํฌ ๊ฐ’์„ 16์œผ๋กœ๋งŒ ๊ฐ์†Œ์‹œ์ผœ๋„ ๋„คํŠธ์›Œํฌ ๋ฒ”์œ„๊ฐ€ ๊ต‰์žฅํžˆ ์ปค์ง‘๋‹ˆ๋‹ค.
    
    # ํ•˜๋‹จ์˜ ์ปค๋งจ๋“œ๋Š” ํ˜„ ์ƒํƒœ์—์„œ ์ƒˆ๋กœ์šด ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
    # ๋”ฐ๋ผ์„œ ํ˜„์žฌ ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋ฐฑ์—…ํ•œ ํ›„, ์ž‘์—…์„ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜
    $ docker swarm init --default-addr-pool-mask-length 16 --force-new-cluster
profile
๋ฐ์ดํ„ฐ ์š”๋ฆฌ์‚ฌ
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€