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

Host and Port Configuration #6

Open
thegorski opened this issue Aug 13, 2020 · 3 comments
Open

Host and Port Configuration #6

thegorski opened this issue Aug 13, 2020 · 3 comments

Comments

@thegorski
Copy link

Hello,

How do I figure out the correct host and port to use for the following steps? Thank you.

cd free5gmano-cli/nm
vim setting.py
@nmpvinh
Copy link

nmpvinh commented Aug 18, 2020

Hi @cewuandy @tw0927041027 @Samcandy

It's really appreciated if you could shed some light for us.

I have the same concern with @thegorski , i'm not sure how to configure it.
Here is my pod info. Which mano/nfvo IP addresses should be use?
image

image

I try as below:
ubuntu@ubuntu-KVM:~/simpleexampleplugin$ cat config.yaml
allocate_file: "allocate/main.py"
deallocate_file: "deallocate/main.py"
nm_host: '192.168.254.210:8000'
nfvo_host: '192.168.254.208:8000'
subscription_host: '192.168.254.210:8082'

ubuntu@ubuntu-KVM:~$ cat free5gmano-cli/nm/settings.py
NM_HOST = '192.168.254.210'
NM_PORT = '30088'
NM_URL = 'http://{0}:{1}/'.format(NM_HOST, NM_PORT)

But it fail to run nmctl register
ubuntu@ubuntu-KVM:~$ nmctl register plugin kube5gnfvo -f simpleexampleplugin/
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, 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 "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1264, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1310, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1259, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 976, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6d514cf0f0>: 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 "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.254.210', port=30088): Max retries exceeded with url: /plugin/management/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6d514cf0f0>: 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 "/usr/local/bin/nmctl", line 11, in
load_entry_point('nmctl', 'console_scripts', 'nmctl')()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/free5gmano-cli/nm/nmctl.py", line 295, in register_plugin
response = api.register_service_mapping_plugin(data, files)
File "/home/ubuntu/free5gmano-cli/utils/api.py", line 55, in register_service_mapping_plugin
return requests.post(register_plugin_url, files=files, data=data, headers=zip_headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.254.210', port=30088): Max retries exceeded with url: /plugin/management/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6d514cf0f0>: Failed to establish a new connection: [Errno 111] Connection refused',))

@yanyan8566
Copy link
Contributor

Hi @nmpvinh

Please change "NM_HOST" to your Kubernetes Master IP , and the "NM_PORT" use service/free5gmano NodePort type port "30088" , and try it again . Thank you .

@anoopkumarr-47
Copy link

Hi @nmpvinh

Please change "NM_HOST" to your Kubernetes Master IP , and the "NM_PORT" use service/free5gmano NodePort type port "30088" , and try it again . Thank you .

Hi @yanyan8566

Can you please tell what is the host and port configuration if we are using openstack and tacker.

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

4 participants