Go-ipfs: 'ipfs name publish ...' hangs for me

Created on 9 Dec 2017  Â·  9Comments  Â·  Source: ipfs/go-ipfs

Version information:

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

Type:

Bug

Severity:

High

Description:

(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
22:07:32.647  INFO   cmd/ipfs: IPFS_PATH d:\ipfs main.go:301
22:07:32.647 DEBUG   cmd/ipfs: calling pre-command hooks... main.go:295
22:07:32.650 DEBUG   cmd/ipfs: executing command via API main.go:332

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):

09:53:03.051 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
09:53:03.056 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
21:56:42.962 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
21:56:42.967 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:04:27.157 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:04:27.159 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:05:38.714 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:05:38.718 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:07:32.670 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:07:32.676 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:21:20.772 ERROR        dht: loggableKey could not cast key: 2f706b2f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35
22:21:20.780 ERROR        dht: loggableKey could not cast key: 2f69706e732f12201cca63f6510c4b2448245bd4b2fd3e72b8e531f6f47593725a64732223935882 invalid cid version number: 47 lookup.go:35

Received interrupt signal, shutting down...
put record to routing error: process closing
(Hit ctrl-c again to force-shutdown the daemon.)
22:21:27.085 ERROR ipns-repub: Republisher failed to republish: process closing repub.go:66
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
22:07:32.647  INFO   cmd/ipfs: IPFS_PATH d:\ipfs main.go:301
22:07:32.647 DEBUG   cmd/ipfs: calling pre-command hooks... main.go:295
22:07:32.650 DEBUG   cmd/ipfs: executing command via API main.go:332
Published to QmQH37vjm52CBcBEikdYwDsY1YShAr1hxVxbL7Fq2TJNtR: /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
C:\dnload\ipfs-etc>

Most helpful comment

I'm seeing this as well, name publish takes forever even if I'm with public IP.

All 9 comments

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
22:37:44.639  INFO   cmd/ipfs: IPFS_PATH d:\ipfs main.go:301
22:37:44.642 DEBUG   cmd/ipfs: calling pre-command hooks... main.go:295
22:37:44.645 DEBUG   cmd/ipfs: executing command locally main.go:342
22:37:44.655 DEBUG core/comma: begin publish publish.go:75
22:37:44.723 DEBUG blockservi: BlockService GetBlock: 'QmYdnPkMBEYXh9xfRCFWMR7pLDnT662Z4h1kRWbe4gawEU' blockservice.go:160
22:37:44.724 DEBUG blockservi: BlockService GetBlock: 'QmY1eE4y1psfqMY93APvJTsdVu1ws1yRiWkyDfp9PHHGdU' blockservice.go:160
22:37:44.727 DEBUG blockservi: BlockService GetBlock: 'QmSKboVigcD3AY4kLsob117KJcMHvMUu6vNFqk1PQzYUpp' blockservice.go:160
22:37:44.736 DEBUG blockservi: BlockService GetBlock: 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn' blockservice.go:160
22:37:44.741 DEBUG       path: Resolve: '/ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa' resolver.go:54
22:37:44.741 DEBUG       path: resolve dag get resolver.go:139
22:37:44.748 DEBUG blockservi: BlockService GetBlock: 'QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa' blockservice.go:160
22:37:44.762  INFO       peer: unexpected multihash codec<peer.ID QH37vj> peer.go:122
22:37:44.764 DEBUG    namesys: Storing pubkey at: /pk/ �c�QK$H$[Բ�>r��1��u�rZds"#�X� publisher.go:186
22:37:44.764 DEBUG    namesys: Storing ipns entry at: /ipns/ �c�QK$H$[Բ�>r��1��u�rZds"#�X� publisher.go:207
Published to QmQH37vjm52CBcBEikdYwDsY1YShAr1hxVxbL7Fq2TJNtR: /ipfs/QmZ9CyDgnVDGZX3wfKJrQ68BgEixTApyjaFJw2vavLfMVa
22:37:44.815  INFO   cmd/ipfs: Shutting down node... main.go:240
22:37:44.822 DEBUG       core: core is shutting down... core.go:531
22:37:44.826 DEBUG blockservi: blockservice is shutting down... blockservice.go:251
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
22:40:18.410  INFO   cmd/ipfs: IPFS_PATH d:\ipfs main.go:301
22:40:18.411 DEBUG   cmd/ipfs: calling pre-command hooks... main.go:295
22:40:18.412 DEBUG   cmd/ipfs: executing command via API main.go:332
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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emelleme picture emelleme  Â·  3Comments

jonchoi picture jonchoi  Â·  3Comments

whyrusleeping picture whyrusleeping  Â·  4Comments

Mikaela picture Mikaela  Â·  3Comments

Jorropo picture Jorropo  Â·  3Comments