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

Startup fails with Python errors for some peers and CAs #13

Open
kaonis opened this issue May 3, 2021 · 0 comments
Open

Startup fails with Python errors for some peers and CAs #13

kaonis opened this issue May 3, 2021 · 0 comments

Comments

@kaonis
Copy link

kaonis commented May 3, 2021

Expected Behavior

The operate script should succesfully bring the Fabric network up

Current Behavior

...
Creating network "net_p&g_loyalty_hlfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.manufacturer.example.com" with default driver
Creating volume "net_peer0.middlemen.example.com" with default driver
Creating volume "net_peer1.middlemen.example.com" with default driver
Creating volume "net_peer2.middlemen.example.com" with default driver
Creating volume "net_peer0.consumer.example.com" with default driver
Creating peer2.middlemen.example.com ...
Creating ca.manufacturer.example.com ...
Creating peer0.consumer.example.com  ...
Creating ca.middlemen.example.com    ...
Creating orderer.example.com         ...
Creating peer0.manufacturer.example.com ...
Creating ca.consumer.example.com        ...
Creating ca.manufacturer.example.com    ... done
Creating peer0.consumer.example.com     ... done
Creating ca.middlemen.example.com       ... done
Creating orderer.example.com            ... done
Creating peer0.manufacturer.example.com ... done
ERROR: for ca.consumer.example.com  a bytes-like object is required, not 'str'
Creating peer0.middlemen.example.com    ... done
ERROR: for peer1.middlemen.example.com  a bytes-like object is required, not 'str'

ERROR: for peer2.middlemen.example.com  a bytes-like object is required, not 'str'

ERROR: for ca.consumer.example.com  a bytes-like object is required, not 'str'

ERROR: for peer1.middlemen.example.com  a bytes-like object is required, not 'str'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 261, in _raise_for_status
    response.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.22/containers/da7aa319b27dfaf6f61f106852e038fec62a630b74a6bca8557075fdfd030b2c/start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/compose/service.py", line 625, in start_container
    container.start()
  File "/usr/lib/python3/dist-packages/compose/container.py", line 241, in start
    return self.client.start(self.id, **options)
  File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/docker/api/container.py", line 1095, in start
    self._raise_for_status(res)
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 263, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/lib/python3/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'Ports are not available: listen tcp 0.0.0.0:9051: bind: An attempt was made to access a socket in a way forbidden by its access permissions.'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
    command()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1107, in up
    to_attach = up(False)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1088, in up
    return self.project.up(
  File "/usr/lib/python3/dist-packages/compose/project.py", line 565, in up
    results, errors = parallel.parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/project.py", line 548, in do
    return service.execute_convergence_plan(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 545, in execute_convergence_plan
    return self._execute_convergence_create(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 460, in _execute_convergence_create
    containers, errors = parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 465, in <lambda>
    lambda service_name: create_and_start(self, service_name.number),
  File "/usr/lib/python3/dist-packages/compose/service.py", line 457, in create_and_start
    self.start_container(container)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 627, in start_container
    if "driver failed programming external connectivity" in ex.explanation:
TypeError: a bytes-like object is required, not 'str'
ERROR !!!! Unable to start network

Steps to Reproduce

  1. Install prerequisites in the required versions
  2. Run sudo ./operate.sh up
@kaonis kaonis changed the title Python errors for some peers and CAs during startup Startup fails with Python errors for some peers and CAs May 3, 2021
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

1 participant