iotaledger / compass

GNU Affero General Public License v3.0
44 stars 33 forks source link

error on building docker:layers_calculator to compute the Merkle tree on private tangle #143

Closed istabraq-iot closed 4 years ago

istabraq-iot commented 4 years ago

I want to setup a private tangle on my own virtual machine with Ubuntu 18.04, 4GB RAM and 20GB memory. I have follow this instructions: https://docs.iota.org/docs/compass/0.1/how-to-guides/set-up-a-private-tangle. Every command works fine until reach this one: bazel run //docker:layers_calculator. It shows an error as follows:

Starting local Bazel server and connecting to it...
ERROR: /home/istabraq/compass/third-party/maven_deps.bzl:3:5: Traceback (most recent call last):
    File "/home/istabraq/compass/WORKSPACE", line 42
        maven_jars()
    File "/home/istabraq/compass/third-party/maven_deps.bzl", line 3, in maven_jars
        native.maven_jar(<4 more arguments>)
type 'struct' has no method maven_jar()
ERROR: error loading package '': Encountered error while reading extension file 'protobuf_deps.bzl': no such package '@com_google_protobuf_deps//': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'protobuf_deps.bzl': no such package '@com_google_protobuf_deps//': error loading package 'external': Could not load //external package
INFO: Elapsed time: 4.743s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

How can I solve this problem? what I have missed?

istabraq-iot commented 4 years ago

@GalRogozinski @karimodm

GalRogozinski commented 4 years ago

Sorry for the delay We are currently all focused on IRI release issues

After fixing those issues we will tend to compass

istabraq-iot commented 4 years ago

I have solved it but now I have new error:

ERROR: An error occurred during the fetch of repository 'io_netty_netty_tcnative_boringssl_static':
   java.io.IOException: Error downloading [http://central.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.25.Final/netty-tcnative-boringssl-static-2.0.25.Final.jar] to /home/istabraq/.cache/bazel/_bazel_istabraq/375cc74ae3ea6eac7c6410ee6367e7f6/external/io_netty_netty_tcnative_boringssl_static/netty-tcnative-boringssl-static-2.0.25.Final.jar: Unknown host: central.maven.org
ERROR: /home/istabraq/compass/compass/BUILD:10:1: //compass:layers_calculator depends on @io_netty_netty_tcnative_boringssl_static//jar:jar in repository @io_netty_netty_tcnative_boringssl_static which failed to fetch. no such package '@io_netty_netty_tcnative_boringssl_static//jar': java.io.IOException: Error downloading [http://central.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.25.Final/netty-tcnative-boringssl-static-2.0.25.Final.jar] to /home/istabraq/.cache/bazel/_bazel_istabraq/375cc74ae3ea6eac7c6410ee6367e7f6/external/io_netty_netty_tcnative_boringssl_static/netty-tcnative-boringssl-static-2.0.25.Final.jar: Unknown host: central.maven.org
ERROR: Analysis of target '//docker:layers_calculator' failed; build aborted: no such package '@io_netty_netty_tcnative_boringssl_static//jar': java.io.IOException: Error downloading [http://central.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.25.Final/netty-tcnative-boringssl-static-2.0.25.Final.jar] to /home/istabraq/.cache/bazel/_bazel_istabraq/375cc74ae3ea6eac7c6410ee6367e7f6/external/io_netty_netty_tcnative_boringssl_static/netty-tcnative-boringssl-static-2.0.25.Final.jar: Unknown host: central.maven.org
GalRogozinski commented 4 years ago

I tried to have a look today. Due to constraints I couldn't invest too much time on this issue. It seemed to be harder than I anticipated.

Please use docker images from here in the meanwhile: https://hub.docker.com/r/iotacafe/compass/tags

DaSoty commented 4 years ago

You can solve your error with the following reply of one issue: https://github.com/bazelbuild/rules_docker/issues/705#issuecomment-551393211.

After solve this i get the same error as you notify forward. I solve this with the following workaround: https://github.com/iotaledger/compass/issues/142#issuecomment-58673532 NOTE: _if you don't have the path that the user comment in the workaround you need to execute the bazel run //docker:layers_calculator, get the error, and after you will have the folder with the "external" folder inside._

After this i get one error with the JDK that i solve installing the new jdk: sudo apt install default-jdk

Once the jdk was installed i had another error with the docker permissions so i gave them: sudo chmod 666 /var/run/docker.sock

Is working fine now with me.

lyudad commented 4 years ago

Hello. I have same issue no such package '@com_google_protobuf_deps//'. It happend if run bazel run //docker:layers_calculator

lyudad commented 4 years ago

fixed it by follow https://github.com/iotaledger/compass/issues/142#issuecomment-586735326 and after sudo chmod 666 /var/run/docker.sock and only after this run bazel run //docker:layers_calculator

karimodm commented 4 years ago

Fixed by #150

GalRogozinski commented 4 years ago

Duplicate of #142