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

Strip version does not works properly even with simple Hello world program on java. #9278

Closed
systemlogic opened this issue Aug 29, 2019 · 9 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: support / not a bug (process)

Comments

@systemlogic
Copy link

Description of the problem / feature request: Require heavy bundle of bazel which does have required tooling. Strip version of bazel is failing in most of the cases.

java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip]

Feature requests: what underlying problem are you trying to solve with this feature?

any java target cause above issue

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

harora37@harora37:~/dummy$ cat BUILD 
java_binary(
    name = "Hello",
    main_class = "com.ibm.amg.services.registration.Hello",
    srcs = ["Hello.java"],
)

harora37@harora37:~/dummy$ cat Hello.java 
package com.ibm.amg.services.registration;

public class Hello {
	public static void main(String...str) {
		System.out.println("Hello Word");
	}
}

WARNING: Download from https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip failed: class javax.net.ssl.SSLProtocolException Connection reset
ERROR: An error occurred during the fetch of repository 'remote_java_tools_linux':
java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip] to /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/external/remote_java_tools_linux/java_tools_javac11_linux-v4.0.zip: Connection reset
ERROR: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/external/bazel_tools/tools/jdk/BUILD:224:1: @bazel_tools//tools/jdk:JacocoCoverageRunner depends on @remote_java_tools_linux//:java_tools/JacocoCoverage_jarjar_deploy.jar in repository @remote_java_tools_linux which failed to fetch. no such package '@remote_java_tools_linux//': java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip] to /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/external/remote_java_tools_linux/java_tools_javac11_linux-v4.0.zip: Connection reset
ERROR: Analysis of target '//:Hello' failed; build aborted: no such package '@remote_java_tools_linux//': java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip] to /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/external/remote_java_tools_linux/java_tools_javac11_linux-v4.0.zip: Connection reset
INFO: Elapsed time: 14.269s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (15 packages loaded, 282 targets configured)
FAILED: Build did NOT complete successfully (15 packages loaded, 282 targets configured)
harora37@harora37:/dummy$ ls
BUILD Hello.java WORKSPACE
harora37@harora37:
/dummy$ bazel info release
release 0.29.0

What operating system are you running Bazel on?

Ubuntu 16.04

What's the output of bazel info release?

$:~/dummy$ bazel info
bazel-bin: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/execroot/__main__/bazel-out/k8-fastbuild/bin
bazel-genfiles: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/execroot/__main__/bazel-out/k8-fastbuild/bin
bazel-testlogs: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/execroot/__main__/bazel-out/k8-fastbuild/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/command.log
committed-heap-size: 98MB
execution_root: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/execroot/__main__
gc-count: 7
gc-time: 178ms
install_base: /home/harora37/.cache/bazel/_bazel_harora37/install/7390d4f46c916c7cd973ba0dce27ab33
java-home: /home/harora37/.cache/bazel/_bazel_harora37/install/7390d4f46c916c7cd973ba0dce27ab33/_embedded_binaries/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 11.0.2+7-LTS) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 11.0.2+7-LTS, mixed mode) by Azul Systems, Inc.
max-heap-size: 8415MB
output_base: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a
output_path: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/execroot/__main__/bazel-out
package_path: %workspace%
release: release 0.29.0
repository_cache: /home/harora37/.cache/bazel/_bazel_harora37/cache/repos/v1
server_log: /home/harora37/.cache/bazel/_bazel_harora37/bbea7929ac98478df803126c2ffe502a/java.log.harora37.harora37.log.java.20190829-151108.18109
server_pid: 18109
used-heap-size: 44MB
workspace: /home/harora37/dummy

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

release: release 0.29.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

this is private repo of IBM

Have you found anything relevant by searching the web?

bazelbuild/rules_scala#798 (comment)
but not helping

Any other information, logs, or outputs that you want to share?

No

FYI @johnynek @nlopezgi @cushon @katre @iirina

@iirina iirina added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged labels Aug 29, 2019
@iirina
Copy link
Contributor

iirina commented Aug 29, 2019

@aehlig do you know what could cause the Connection reset error?

@systemlogic in 70eea93 I added github urls for java_tools zip in addition to the ones on mirror.bazel, hopefully that works. The change is going to land in bazel 1.0, but you can try it out with bazel@HEAD as well. I couldn't reproduce on my machine.

@systemlogic
Copy link
Author

systemlogic commented Aug 29, 2019

@iirina you committed your changes 22 hours back and bazel binary is created 18 hours ago. So if I am not wrong, changes might have already in the latest binary. Is in it ? Also, connection reset happen at 12th sec every time.

@iirina
Copy link
Contributor

iirina commented Aug 29, 2019

Unfortunately no, my commit is not in the latest release. bazel 0.29 was released yesterday, but its baseline was at the beginning of the month. See more in #8572.

@systemlogic
Copy link
Author

Just in case, My project details

harora37@harora37:~/dummy$ tree
.
├── BUILD
├── Hello.java
└── WORKSPACE

0 directories, 3 files
harora37@harora37:~/dummy$ cat BUILD 
java_binary(
    name = "Hello",
    main_class = "Hello",
    srcs = ["Hello.java"],
)

harora37@harora37:~/dummy$ cat Hello.java 
public class Hello {
	public static void main(String...str) {
		System.out.println("Hello Word");
	}
}

harora37@harora37:~/dummy$ cat WORKSPACE 
harora37@harora37:~/dummy$

@aehlig
Copy link
Contributor

aehlig commented Aug 29, 2019 via email

@systemlogic
Copy link
Author

yes, It is fire wall issue. But I am surprised how come bazel is not able to download https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz and wget works fine in same network.

@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo
Copy link
Member

philwo commented Feb 8, 2021

Is this still an issue?

@philwo philwo added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) type: support / not a bug (process) and removed untriaged labels Feb 8, 2021
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label May 24, 2023
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: support / not a bug (process)
Projects
None yet
Development

No branches or pull requests

4 participants