Closed robphill closed 4 years ago
Just the server name. If you want to use certificate validation, you should use FQDN.
For the certificate, enter base 64. example below.
-----BEGIN CERTIFICATE----- MIIF2zCCBMOgAwIBAgIQMj8HjgweXkbwMLVJON0bgTANBgkqhkiG9w0BAQsFADCB
( BLAH BLAH BLAH BLAH )
ElnDwrxs1CsMwh7zY8wB8gc7GHq63BBW1hCwsDx2guDCEmbJa+ktv7EBz2BgiL6V Zg+QqIFz0YSDQJfFMTi -----END CERTIFICATE-----
As for the certificate, you can leave the certificate verification disabled to rule that out. If you want to use ssl verification, then you only need to add the base 64 certificate if you are using self signed or internal CA certs. In that case, you can download the 'tomcat' certificate from the callmanager and upload that here. I have not tested this with an internal CA signed cert yet. I've tested with the default self signed cert (where I uploaded tomcat base 64) and I've tested with public CA signed certificate (where I didn't have to upload any cert, just enable the ssl verification)
Thanks, just entering the IP address for the server worked fine.
Robert Phillips
From: Justin Steinberg notifications@github.com Sent: Tuesday, May 5, 2020 12:09 PM To: jsteinberg1/CUCM-Phone-Info CUCM-Phone-Info@noreply.github.com Cc: Robert Phillips (robphill) robphill@cisco.com; Author author@noreply.github.com Subject: Re: [jsteinberg1/CUCM-Phone-Info] Trouble adding CUCM cluster (#1)
Just the server name. If you want to use certificate validation, you should use FQDN.
For the certificate, enter base 64. example below.
-----BEGIN CERTIFICATE----- MIIF2zCCBMOgAwIBAgIQMj8HjgweXkbwMLVJON0bgTANBgkqhkiG9w0BAQsFADCB
( BLAH BLAH BLAH BLAH )
ElnDwrxs1CsMwh7zY8wB8gc7GHq63BBW1hCwsDx2guDCEmbJa+ktv7EBz2BgiL6V Zg+QqIFz0YSDQJfFMTi -----END CERTIFICATE-----
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jsteinberg1/CUCM-Phone-Info/issues/1#issuecomment-624148078, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANBOQUPQK7HAE5EBVMBT6GDRQA23DANCNFSM4MZVPL4Q.
So I got the cluster setup. I ran a manual CUCM sync and then a manual phone scrape and both the Phone Info and Phone Scraper tabs have no data in them?
Can you provide docker logs from the fastapi container during a manual cucm sync ?
Are you sure the cucm account has the appropriate roles? Can you check the readme? It needs to be able to access serviceability api role and also needs ccmadmin read-only to download to serviceability wsdl.
Only registered phones are added to the database, so if serviceability is failing that would explain it.
Here are the roles assigned to the user.
There should be plenty of phones registered to this cluster.
Looks right. Hmm, not sure. Please provide logs from fastapi and I'll take a look.
Sure, can you provide the path to the specific logfile you are looking for?
Just the standard docker log output. If running Docker on windows you can open the Docker Dashboard and go to the 'fastapi' container and it should show the output there within docker. You should see the AXL and serviceability attempts when you trigger a manual CUCM sync.
If you are running docker on linux, need to use the command 'docker logs -f
On line 230 you see the following error "ERROR: database error(<class 'AttributeError'>, AttributeError("'NoneType' object has no attribute 'item'"), <traceback object at 0x7f8d545bd050>)"
seems to be failing to recognize the IP of certain phones/endpoints. I haven't encountered that before. I"ll update the code later to skip and log devices where the IP isn't available and we can see how many devices are like that and whether it is a specific phone model generating the issue.
Can you clone the repository again and rebuild your docker images (docker-compose up --build) and see if it works now. I'm expecting some debug errors during the CUCM sync for phones that are being skipped because the IP isn't being determined. It would be interesting to see how many phones are skipped and why. I'd like to take a look at the logs if you don't mind.
With new build, fastapi container will not start, stays in a perpetual restart state
Traceback (most recent call last):
File "/fastapi/api/start_fastapi_prod.py", line 3, in
Please download new build again. Run 'docker-compose up --build'.
If you are still having this problem, please stop the docker containers 'docker-compose down' and delete all the subdirectories & files within the 'data' folder and restart 'docker-compose up'.
Blew away the container, recloned the repository, ran docker-compose up --build and fastapi keeps restarting
phone_info_fastapi | Traceback (most recent call last):
phone_info_fastapi | File "/fastapi/api/start_fastapi_docker.py", line 70, in <module>
phone_info_fastapi | ssl_certfile=cert_file
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/uvicorn/main.py", line 354, in run
phone_info_fastapi | server.run()
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/uvicorn/main.py", line 382, in run
phone_info_fastapi | loop.run_until_complete(self.serve(sockets=sockets))
phone_info_fastapi | File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/uvicorn/main.py", line 389, in serve
phone_info_fastapi | config.load()
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/uvicorn/config.py", line 288, in load
phone_info_fastapi | self.loaded_app = import_from_string(self.app)
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/uvicorn/importer.py", line 20, in import_from_string
phone_info_fastapi | module = importlib.import_module(module_str)
phone_info_fastapi | File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
phone_info_fastapi | return _bootstrap._gcd_import(name[level:], package, level)
phone_info_fastapi | File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
phone_info_fastapi | File "<frozen importlib._bootstrap>", line 983, in _find_and_load
phone_info_fastapi | File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
phone_info_fastapi | File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
phone_info_fastapi | File "<frozen importlib._bootstrap_external>", line 728, in exec_module
phone_info_fastapi | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
phone_info_fastapi | File "/fastapi/api/Main.py", line 12, in <module>
phone_info_fastapi | from api.scheduler.Scheduler import scheduler
phone_info_fastapi | File "/fastapi/api/scheduler/Scheduler.py", line 69, in <module>
phone_info_fastapi | scheduler = BackgroundScheduler()
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
phone_info_fastapi | self.configure(gconfig, **options)
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 126, in configure
phone_info_fastapi | self._configure(config)
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/apscheduler/schedulers/background.py", line 29, in _configure
phone_info_fastapi | super(BackgroundScheduler, self)._configure(config)
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 697, in _configure
phone_info_fastapi | self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/tzlocal/unix.py", line 165, in get_localzone
phone_info_fastapi | _cache_tz = _get_localzone()
phone_info_fastapi | File "/usr/local/lib/python3.7/site-packages/tzlocal/unix.py", line 155, in _get_localzone
phone_info_fastapi | with open(tzpath, 'rb') as tzfile:
phone_info_fastapi | IsADirectoryError: [Errno 21] Is a directory: '/etc/localtime'
phone_info_fastapi exited with code 1
Can you try to rebuild without using cache?
docker-compose down docker-compose build --no-cache docker-compose up
If that doesn't work, can you clone one more time from repo.
I got it up and running, playing with it now.
When trying to add a new cluster, anytime I try to save it I get the error "Error encountering saving cluster. Please check settings/credentials and try again"
I have validated the credentials provided work against the AXL URL provided. How does the AXL URL need to be formatted? Like https://x.x.x.x:8443/axl/ ????? In the certificate part of the setup, which certificate and in which format are you looking for?