I have problem when following the instructions of Starting everything:
The 4 th step:
$ docker-compose scale node=4
error message as follow:
szlee118@DESKTOP-BUB68TV:~/pbft$ docker-compose scale node=4
WARNING: The API_HOST variable is not set. Defaulting to a blank string.
WARNING: The scale command is deprecated. Use the up command with the --scale flag instead.
Starting pbft_node_1 ...
Starting pbft_node_2 ...
Starting pbft_node_3 ...
Starting pbft_node_4 ...
ERROR: for pbft_node_2 a bytes-like object is required, not 'str'
ERROR: for pbft_node_1 a bytes-like object is required, not 'str'
ERROR: for pbft_node_3 a bytes-like object is required, not 'str'
ERROR: for pbft_node_4 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: 400 Client Error: Bad Request for url: http+docker://localhost/v1.22/containers/69e5ca8729102b1a9c1eb30fd090d599661934957fcb207318159247e6825e74/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: 400 Client Error: Bad Request ("b'OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/usr/lib/jvm/java-8-openjdk-amd64/bin/java\": stat /usr/lib/jvm/java-8-openjdk-amd64/bin/java: no such file or directory": unknown'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in
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 933, in scale
self.project.get_service(service_name).scale(num, timeout=timeout)
File "/usr/lib/python3/dist-packages/compose/service.py", line 305, in scale
self._execute_convergence_start(
File "/usr/lib/python3/dist-packages/compose/service.py", line 506, in _execute_convergence_start
_, 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 508, in
lambda c: self.start_container_if_stopped(c, attach_logs=not detached, quiet=True),
File "/usr/lib/python3/dist-packages/compose/service.py", line 620, in start_container_if_stopped
return 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'
Is the error in any relation with "API_host variable is not set" and where is the API_host variable should be set?
Has anyone faced similar issues before and can offer some hints?
Sorry to bother you, thank you and appreciated for help!