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

netbase: remove unnecessary log message #29649

Merged
merged 1 commit into from Mar 14, 2024
Merged

Conversation

pinheadmz
Copy link
Member

This is a follow-up to #27375 that removes a spammy non-debug-level log message we don't need.
See #27375 (comment)

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 13, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK fanquake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29641 (scripted-diff: Use LogInfo/LogDebug over LogPrintf/LogPrint by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c70e4fc - thanks. Merging this now because it's swamping non-debug logs. i.e:

2024-03-14T08:07:43Z UpdateTip: new best=000000000000000000015d7558b467b61cf7b788912f55d25821017c3ffd96e7 height=834636 version=0x20008000 log2_work=94.793922 tx=976340658 date='2024-03-14T08:07:24Z' progress=1.000000 cache=234.8MiB(1805989txo)
2024-03-14T08:07:59Z Cannot connect to socket for 80.19.208.171:8333
2024-03-14T08:08:18Z Cannot connect to socket for [2803:9810:70fa:2210:1960:30fb:63b6:3c88]:8333
2024-03-14T08:08:46Z Cannot connect to socket for 121.204.87.66:8333
2024-03-14T08:10:29Z New block-relay-only v1 peer connected: version: 70015, blocks=834636, peer=185
2024-03-14T08:12:40Z Cannot connect to socket for [2601:647:4d81:5030:39c3:a544:12fa:538f]:8333
2024-03-14T08:13:34Z Cannot connect to socket for 103.62.155.147:8333
2024-03-14T08:13:42Z Cannot connect to socket for 172.56.70.74:8333
2024-03-14T08:14:18Z Saw new header hash=0000000000000000000247a255f684ea87962620e0ad328a4f0bd52182280472 height=834637
2024-03-14T08:14:18Z Saw new cmpctblock header hash=0000000000000000000247a255f684ea87962620e0ad328a4f0bd52182280472 peer=10
2024-03-14T08:14:18Z UpdateTip: new best=0000000000000000000247a255f684ea87962620e0ad328a4f0bd52182280472 height=834637 version=0x20200000 log2_work=94.793937 tx=976342374 date='2024-03-14T08:14:15Z' progress=1.000000 cache=235.4MiB(1811916txo)
2024-03-14T08:15:28Z Cannot connect to socket for 45.51.125.207:8333
2024-03-14T08:15:43Z Cannot connect to socket for [2a01:e0a:11a:f8d0:6df0:e8cd:beca:a0fa]:8333
2024-03-14T08:15:59Z Cannot connect to socket for 184.22.4.10:8333
2024-03-14T08:16:57Z New block-relay-only v1 peer connected: version: 70016, blocks=834637, peer=186
2024-03-14T08:18:24Z Cannot connect to socket for 44.226.85.60:8333
2024-03-14T08:18:51Z Cannot connect to socket for [2800:cd0:8004:4300:6db5:e82c:f85e:47c6]:8333
2024-03-14T08:20:20Z Cannot connect to socket for 184.22.103.212:8333
2024-03-14T08:20:39Z Cannot connect to socket for [2a01:4ff:1f0:875b::1]:8333
2024-03-14T08:23:45Z Cannot connect to socket for 35.213.121.118:8333
2024-03-14T08:25:11Z Cannot connect to socket for 37.6.104.168:8333
2024-03-14T08:26:13Z Cannot connect to socket for 83.32.65.174:8333
2024-03-14T08:28:10Z Cannot connect to socket for 144.52.177.160:8333
2024-03-14T08:28:13Z Cannot connect to socket for [2003:fa:cf01:347c:4df3:80ed:3ec7:d745]:8333
2024-03-14T08:28:40Z Cannot connect to socket for 116.27.231.104:8333
2024-03-14T08:29:20Z Cannot connect to socket for 149.88.101.25:8333
2024-03-14T08:29:34Z Cannot connect to socket for 140.238.71.90:8333
2024-03-14T08:29:41Z Cannot connect to socket for 103.170.233.207:8333
2024-03-14T08:29:43Z Cannot connect to socket for [2601:282:8001:eab0::e4ad]:8333
2024-03-14T08:30:01Z Cannot connect to socket for [2a01:4200:254:6fb:845e:2d90:799b:45f4]:8333
2024-03-14T08:32:02Z Cannot connect to socket for 69.157.252.183:8333
2024-03-14T08:32:03Z Cannot connect to socket for [2601:c7:4200:be60::ee4e]:8333
2024-03-14T08:32:17Z Cannot connect to socket for 89.246.97.4:8333
2024-03-14T08:32:39Z New block-relay-only v1 peer connected: version: 70016, blocks=834637, peer=187
2024-03-14T08:35:06Z Cannot connect to socket for [2605:59c8:4a2:6300:4471:1146:204:a696]:8333
2024-03-14T08:35:52Z Saw new header hash=000000000000000000025f742c626208ac87e0b7d15054abb4a19ca2d735a54e height=834638
2024-03-14T08:35:52Z Saw new cmpctblock header hash=000000000000000000025f742c626208ac87e0b7d15054abb4a19ca2d735a54e peer=35
2024-03-14T08:35:52Z UpdateTip: new best=000000000000000000025f742c626208ac87e0b7d15054abb4a19ca2d735a54e height=834638 version=0x2fe34000 log2_work=94.793952 tx=976345545 date='2024-03-14T08:35:25Z' progress=1.000000 cache=237.0MiB(1826761txo)
2024-03-14T08:36:00Z New block-relay-only v1 peer connected: version: 70016, blocks=834638, peer=189
2024-03-14T08:37:39Z New block-relay-only v1 peer connected: version: 70015, blocks=834638, peer=191
2024-03-14T08:37:58Z Cannot connect to socket for 192.154.196.37:8335
2024-03-14T08:38:10Z New block-relay-only v1 peer connected: version: 70016, blocks=834638, peer=192
2024-03-14T08:40:39Z Cannot connect to socket for 31.151.209.231:8333
2024-03-14T08:40:40Z Cannot connect to socket for [2409:40e6:18:fd50:95a4:40f1:af3:e190]:8333
2024-03-14T08:41:16Z Saw new header hash=00000000000000000000a203a94241560806ecacaa2cb7b830aee1cc63f4674d height=834639
2024-03-14T08:41:16Z Saw new cmpctblock header hash=00000000000000000000a203a94241560806ecacaa2cb7b830aee1cc63f4674d peer=35
2024-03-14T08:41:17Z UpdateTip: new best=00000000000000000000a203a94241560806ecacaa2cb7b830aee1cc63f4674d height=834639 version=0x3fff0000 log2_work=94.793967 tx=976347392 date='2024-03-14T08:40:50Z' progress=1.000000 cache=238.0MiB(1835531txo)
2024-03-14T08:41:23Z Cannot connect to socket for [2001:818:e2e5:5e00:f99a:7eb:8c50:bed8]:8333
2024-03-14T08:41:42Z Cannot connect to socket for 18.141.190.50:8333
2024-03-14T08:42:19Z Flushed fee estimates to fee_estimates.dat.

@fanquake fanquake merged commit 55c6323 into bitcoin:master Mar 14, 2024
16 checks passed
@Sjors
Copy link
Member

Sjors commented Mar 18, 2024

Looking at d9318a3 again it seems that it added this extra log statement. There's a similar log entry in Proxy::Connect(), is that one fine to keep? I suppose it is, since that's going to be far less frequent - but haven't tried.

@pinheadmz
Copy link
Member Author

far less frequent

Those logs should only print when the users local proxy is unreachable, which should be less frequent and also a bit more justified. However it is also spammy in that case. I ran with -proxy=unix:/path/to/tor/socket and then after a minute, shut down the Tor daemon. Do you think this should be cleaned up as well?

2024-04-15T17:22:45Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:22:47Z [error] Error while reading proxy response
2024-04-15T17:22:47Z RemoveLocal(zai7kzajktbkqom3edw45zyxnn6e5z5t45d2m7dhmhilgpkz2l3frmad.onion:8333)
2024-04-15T17:22:47Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:48Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:48Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:48Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:48Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:49Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:49Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:49Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:49Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:50Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:50Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:50Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:50Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:22:51Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:51Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:51Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:51Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:52Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:52Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:52Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:53Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:53Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:54Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:54Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:54Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:54Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:55Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:55Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:55Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:55Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:56Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:22:56Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:56Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:56Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:22:57Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:57Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:57Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:57Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:58Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:58Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
2024-04-15T17:22:58Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
2024-04-15T17:22:58Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor

@pinheadmz
Copy link
Member Author

Although actually the unix sockets PR didnt change this behavior much. If you start v26 with a black hole like -proxy=127.0.0.1:9999 you get similar spam:

2024-04-15T17:28:12Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:28:12Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:13Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:28:13Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:13Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:14Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:14Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:15Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:28:15Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:15Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:16Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:16Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:17Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:17Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:18Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:18Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:19Z connect() to 127.0.0.1:7656 failed after wait: Connection refused (61)
2024-04-15T17:28:19Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
2024-04-15T17:28:19Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:20Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)
2024-04-15T17:28:20Z connect() to 127.0.0.1:9050 failed after wait: Connection refused (61)

@fanquake
Copy link
Member

Do you think this should be cleaned up as well?

Looks like that could be a good idea.

fanquake added a commit that referenced this pull request Apr 24, 2024
fb4cc5f netbase: clean up Proxy logging (Matthew Zipkin)

Pull request description:

  Follow up to #27375 and see #29649 (comment)

  This removes an extra log message when we can't connect to our own proxy, and another when the proxy is invalid.

  ## Before #27375 if proxy is unreachable

  ```
  2024-04-15T17:54:51Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
  2024-04-15T17:54:52Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
  2024-04-15T17:54:52Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
  2024-04-15T17:54:53Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
  2024-04-15T17:54:53Z connect() to 127.0.0.1:9999 failed after wait: Connection refused (61)
  ```

  ## After #27375 if unix proxy is unreachable:

  ```
  2024-04-15T17:54:03Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T17:54:03Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
  2024-04-15T17:54:04Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T17:54:04Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
  2024-04-15T17:54:04Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T17:54:04Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
  2024-04-15T17:54:05Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T17:54:05Z Cannot connect to socket for /Users/matthewzipkin/Desktop/tor
  ```

  ## After this PR:

  ```
  2024-04-15T18:18:51Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T18:18:51Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T18:18:52Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  2024-04-15T18:18:52Z connect() to /Users/matthewzipkin/Desktop/tor failed: No such file or directory (2)
  ```

ACKs for top commit:
  tdb3:
    CR ACK for fb4cc5f
  laanwj:
    ACK fb4cc5f

Tree-SHA512: f07b9f7f2ea9f4bc01780c09f0b076547108294a1fa7d158a0dd48d6d7351569e461e5cccf232b7b1413ce2e3679668e523e5a7c89cd58c909da76d3dcbc34de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants