Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Bug Run in ./private-tangle.sh install #88

Open
luciogtelecom opened this issue Sep 14, 2023 · 1 comment
Open

Bug Run in ./private-tangle.sh install #88

luciogtelecom opened this issue Sep 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@luciogtelecom
Copy link

Bug description

Briefly describe the bug.

Docker and docker-compose version

Which version of Docker and docker-compose are you running?

  • Docker version:
    pi@raspberrypi:~ $ docker --version
    Docker version 24.0.6, build ed223bc
    pi@raspberrypi:~ $ sudo apt install docker-compose
    Lendo listas de pacotes... Pronto
    Construindo árvore de dependências... Pronto
    Lendo informação de estado... Pronto
    docker-compose is already the newest version (1.25.0-1).
    Os seguintes pacotes foram instalados automaticamente e já não são necessários:
    libfuse2 tini
    Utilize 'sudo apt autoremove' para os remover.
    0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
    pi@raspberrypi:~ $ docker-compose --version
    docker-compose version 1.29.2, build unknown

Hardware specification

What hardware are you using?

  • Operating system:
    Raspberry pi 4 Model 4 4GB

Steps To reproduce the bug

Explain how the maintainer can reproduce the bug.

Based on the provided information, here's how the bug can be reproduced:

Steps To reproduce the bug

  1. Environment Setup:

    • Use a Raspberry Pi with the same OS and environment as yours.
    • Ensure that Python 3.9 is installed along with the required packages (urllib3, requests, docker, etc.).
    • Install Docker and Docker Compose on the Raspberry Pi.
  2. Clone the Repository:

    • Clone the one-click-tangle repository into the home directory of the Raspberry Pi:
      cd ~/ 
      git clone [repository_url] one-click-tangle
      
  3. Navigate to the Hornet Private Net Directory:

    • Change the directory to hornet-private-net within the one-click-tangle repository:
      cd ~/one-click-tangle/hornet-private-net
      
  4. Run the Installation Script:

    • Execute the private-tangle.sh script with the install argument:
      ./private-tangle.sh install
      
  5. Observe the Errors:

    • After running the script, you should observe the errors mentioned in your initial message, starting with the dig command not found and followed by the connection errors related to Docker.

Note: The exact reproduction might vary depending on the specific environment configurations, installed packages, and other factors. The maintainer might need to ensure that the environment closely matches yours to reproduce the bug accurately.

Expected behaviour

You expected the ./private-tangle.sh install command to successfully install and set up a private Tangle using the Hornet node software. This would involve initializing necessary configurations, starting up the required containers, and ensuring that all dependencies and services are running properly.

Actual behaviour

When you executed the ./private-tangle.sh install command, several errors occurred:

The dig command was not found, as indicated by the error message ./private-tangle.sh: linha 26: dig: comando não encontrado.
There was an issue with the Python script trying to make a connection, which resulted in a ConnectionRefusedError: [Errno 111] Connection refused.
This connection issue cascaded into multiple other errors, all stemming from the inability to establish a connection. The primary issue seems to be related to the Docker service, as indicated by the error messages related to docker/transport/unixconn.py and docker.errors.DockerException.

Errors

./private-tangle.sh: linha 26: dig: comando não encontrado: This error indicates that the dig command, which is commonly used for DNS lookup operations, is not available on your system.

ConnectionRefusedError: [Errno 111] Connection refused: This error suggests that the Python script tried to establish a connection (likely to a Docker service or container) but was unable to do so because the connection was refused.

urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused')): This error, stemming from the Python urllib3 library, further confirms the connection issue.

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused')): This error from the Python requests library is another manifestation of the connection problem.

docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111,'Connection refused')): This error indicates that the script was unable to fetch the Docker server API version due to the connection being refused.

@luciogtelecom luciogtelecom added the bug Something isn't working label Sep 14, 2023
@luciogtelecom
Copy link
Author

This is what is coming out when I try to run ./private-tangle.sh install:

pi@raspberrypi:~/one-click-tangle/hornet-private-net $ ./private-tangle.sh install
./private-tangle.sh: linha 26: dig: comando não encontrado
Setting permissions for Hornet...
Stopping containers...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.9/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.9/http/client.py", line 950, in send
self.connect()
File "/usr/local/lib/python3.9/dist-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.9/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.9/http/client.py", line 950, in send
self.connect()
File "/usr/local/lib/python3.9/dist-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/local/lib/python3.9/dist-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
File "/usr/local/lib/python3.9/dist-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/local/lib/python3.9/dist-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
File "/usr/local/lib/python3.9/dist-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/local/lib/python3.9/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111,'Connection refused'))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant