C:\dnload\ipfs-etc>ipfs version --all
go-ipfs version: 0.4.13-
Repo version: 6
System version: amd64/windows
Golang version: go1.9.2
Bug
High
(OS: Windows 10)
With ipfs daemon running in a separate console window, I tried the following commands, and ipfs name publish ... hanged, didn't seem to change a tiniest bit over a few minutes:
C:\dnload\ipfs-etc>ipfs cat /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
Hello wurld
C:\dnload\ipfs-etc>ipfs -D name publish /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
[0;37m22:07:32.647 INFO [0;34m cmd/ipfs: [0mIPFS_PATH d:\ipfs [0;37mmain.go:301[0m
[0;37m22:07:32.647 [36mDEBUG [0;34m cmd/ipfs: [0mcalling pre-command hooks... [0;37mmain.go:295[0m
[0;37m22:07:32.650 [36mDEBUG [0;34m cmd/ipfs: [0mexecuting command via API [0;37mmain.go:332[0m
I tried to google something, and stumbled upon a comment in #1593. I thought it might be somehow related to my case, so I decided to Ctrl-C the daemon and see if that changes anything. I got the following logs from the daemon (I had to Ctrl-C a few times till it stopped):
[0;37m09:53:03.051 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m09:53:03.056 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m21:56:42.962 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m21:56:42.967 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:04:27.157 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:04:27.159 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:05:38.714 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:05:38.718 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:07:32.670 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:07:32.676 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:21:20.772 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
[0;37m22:21:20.780 [31mERROR [0;34m dht: [0mloggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 [0;37mlookup.go:35[0m
Received interrupt signal, shutting down...
put record to routing error: process closing
(Hit ctrl-c again to force-shutdown the daemon.)
[0;37m22:21:27.085 [31mERROR [0;34mipns-repub: [0mRepublisher failed to republish: process closing [0;37mrepub.go:66[0m
C:\dnload\ipfs-etc>
and then saw ipfs name publish ... end, with the full log now looking as below:
C:\dnload\ipfs-etc>ipfs -D name publish /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
[0;37m22:07:32.647 INFO [0;34m cmd/ipfs: [0mIPFS_PATH d:\ipfs [0;37mmain.go:301[0m
[0;37m22:07:32.647 [36mDEBUG [0;34m cmd/ipfs: [0mcalling pre-command hooks... [0;37mmain.go:295[0m
[0;37m22:07:32.650 [36mDEBUG [0;34m cmd/ipfs: [0mexecuting command via API [0;37mmain.go:332[0m
Published to QmQH37vjm52CBcBEikdYwDsY1YShAr1hxVxbL7Fq2TJNtR: /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
C:\dnload\ipfs-etc>
Tried afterwards with no ipfs daemon running concurrently, it returned immediately with apparently successful message:
C:\dnload\ipfs-etc>ipfs -D name publish /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
[0;37m22:37:44.639 INFO [0;34m cmd/ipfs: [0mIPFS_PATH d:\ipfs [0;37mmain.go:301[0m
[0;37m22:37:44.642 [36mDEBUG [0;34m cmd/ipfs: [0mcalling pre-command hooks... [0;37mmain.go:295[0m
[0;37m22:37:44.645 [36mDEBUG [0;34m cmd/ipfs: [0mexecuting command locally [0;37mmain.go:342[0m
[0;37m22:37:44.655 [36mDEBUG [0;34mcore/comma: [0mbegin publish [0;37mpublish.go:75[0m
[0;37m22:37:44.723 [36mDEBUG [0;34mblockservi: [0mBlockService GetBlock: 'QmYdnPkMBEYXh9xfRCFWMR7pLDnT662Z4h1kRWbe4gawEU' [0;37mblockservice.go:160[0m
[0;37m22:37:44.724 [36mDEBUG [0;34mblockservi: [0mBlockService GetBlock: 'QmY1eE4y1psfqMY93APvJTsdVu1ws1yRiWkyDfp9PHHGdU' [0;37mblockservice.go:160[0m
[0;37m22:37:44.727 [36mDEBUG [0;34mblockservi: [0mBlockService GetBlock: 'QmSKboVigcD3AY4kLsob117KJcMHvMUu6vNFqk1PQzYUpp' [0;37mblockservice.go:160[0m
[0;37m22:37:44.736 [36mDEBUG [0;34mblockservi: [0mBlockService GetBlock: 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn' [0;37mblockservice.go:160[0m
[0;37m22:37:44.741 [36mDEBUG [0;34m path: [0mResolve: '/ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa' [0;37mresolver.go:54[0m
[0;37m22:37:44.741 [36mDEBUG [0;34m path: [0mresolve dag get [0;37mresolver.go:139[0m
[0;37m22:37:44.748 [36mDEBUG [0;34mblockservi: [0mBlockService GetBlock: 'QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa' [0;37mblockservice.go:160[0m
[0;37m22:37:44.762 INFO [0;34m peer: [0munexpected multihash codec<peer.ID QH37vj> [0;37mpeer.go:122[0m
[0;37m22:37:44.764 [36mDEBUG [0;34m namesys: [0mStoring pubkey at: /pk/ �c�QK$H$[Բ�>r��1��u�rZds"#�X� [0;37mpublisher.go:186[0m
[0;37m22:37:44.764 [36mDEBUG [0;34m namesys: [0mStoring ipns entry at: /ipns/ �c�QK$H$[Բ�>r��1��u�rZds"#�X� [0;37mpublisher.go:207[0m
Published to QmQH37vjm52CBcBEikdYwDsY1YShAr1hxVxbL7Fq2TJNtR: /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
[0;37m22:37:44.815 INFO [0;34m cmd/ipfs: [0mShutting down node... [0;37mmain.go:240[0m
[0;37m22:37:44.822 [36mDEBUG [0;34m core: [0mcore is shutting down... [0;37mcore.go:531[0m
[0;37m22:37:44.826 [36mDEBUG [0;34mblockservi: [0mblockservice is shutting down... [0;37mblockservice.go:251[0m
C:\dnload\ipfs-etc>
Next attempt after starting daemon again went better, publish returned after ~30sec:
C:\dnload\ipfs-etc>ipfs -D name publish /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
[0;37m22:40:18.410 INFO [0;34m cmd/ipfs: [0mIPFS_PATH d:\ipfs [0;37mmain.go:301[0m
[0;37m22:40:18.411 [36mDEBUG [0;34m cmd/ipfs: [0mcalling pre-command hooks... [0;37mmain.go:295[0m
[0;37m22:40:18.412 [36mDEBUG [0;34m cmd/ipfs: [0mexecuting command via API [0;37mmain.go:332[0m
Published to QmQH37vjm52CBcBEikdYwDsY1YShAr1hxVxbL7Fq2TJNtR: /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
C:\dnload\ipfs-etc>
Another attempt with a few different files went better now, again ~30sec each. Still, this feels bad to me — will I have to wait half a minute each time when publishing any tiniest file? Without even a tiniest info about progress or something? That it's actually working, not just hanged?
Publishing to DHT can take a long time if you have problems with connecting to some peers (which is often the case). Current proposal is to run the command in background - https://github.com/ipfs/go-ipfs/issues/3114
Hitting the same problem here. When I run: ipfs swarm peers it does say I'm connected to quite a lot of people. But still it's slow. even when connected to > 130 peers and having NAT open.
I'm seeing this as well; I'm running a private node, so there's nothing for it to find in DHT and no other nodes in the swarm, but it still takes it ~45 seconds to publish IPNS entries.
I'm seeing this as well, name publish takes forever even if I'm with public IP.
Hangs for me too, using ipfs version 0.4.16-rc3
@miguelmota please update to at least 0.4.17, that fixed a critical issue that's likely preventing you from publishing. If you're still experiencing this issue, file a new bug.
Most helpful comment
I'm seeing this as well, name publish takes forever even if I'm with public IP.