Ipfs: 50MB보닀 큰 νŒŒμΌμ„ μΆ”κ°€ν•  λ•Œ Ipfs 0.4.10이 μΆ©λŒν•¨

에 λ§Œλ“  2017λ…„ 07μ›” 13일  Β·  9μ½”λ©˜νŠΈ  Β·  좜처: ipfs/ipfs

OS: μ•„μΉ˜ λ¦¬λˆ…μŠ€ & λ§₯OS

~ % ipfs version
ipfs version 0.4.10
~ % ipfs init
initializing IPFS node at /Users/user/.ipfs
generating 2048-bit RSA keypair...done
peer identity: Qme3fGyQWP4mf3J9Ln3EjofWyYhiGgVCZZ41jgVA9o78u7
to get started, enter:

    ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme

~ % ipfs daemon
Initializing daemon...
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.102/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

λ™μ˜μƒμ„ μΆ”κ°€ν•΄ λ³΄κ² μŠ΅λ‹ˆλ‹€.

ipfs add raw_video.mkv
added Qmf6vier2j9rtG7hjA8Bf8ohzT5VYNmGfRntSc4zXsQyPL raw_video.mkv

μ•½ 15-20초 후에 ipfsκ°€ μΆ©λŒν•©λ‹ˆλ‹€.
https://gist.github.com/Netherdrake/4da51b24da82fe25ae476cfeb09cc31

이 λ¬Έμ œλŠ” κ°„ν—μ μœΌλ‘œ λ°œμƒν•©λ‹ˆλ‹€. λ•Œλ•Œλ‘œ μΆ”κ°€κ°€ μ„±κ³΅ν•˜κ³  문제 없이 localhost:8080/ipfs/HASH/raw_video.mkv 에 μžˆλŠ” νŒŒμΌμ— μ•‘μ„ΈμŠ€ν•  수 μžˆμ§€λ§Œ λŒ€λΆ€λΆ„μ˜ 경우 데λͺ¬μ΄ μΆ©λŒν•©λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

μ’‹μ•„, 이것은 DHT κ³΅κΈ‰μž ν•˜μœ„ μ‹œμŠ€ν…œμ΄ λ„ˆλ¬΄ λ§Žμ€ 피어에 μ—°κ²°ν•˜λ„λ‘ ν•˜λŠ” νŒŒμΌμ„ μΆ”κ°€ν•˜λŠ” κ²½μš°μž…λ‹ˆλ‹€. 당신은 제거 ν•  경우 --routing=none ν”Œλž˜κ·Έλ₯Ό μ‚¬μš©ν•  ipfs add --local 일듀도해야 잘 μž‘λ™ν•©λ‹ˆλ‹€.

μ €λŠ” 이 문제λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ λ…Έλ ₯ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. λ‹€μŒ λ¦΄λ¦¬μŠ€μ—μ„œ λ­”κ°€λ₯Ό 얻을 수 있기λ₯Ό λ°”λžλ‹ˆλ‹€.

λͺ¨λ“  9 λŒ“κΈ€

ipfs daemon 2>stderr.log λ¦¬λ””λ ‰μ…˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

λ‚˜λŠ” λ˜ν•œ 그것을 μž¬μƒν•  수 μ—†μŠ΅λ‹ˆλ‹€, λ‚˜λŠ” μ•½ 10x60MiB νŒŒμΌμ„ μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

큰 νŒŒμΌμ„ μΆ”κ°€ ν•  λ•Œ ipfsκ°€ μΆ©λŒν•˜λŠ” κ²ƒμœΌλ‘œ λ‚˜νƒ€λ‚¬μŠ΅λ‹ˆλ‹€.

예λ₯Ό λ“€μ–΄ 곡식 Ubuntu ISO.

MacOSμ—μ„œ 좩돌:

ipfs add ubuntu-16.04.2-desktop-amd64.iso
 488.00 MB / 1.45 GB [=============================>------------------------------------------------------------]  32.92% 20s17:54:27.509 ERROR commands/h: unexpected EOF client.go:247
Error: unexpected EOF

Linuxμ—μ„œλŠ” 였λ₯˜κ°€ λ°œμƒν•˜μ§€λ§Œ 데λͺ¬ ν”„λ‘œμ„ΈμŠ€κ°€ 계속 μ‹€ν–‰λ˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

~/Downloads % ipfs add ubuntu-16.04.2-desktop-amd64.iso 
 32.00 MB / 1.45 GB [=>----------------------------------------------------------------------------]   2.16% 30s17:53:01.534 ERROR commands/h: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files client.go:247
Error: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files
% ipfs daemon
Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/172.18.0.1/tcp/4001
Swarm listening on /ip4/172.19.0.1/tcp/4001
Swarm listening on /ip4/172.20.0.1/tcp/4001
Swarm listening on /ip4/172.21.0.1/tcp/4001
Swarm listening on /ip4/172.22.0.1/tcp/4001
Swarm listening on /ip4/172.23.0.1/tcp/4001
Swarm listening on /ip4/172.24.0.1/tcp/4001
Swarm listening on /ip4/192.168.1.107/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
17:53:01.534 ERROR commands/h: err: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files handler.go:285

이전 λ²„μ „μœΌλ‘œ λ‹€μš΄κ·Έλ ˆμ΄λ“œλ₯Ό μ‹œλ„ν–ˆμ§€λ§Œ μΆ©λŒν•˜μ§€ μ•ŠλŠ” μœ μΌν•œ 버전은 0.4.6 .

~/Downloads % ipfs add ubuntu-16.04.2-desktop-amd64.iso 
added QmTc9mzzoEChP2Wyc4uGWGkkifC99y8o4KmxwVyg18MP76 ubuntu-16.04.2-desktop-amd64.iso
~/Downloads % ipfs version
ipfs version 0.4.6
~/Downloads % pacman -Q go-ipfs
go-ipfs 0.4.6-1

ipfs 0.4.10을 μ‚¬μš©ν•˜λŠ” macOS 10.12.5 및 Ubuntu 16.04μ—μ„œ 이것을 μž¬ν˜„ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

$ truncate -s 500M testfile
added QmV7q5aTmvZtGWja4wpodiUTEpBVWYFkQGRQ8PmJMDPG62 testfile
$

μ†ŒμŠ€μ˜ ipfs λΉŒλ“œ, νŒ¨ν‚€μ§€ κ΄€λ¦¬μž λ˜λŠ” μ›Ήμ˜ λ°”μ΄λ„ˆλ¦¬ 쀑 λ¬΄μ—‡μž…λ‹ˆκΉŒ? κΉ¨λ—ν•œ ~/.ipfs λ””λ ‰ν† λ¦¬λ‘œ μ‹œλ„ν•˜μ—¬ λ¬Έμ œκ°€ μ§€μ†λ˜λŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.

그듀은 λͺ¨λ‘ νŒ¨ν‚€μ§€ κ΄€λ¦¬μžμ—μ„œ μ™”μŠ΅λ‹ˆλ‹€. μœ„ λ©”μ‹œμ§€μ˜ λͺ¨λ“  좜λ ₯은 rm -rf ~/.ipfs && ipfs init μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

@Netherdrake --routing=none μ˜΅μ…˜μœΌλ‘œ 데λͺ¬μ„ μ‹€ν–‰ν•˜λ©΄ μ—¬μ „νžˆ 같은 λ°©μ‹μœΌλ‘œ μ‹€νŒ¨ν•©λ‹ˆκΉŒ?

--routing=none ν•˜λ©΄ 잘 μž‘λ™ν•©λ‹ˆλ‹€.

μ’‹μ•„, 이것은 DHT κ³΅κΈ‰μž ν•˜μœ„ μ‹œμŠ€ν…œμ΄ λ„ˆλ¬΄ λ§Žμ€ 피어에 μ—°κ²°ν•˜λ„λ‘ ν•˜λŠ” νŒŒμΌμ„ μΆ”κ°€ν•˜λŠ” κ²½μš°μž…λ‹ˆλ‹€. 당신은 제거 ν•  경우 --routing=none ν”Œλž˜κ·Έλ₯Ό μ‚¬μš©ν•  ipfs add --local 일듀도해야 잘 μž‘λ™ν•©λ‹ˆλ‹€.

μ €λŠ” 이 문제λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ λ…Έλ ₯ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. λ‹€μŒ λ¦΄λ¦¬μŠ€μ—μ„œ λ­”κ°€λ₯Ό 얻을 수 있기λ₯Ό λ°”λžλ‹ˆλ‹€.

μ•„, 이 λ¬Έμ œκ°€ 잘λͺ»λœ μ €μž₯μ†Œμ— μžˆλ‹€λŠ” 것도 μ•Œκ³  μžˆμŠ΅λ‹ˆλ‹€. μ•žμœΌλ‘œλŠ” ipfs/go-ipfsλ₯Ό μ‚¬μš©ν•˜μ—¬ 이와 같은 문제λ₯Ό λ³΄κ³ ν•˜μ„Έμš”.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰