Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting with ipfs daemon --init makes bunch of duplicate metrics collector registration attempted to happen #3913

Closed
victorb opened this issue May 10, 2017 · 16 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@victorb
Copy link
Member

victorb commented May 10, 2017

Version information:

$ ipfs version --all                                                                                                           
go-ipfs version: 0.4.9-rc2-
Repo version: 5
System version: amd64/linux
Golang version: go1.8.1

Type:

Bug

Severity:

Very low

Description:

When starting a daemon with ipfs daemon --init, it seems that the prometheus collector is registering everything twice and printing out bunch of warnings.

$ IPFS_PATH=$(pwd)/.ipfs ipfs daemon --init
Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
initializing IPFS node at /data/downloads/.ipfs
generating 2048-bit RSA keypair...done
peer identity: QmecM17if1iAkKs54mXzC7errNgekPq5G9iyNRaZKu32Jo
to get started, enter:

	ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme

13:08:56.283 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.283 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.283 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.283 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.284 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.285 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.286 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.287 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.288 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.289 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.289 ERROR metrics-pr: Registering prometheus collector, name: ipfs_bs_cache_arc_hits_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.289 ERROR metrics-pr: Registering prometheus collector, name: ipfs_bs_cache_arc_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.323 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_leveldb_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_put_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_get_size_bytes, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_has_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_delete_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_errors_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_query_latency_seconds, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_bs_cache_arc_hits_total, error: duplicate metrics collector registration attempted
 binding.go:74
13:08:56.324 ERROR metrics-pr: Registering prometheus collector, name: ipfs_bs_cache_arc_total, error: duplicate metrics collector registration attempted
 binding.go:74
Swarm listening on /ip4/x/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/x/tcp/4001
Swarm listening on /ip4/x/tcp/1029
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
@victorb victorb added the kind/bug A bug in existing code (including security flaws) label May 10, 2017
@whyrusleeping
Copy link
Member

Very strange. Did you build ipfs from source? or is this a pre-built binary?

@victorb
Copy link
Member Author

victorb commented May 15, 2017

@whyrusleeping prebuilt, downloaded from dist.ipfs.io

@victorb
Copy link
Member Author

victorb commented May 15, 2017

Tried master again, on OSX this time and same issue.

➜  go-ipfs git:(master) git rev-parse HEAD
a4ffefd2ad6207758669d07e30acd52f74dc4f09
➜  go-ipfs git:(master) make install
[installing...]
➜  go-ipfs git:(master) ipfs version --all
go-ipfs version: 0.4.9-a4ffefd2a
Repo version: 5
System version: amd64/darwin
Golang version: go1.8
➜  go-ipfs git:(master) IPFS_PATH=$(mktemp -d) ipfs daemon --init
Initializing daemon...
initializing IPFS node at /var/folders/0f/6zq3dnvd4_917d5x_0bsnbrr0000gn/T/tmp.YKDAe8eL
generating 2048-bit RSA keypair...done
peer identity: QmSwQAbDJhpWsj5qDfcu7QnczJ8b3NvsahVCESVcvGEDzw
to get started, enter:

	ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme

11:49:45.118 ERROR metrics-pr: Registering prometheus collector, name: ipfs_fsrepo_datastore_blocks_put_total, error: duplicate metrics collector registration attempted
 binding.go:74
[lots of these, same thing...]
Swarm listening on /ip4/10.185.197.146/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/37.133.28.175/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

@hitchhiker
Copy link

This is still a problem, same on latest win / x64

@whyrusleeping
Copy link
Member

@hitchhiker what version of ipfs were you using? I was not able to reproduce this issue on windows 10 x64 using ipfs 0.4.10 binaries

@magik6k
Copy link
Member

magik6k commented Sep 2, 2017

I can reproduce this, on latest master, Linux.

@hitchhiker
Copy link

hitchhiker commented Sep 2, 2017

@whyrusleeping ipfs 0.4.10 (x64) / win 10 / downloaded from https://dist.ipfs.io

Steps to reproduce:

Delete /users/[USERNAME]/.ipfs
Open regular CMD

ipfs daemon --init


�[0;37mbinding.go:74�[0m
�[0;37m08:25:58.306 �[31mERROR �[0;34mmetrics-pr: �[0mRegistering prometheus collector, name: ipfs_fsrepo_datastore_put_total, error: duplicate metrics collector registration attempted
�[0;37mbinding.go:74�[0m
�[0;37m08:25:58.307 �[31mERROR �[0;34mmetrics-pr: �[0mRegistering prometheus collector, name: ipfs_fsrepo_datastore_put_errors_total, error: duplicate metrics collector registration attempted
-------------------------------------- REPEATS

@whyrusleeping
Copy link
Member

Ah, the issue is specifically with the ipfs daemon --init flag.

@alfiedotwtf
Copy link
Contributor

Still an issue for me:

Built with Go go1.10.3 for IPFS v0.4.15

@whyrusleeping whyrusleeping added the help wanted Seeking public contribution on this issue label Jun 26, 2018
@whyrusleeping
Copy link
Member

@alfiedotwtf Thanks for the bump.

@magik6k or @Kubuxu could you take a look?

@machawk1
Copy link
Contributor

I am experiencing this issue as well in https://github.com/oduwsdl/ipwb on macOS but only when using the software (ipwb) in Docker and when the local ipfs data repo is initialized (via ipfs daemon --init &).

Initializing daemon...
initializing IPFS node at /data/ipfs
generating 2048-bit RSA keypair...done
peer identity: QmP8pavWiXSpVuvtyS4t7Xwd3bermDqnVpRoXWzFvctjBF
to get started, enter:

	ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

14:39:59.687 ERROR metrics-pr: Registering prometheus collector, name: flatfs_datastore_put_total, error: duplicate metrics collector registration attempted
 binding.go:36
14:39:59.688 ERROR metrics-pr: Registering prometheus collector, name: flatfs_datastore_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:36
14:39:59.687 ERROR metrics-pr: Registering prometheus collector, name: flatfs_datastore_put_total, error: duplicate metrics collector registration attempted
 binding.go:36
14:39:59.688 ERROR metrics-pr: Registering prometheus collector, name: flatfs_datastore_put_errors_total, error: duplicate metrics collector registration attempted
 binding.go:36

go-ipfs v0.4.17

@Stebalien Stebalien self-assigned this Jul 29, 2018
@Stebalien
Copy link
Member

The issue here is that we're:

  1. Opening the repo.
  2. Closing the repo (fully).
  3. And then opening the repo.

However, closing the measure datastore (the metrics one) doesn't unregister the metrics reporters.

@Stebalien
Copy link
Member

PR here: ipfs/go-metrics-prometheus#1

There are probably better solutions, in general, but this fixes the immediate issue (and is, in fact, the recommended approach).

@pstuermlinger
Copy link

pstuermlinger commented Aug 31, 2018

Not sure if #5413 is really a duplicate since there's not the problem on init. It only happens when you do a ipfs add --only-hash=true test.txt.

@Stebalien
Copy link
Member

The underlying issue is still the same (we're trying to register metrics collectors multiple times instead of creating new ones). However, that does bring up a good point: we shouldn't be caching in this case anyways. See: #5414.

@Stebalien
Copy link
Member

(fixed)

@ghost ghost removed the status/in-progress In progress label Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

8 participants