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

Java Tool Installer fails with bogus error #12200

Closed
MarkKharitonov opened this issue Jan 24, 2020 · 4 comments
Closed

Java Tool Installer fails with bogus error #12200

MarkKharitonov opened this issue Jan 24, 2020 · 4 comments
Assignees
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug

Comments

@MarkKharitonov
Copy link
Contributor

Type: Bug
Enter Task Name: Java Tool Installer

Environment

  • Server - TFS on-premises

    • If using TFS on-premises, provide the version: Dev17.M153.3
  • Agent - Private

Property Value
Agent.Version 2.153.1
Agent.OS Windows_NT

Issue Description

Java Tool Installer succeeds on the first build, subsequent builds fail:

##[section]Starting: JavaToolInstaller
==============================================================================
Task         : Java tool installer
Description  : Acquire a specific version of Java from a user-supplied Azure blob or the tool cache and sets JAVA_HOME
Version      : 0.151.2
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/java-tool-installer
==============================================================================
Retrieving the JDK from local path.
Creating destination folder: C:\java
##[error]UNKNOWN: unknown error, stat '\\devstatic\ToolInstallationsForAzureDevOps\server-jre-8u231-windows-x64.tar.gz'
##[error]UNKNOWN: unknown error, stat '\\devstatic\ToolInstallationsForAzureDevOps\server-jre-8u231-windows-x64.tar.gz'
##[section]Finishing: JavaToolInstaller

Task logs

logs_684527.zip
Build 1.0.20023.18-Main.zip

@MarkKharitonov
Copy link
Contributor Author

To make clear - the very first build using the task passes. The rest fail.

@leantk leantk added Area: ABTT Akvelon Build Tasks Team area of work and removed Area: CrossPlatform labels May 12, 2020
@sdobrodeev sdobrodeev self-assigned this May 15, 2020
@sdobrodeev
Copy link

Hi @MarkKharitonov! I tried to reproduce this. Partially successful, but the error message is different from what is contained in the description. Could you please provide the content of your azure-pipelines.yml file? It was also noticed that such an error message occurs when there is no access to the source archive with Java. Could you make sure that the file is available at the task execution moment?

@MarkKharitonov
Copy link
Contributor Author

I have worked around the problem by copying the zip file locally. The code I finally use is this:

steps:
- task: CopyFiles@2
  displayName: 'Copy JRE zip'
  name: CopyJREZip
  inputs:
    SourceFolder: '\\$(fileShareServer)\ToolInstallationsForAzureDevOps'
    Contents: 'server-jre-8u231-windows-x64.tar.gz'
    TargetFolder: '$(TEMP)'

- task: JavaToolInstaller@0
  inputs:
    versionSpec: '8'
    jdkArchitectureOption: 'x64'
    jdkSourceOption: 'LocalDirectory'
    jdkFile: '$(TEMP)\server-jre-8u231-windows-x64.tar.gz'
    jdkDestinationDirectory: '$(Build.ArtifactStagingDirectory)\java'
    cleanDestinationDirectory: false

I do not have cycles to investigate it any further.

@anatolybolshakov
Copy link
Contributor

anatolybolshakov commented Aug 20, 2020

Closing it since it was resolved and error handling was improved for Java Tool Installer task. Please let us know if this issue still actual for you, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug
Projects
None yet
Development

No branches or pull requests

5 participants