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

Failed to stop service 'gitHubDependencyExtractorService' #133

Closed
joeedelman opened this issue Apr 16, 2024 · 3 comments
Closed

Failed to stop service 'gitHubDependencyExtractorService' #133

joeedelman opened this issue Apr 16, 2024 · 3 comments

Comments

@joeedelman
Copy link

I am attempting to use version 3.3.0 in a multi-module project and receive the following exception:

2: Task failed with an exception.

  • What went wrong:
    Failed to stop service 'gitHubDependencyExtractorService'.

The GitHubDependencyGraphPlugin plugin encountered errors while writing the dependency snapshot json file. Please report this issue at: https://github.com/gradle/github-dependency-graph-gradle-plugin/issues

Caused by: org.gradle.api.GradleException: The GitHubDependencyGraphPlugin plugin encountered errors while writing the dependency snapshot json file. Please report this issue at: https://github.com/gradle/github-dependency-graph-gradle-plugin/issues
at org.gradle.github.dependencygraph.internal.DependencyExtractor.close(DependencyExtractor.kt:271)
at org.gradle.api.services.internal.RegisteredBuildServiceProvider.lambda$maybeStop$1(RegisteredBuildServiceProvider.java:168)
... 132 more
Caused by: java.lang.IllegalStateException: The configuration parameter 'GITHUB_JOB_CORRELATOR' must be set: set an environment variable, or use '-DGITHUB_JOB_CORRELATOR=value' on the command-line.
at org.gradle.github.dependencygraph.internal.util.PluginParameters.throwEnvironmentVariableMissingException(PluginParameters.kt:34)
at org.gradle.github.dependencygraph.internal.util.PluginParameters.load(PluginParameters.kt:25)
at org.gradle.github.dependencygraph.internal.util.PluginParameters.load$default(PluginParameters.kt:21)
at org.gradle.github.dependencygraph.internal.DependencyExtractor$gitHubSnapshotParams$2.invoke(DependencyExtractor.kt:55)
at org.gradle.github.dependencygraph.internal.DependencyExtractor$gitHubSnapshotParams$2.invoke(DependencyExtractor.kt:23)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.gradle.github.dependencygraph.internal.DependencyExtractor.getGitHubSnapshotParams(DependencyExtractor.kt)
at org.gradle.github.dependencygraph.internal.DependencyExtractor.writeDependencyGraph(DependencyExtractor.kt:242)
at org.gradle.github.dependencygraph.internal.DependencyExtractor.close(DependencyExtractor.kt:269)

@bigdaz
Copy link
Member

bigdaz commented Apr 16, 2024

How are you using the plugin?
The error message indicates that you aren't setting one of the required inputs:

The configuration parameter 'GITHUB_JOB_CORRELATOR' must be set: set an environment variable, or use '-DGITHUB_JOB_CORRELATOR=value' on the command-line.

If you're using this plugin standalone, please first try getting it working using these instructions: https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#using-the-plugin-to-generate-dependency-reports. That way you don't need to provide any GitHub specific context.

@bigdaz
Copy link
Member

bigdaz commented Apr 16, 2024

Sorry, you shouldn't have been asked to "Please report this issue" in this case.
The exception message identifies the problem and what you need to do to fix it.
I've raised #134 to fix the error message to make this clearer in the future.

@bigdaz bigdaz closed this as completed Apr 16, 2024
@nise-nabe
Copy link

I found a cause. On not-ephemeral build like a self-hosted server, init script is left on gradle user home init.d directory.
If you have used gradle-build-action@v2.8.1 or earler, the init script still 0.2.0 that is not use GITHUB_JOB_CORRELATOR.

If you want to fix this, try to delete gradle user home's init script.

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

No branches or pull requests

3 participants