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

When I use bash starter.sh,it goes wrong. #38

Open
causimmi opened this issue Jan 3, 2022 · 8 comments
Open

When I use bash starter.sh,it goes wrong. #38

causimmi opened this issue Jan 3, 2022 · 8 comments

Comments

@causimmi
Copy link

causimmi commented Jan 3, 2022

for log info like:

`root@rose-srv6:/home/rose/workspace/rose-srv6-control-plane/control_plane/contr
oller# bash starter.sh
WARNING:controller.ti_extraction:pygraphviz library is not installed
Traceback (most recent call last):
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 950, in send
self.connect()
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connection.py", line 200, in connect
conn = self._new_conn()
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6f0e727f40>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/requests-2.25.1-py3.8.egg/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8529): Max retries exceeded with url: /_db/_system/_api/database (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6f0e727f40>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rose/.envs/controller-venv/bin/controller", line 11, in
load_entry_point('rose-srv6-control-plane-controller==0.0.1', 'console_scripts', 'controller')()
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/rose_srv6_control_plane_controller-0.0.1-py3.8.egg/controller/controller_cli.py", line 190, in __main
init_db('srv6')
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/rose_srv6_control_plane_controller-0.0.1-py3.8.egg/controller/init_db.py", line 52, in init_db
arangodb_driver.init_db(
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/rose_srv6_control_plane_controller-0.0.1-py3.8.egg/controller/arangodb_driver.py", line 121, in init_db
if sys_db.has_database(db_name):
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/database.py", line 729, in has_database
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/database.py", line 719, in databases
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/api.py", line 66, in _execute
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/executor.py", line 81, in execute
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/connection.py", line 154, in send_request
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/python_arango-5.4.0-py3.8.egg/arango/http.py", line 103, in send_request
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/requests-2.25.1-py3.8.egg/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/requests-2.25.1-py3.8.egg/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/requests-2.25.1-py3.8.egg/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8529): Max retries exceeded with url: /_db/_system/_api/database (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6f0e727f40>: Failed to establish a new connection: [Errno 111] Connection refused'))`

@StefanoSalsano
Copy link
Member

Hi @causimmi you are right, I've been able to reproduce the issue on the latest VM rose 2.7

we will try to fix the issue and let you know soon...

@causimmi
Copy link
Author

causimmi commented Jan 4, 2022

I test that socket is not binded by sock.bind(addr) in

File "/home/rose/.envs/controller-venv/lib/python3.8/site-packages/urllib3-1.26.5-py3.8.egg/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)

and some HTTP message is not received correctly

@cscarpitta
Copy link
Contributor

cscarpitta commented Feb 8, 2022

Hi @causimmi, we fixed this problem in netgroup/rose-srv6-control-plane#90.

The problem was caused by a change in the v2.7 version of the ROSE VM.

By default, the controller attempted to connect to an ArangoDB database, which would cause a crash if the controller was started while ArangoDB was not running.

However since ArangoDB is only required for a few use cases, in netgroup/rose-srv6-control-plane#90 we changed the default controller configuration by disabling persistence on ArangoDB and we added instructions to enable persistence to rose-srv6-tutorial-part-2-control-plane.

Please run the update script that you can find on the Desktop of the ROSE-VM to pull the last changes.

Let me know if you run into any other problems.

Regards,
Carmine

@chlungwoo
Copy link

Hello Carmine,

First of all, I really appreciate that you and your team for the excellent work! This is so useful for students and researchers.

I had the same error message after I ran "bash starter.sh" using the ROSE VM I downloaded 1.5 years ago. I found out this blog and re-downloaded v2.7, but had the same problem. I am wondering if I could just make a few changes based on your fixes. If so, do you have those changes or what file(s) I should change?

BTW, when I ran

cd /home/rose/workspace/rose-srv6-control-plane/control_plane/apps/apps/cli

There is no starter.sh file in the directory. Is is related to the previous problem?

Thanks and regards,
Chung

@cscarpitta
Copy link
Contributor

Hi @chlungwoo, please try to run the update script located on the Desktop of the ROSE-VM.

This script updates all the components installed in the ROSE-VM and creates the missing starter.sh script in /home/rose/workspace/rose-srv6-control-plane/control_plane/apps/apps/cli.

@chlungwoo
Copy link

Thank you! I will try it later.

@lungwoo
Copy link

lungwoo commented Jan 27, 2023

Hi Carmine,

I ran the update and starter.sh was available. But there was an error at line 51 of "cli.py":

Traceback (most recent call last):
File "cli.py", line 51, in
from apps.cli import srv6_cli, srv6pm_cli, topo_cli
File "/home/rose/workspace/rose-srv6-control-plane/control_plane/apps/apps/cli/srv6_cli.py", line 38, in
from apps.nb_grpc_client import utils as grpc_utils
File "/home/rose/workspace/rose-srv6-control-plane/control_plane/apps/apps/nb_grpc_client/utils.py", line 40, in
from nb_commons_pb2 import (STATUS_SUCCESS,
File "/home/rose/workspace/rose-srv6-control-plane/control_plane/nb_protos/gen_py/nb_commons_pb2.py", line 33, in
_descriptor.EnumValueDescriptor(
File "/home/rose/.envs/srv6-apps-venv/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in new
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Any more update needs to be run? Thanks again!

@bastienvty
Copy link

Hi @lungwoo,

By downgrading the protobuf to 3.12.0 worked for me (don't forget to be in the correct virtual environment).

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

6 participants