bbc / nmos-registration Goto Github PK
View Code? Open in Web Editor NEWAMWA NMOS IS-04 Registration API Service
License: Apache License 2.0
AMWA NMOS IS-04 Registration API Service
License: Apache License 2.0
Hi everyone! I have installed this package on my CentOS 7, but can't launch.
I installed as described in README.md fine.
Also installed https://github.com/bbc/nmos-common
I have this CentOS 7
Did someone test this app on CentOS 7?
[root@localhost BBC]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core
[root@localhost BBC]#
I also have Python 2.7.5 and Python 3.7.1.
I got this error then launched from python3
[root@localhost nmos-registration]# python3 start.py
Traceback (most recent call last):
File "start.py", line 1, in
from nmosregistration.registryaggregatorservice import RegistryAggregatorService
File "/opt/BBC/nmos-registration/nmosregistration/registryaggregatorservice.py", line 63
print "Exception loading config: {}".format(e)
^
SyntaxError: invalid syntax
[root@localhost nmos-registration]#
And this error when i launched from python 2.
[root@localhost nmos-registration]# python start.py
Traceback (most recent call last):
File "start.py", line 1, in
from nmosregistration.registryaggregatorservice import RegistryAggregatorService
File "/opt/BBC/nmos-registration/nmosregistration/registryaggregatorservice.py", line 15, in
from nmoscommon.mdns import MDNSEngine
File "/usr/lib/python2.7/site-packages/nmoscommon/mdns/init.py", line 3, in
from .mdnsEngine import MDNSEngine # noqa: F401
File "/usr/lib/python2.7/site-packages/nmoscommon/mdns/mdnsEngine.py", line 17, in
import zeroconf_monkey as zeroconf
File "/usr/lib/python2.7/site-packages/zeroconf_monkey.py", line 26, in
import zeroconf
File "/usr/lib/python2.7/site-packages/zeroconf.py", line 175
def current_time_millis() -> float:
^
SyntaxError: invalid syntax
[root@localhost nmos-registration]#
Also then launched bin folder got this error.
[root@localhost nmos-registration]# cd bin
[root@localhost bin]# ./nmosregistration
Traceback (most recent call last):
File "./nmosregistration", line 7, in
from nmosregistration.registryaggregatorservice import RegistryAggregatorService
File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, **kwargs)
File "build/bdist.linux-x86_64/egg/nmosregistration/registryaggregatorservice.py", line 15, in
File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/nmoscommon/mdns/init.py", line 3, in
from .mdnsEngine import MDNSEngine # noqa: F401
File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/nmoscommon/mdns/mdnsEngine.py", line 17, in
import zeroconf_monkey as zeroconf
File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/zeroconf_monkey.py", line 26, in
import zeroconf
File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/zeroconf.py", line 175
def current_time_millis() -> float:
^
SyntaxError: invalid syntax
[root@localhost bin]#
Similar to a bug found in the mDNS bridge. Just need to remove this unnecessary comparison: https://github.com/bbc/nmos-registration/blob/master/nmosregistration/registryaggregatorservice.py#L87
The etcd-based implementation uses type and id as a composite key. See https://github.com/bbc/nmos-registration/blob/master/nmosregistration/etcd_backend.py.
This means that a POST to /resource with a duplicate resource id for a different type is currently accepted.
Please tell me we agree these UUIDs need to be truly unique, not unique per type!
Thanks to @rhastie for discovering this issue.
I am not sure if registration is working properly or not as no nmos node seem to register the services and I get this output:
$ ./nmosregistration
2020-07-10 12:25:27,018 : utils : DEBUG : Choosing interface from /etc/nmoscommon/config.json file: []
2020-07-10 12:25:27,018 : utils : DEBUG : Could not find ipp-utils, will try using default gateway interface
2020-07-10 12:25:27,019 : utils : DEBUG : Choosing interface using the default gateway: 192.168.2.1
WARNING:mdnsbridge:This class is deprecated. Please use the matching one in nmos-mdns-bridge instead.
Exception loading config: name 'f' is not defined
2020-07-10 12:25:27,204 : utils : DEBUG : Choosing interface from /etc/nmoscommon/config.json file: []
2020-07-10 12:25:27,204 : utils : DEBUG : Could not find ipp-utils, will try using default gateway interface
2020-07-10 12:25:27,204 : utils : DEBUG : Choosing interface using the default gateway: 192.168.2.1
2020-07-10 12:25:27,209 : utils : DEBUG : Choosing interface from /etc/nmoscommon/config.json file: []
2020-07-10 12:25:27,209 : utils : DEBUG : Could not find ipp-utils, will try using default gateway interface
2020-07-10 12:25:27,210 : utils : DEBUG : Choosing interface using the default gateway: 192.168.2.1
Could not open pid file, continuing
DEBUG:mdns-engine:Choosing interface from /etc/nmoscommon/config.json file: []
DEBUG:mdns-engine:Could not find ipp-utils, will try using default gateway interface
DEBUG:mdns-engine:Choosing interface using the default gateway: 192.168.2.1
Waiting for httpserver to start...
HttpServer running
Running on port: 8235
ERROR:cysystemd.daemon:Data could not be sent
DEBUG:garbage_collect:Not collecting - another collector has recently collected
DEBUG:garbage_collect:scheduled...
DEBUG:garbage_collect:Not collecting - another collector has recently collected
DEBUG:garbage_collect:scheduled...
Also on running the nmos-mdns-bridge output:
DEBUG:zeroconf mDNS:mDNS Service add: {'action': 'add', 'type': '_nmos-registration._tcp.local.', 'name': 'registration_192.168.2.1_http_dep._nmos-registration._tcp.local.', 'port': 80, 'hostname': 'registration_192.168.2.1_http_dep._nmos-registration._tcp.local', 'address': '192.168.2.1', 'txt': {b'pri': b'100', b'api_ver': b'v1.0,v1.1,v1.2,v1.3', b'api_proto': b'http', b'api_auth': False}}
DEBUG:zeroconf mDNS:mDNS Service add: {'action': 'add', 'type': '_nmos-register._tcp.local.', 'name': 'registration_192.168.2.1_http._nmos-register._tcp.local.', 'port': 80, 'hostname': 'registration_192.168.2.1_http._nmos-register._tcp.local', 'address': '192.168.2.1', 'txt': {b'pri': b'100', b'api_ver': b'v1.0,v1.1,v1.2,v1.3', b'api_proto': b'http', b'api_auth': False}}
Originally reported in bbc/nmos-joint-ri#1
"I will note that trying to GET from "http://localhost:8082/x-nmos/registration/v1.1/resource/nodes/[ID]" returns a "500: Internal Exception", I believe this should work."
I can't replicate this on our internal cluster at present, but will spin up a copy of the reference implementation to check.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.