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

Unexpected authentication token in command Build #12530

Closed
blindpirate opened this issue Mar 16, 2020 · 5 comments · Fixed by #12556
Closed

Unexpected authentication token in command Build #12530

blindpirate opened this issue Mar 16, 2020 · 5 comments · Fixed by #12556
Assignees
Labels
a:bug @dev-productivity Issue owned by developer-productivity stale

Comments

@blindpirate
Copy link
Collaborator

Context

[09:17:37][Gradle failure report] org.gradle.launcher.daemon.server.BadlyFormedRequestException: Unexpected authentication token in command Build{id=2d7fd22a-a992-423c-a678-326fa67b061e, currentDir=/home/tcagent1/agent/work/70b200cedd9dc965} received from socket connection from /127.0.0.1:44493 to /127.0.0.1:52364
[09:17:37][Gradle failure report] 	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:161)
[09:17:37][Gradle failure report] 	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:136)
[09:17:37][Gradle failure report] 	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:124)
[09:17:37][Gradle failure report] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
[09:17:37][Gradle failure report] 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
[09:17:37][Gradle failure report] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[09:17:37][Gradle failure report] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[09:17:37][Gradle failure report] 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
[09:17:37][Gradle failure report] 	at java.base/java.lang.Thread.run(Thread.java:834)

https://builds.gradle.org/viewLog.html?buildId=32563287&buildTypeId=Enterprise_Release_MainProject_Components_GradleCom_DotcomSiteTestBrowser&tab=buildLog&_focus=147#_state=147

@blindpirate blindpirate added a:bug from:contributor @dev-productivity Issue owned by developer-productivity and removed from:contributor labels Mar 16, 2020
@blindpirate blindpirate self-assigned this Mar 16, 2020
@blindpirate
Copy link
Collaborator Author

In very rare cases, the daemon registry will contain corrupted value:

  • Daemon 1 starts on 54321 port, and it crashes, now daemon registry has entry {Daemon 1, 54321 port }
  • Daemon 2 starts, it happens to allocate the same 54321 port. Now daemon registry has entries:
    • {Daemon 1, 54321 port }
    • {Daemon 2, 54321 port }
  • A client tries to connect, and it selects Daemon 1. BOOM!

big-guy pushed a commit that referenced this issue Apr 30, 2020
This fixes #12530
Previously, when two daemons happen to allocate the same port, they
will both exist in daemon registry file, and client might connect
to the wrong one. By default, MultiChoiceAddress doesn't equal to
each other even with same port. This PR removes the old entry by
port.
@big-guy big-guy reopened this Feb 12, 2021
@big-guy
Copy link
Member

big-guy commented Feb 12, 2021

@pbielicki
Copy link
Member

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 17, 2022
@blindpirate
Copy link
Collaborator Author

This seems not happen for a long time (>1 year).

@wolfs wolfs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug @dev-productivity Issue owned by developer-productivity stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants