Ceph Octopus zabbix config-show fails with python error - python

Hi I have managed to install Ceph Octopus 15.2.4 and python Python 3.6.8 on CentOS Linux release 8.2.2004.
Cluster health is Good. However, when I try configure the zabbix module using steps in this
https://docs.ceph.com/en/latest/mgr/zabbix/
I get
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1167, in _handle_command
return self.handle_command(inbuf, cmd)
File "/usr/share/ceph/mgr/zabbix/module.py", line 407, in handle_command
return 0, json.dumps(self.config, index=4, sort_keys=True), ''
File "/lib64/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
TypeError: __init__() got an unexpected keyword argument 'index'
I checked the template and it looks to be latest.
Not sure what seems to be the issue here.
Regards,
j

This problem is typo bug.
https://github.com/ceph/ceph/commit/0e9303d0599c92e575aae7acca87328ed8ee9527
This one has a bad typo in it! It should be "indent=4", not "index=4"!
But, this problem is not fixed in 15.2.5.

Related

cassandra-driver issue on shutdown

Using cassandra-driver version 3.24.0, I'm able to connect to a cluster and run queries (using protocol 4) without any issues.
However when I call cluster.shutdown(), or let the script completes which calls it automatically I think, I get the following exception :
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "cassandra\cluster.py", line 221, in cassandra.cluster._shutdown_clusters
File "cassandra\cluster.py", line 1759, in cassandra.cluster.Cluster.shutdown
File "cassandra\cluster.py", line 3147, in cassandra.cluster.Session.shutdown
File "cassandra\pool.py", line 493, in cassandra.pool.HostConnection.shutdown
File "C:\Users\myuser\AppData\Local\Programs\Python\Python37\lib\site-packages\cassandra\io\asyncorereactor.py", line 386, in close
ConnectionShutdown("Connection to %s was closed" % self.endpoint))
File "cassandra\connection.py", line 207, in cassandra.connection.DefaultEndPoint.__str__
TypeError: %d format: a number is required, not str
I couldn't find anything about this, it looks like an issue in the library itself but I assume I must be passing something it doesn't like somewhere.
Any ideas what could be causing this ? Weather I use execution profiles or the legacy API, same result.
Thanks
Have the same issue.
Found that in cassandra/connection.py in row 207 there is str method, which uses port as %d. All you need is during cluster creation send int, not str
cluster = Cluster(contact_points=[hostname], port=int(port), execution_profiles=profiles, auth_provider=auth)
I faced the same issue. I type cast the port no to int value.
int(port) and issue is resolved.

Zappa Deployment Error for Alexa Skill: Object 'NoneType' not callable?

Whenever I try to deploy my Alexa Skill (for the Amazon Promotion) I see this error when I go to the web address of the endpoint:
"{'message': 'An uncaught exception happened while servicing this request. You can investigate this with the `zappa tail` command.', 'traceback': ['Traceback (most recent call last):\\n', ' File \"/var/task/handler.py\", line 433, in handler\\n response = Response.from_app(self.wsgi_app, environ)\\n', ' File \"/var/task/werkzeug/wrappers.py\", line 903, in from_app\\n return cls(*_run_wsgi_app(app, environ, buffered))\\n', ' File \"/var/task/werkzeug/test.py\", line 884, in run_wsgi_app\\n app_rv = app(environ, start_response)\\n', \"TypeError: 'NoneType' object is not callable\\n\"]}"
After investigating this further, I ran zappa tail to see what the issue is.
I scrolled up through the tail and noticed this error message:
[1499529414189] libssl.so.1.0.0: cannot open shared object file: No such file or directory: ImportError
What does this mean? How can I resolve this? I'm working on Ubuntu 14.04, Python 3.6 using flask-ask.
I was only able to correct this my installing everything from scratch according the instructions at https://developer.amazon.com/blogs/post/8e8ad73a-99e9-4c0f-a7b3-60f92287b0bf/new-alexa-tutorial-deploy-flask-ask-skills-to-aws-lambda-with-zappa. Something in the venv directory just got messed up.

jirashell throws a "KeyError: u'consumer_key'" and does not start

I am new to jira-python and have run into an issue with using jirashell.
jira-python was installed from documentation given here: http://jira.readthedocs.org/en/latest/
When I try to start jirashell using:
ubuntu#ip-10-0-0-12:~$ jirashell -s https://jira.atlassian.com
I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/jirashell", line 11, in <module> sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/jira/jirashell.py", line 248, in main
jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)
File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 202, in __init__self._create_oauth_session(oauth)
File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 1871, in _create_oauth_session
oauth['consumer_key'],
KeyError: u'consumer_key'
I have also tried to get to a server using basic auth but that returns the same error. Using curl works fine, but I wanted to see the objects that are getting returned and get help as I develop by python-jira integration.
Thank you for any insight.

couchapp push gives [Errno 22] Invalid Argument

I've just installed couchapp from the instructions and have gone through the Getting Started tutorial. When I run couchapp push I get an error like this:
2012-06-23 14:05:08 [CRITICAL] unknown error [[Errno 22] Invalid argument]
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/couchapp/dispatch.py", line 48, in dispatch
return _dispatch(args)
File "/Library/Python/2.6/site-packages/couchapp/dispatch.py", line 92, in _dispatch
return fun(conf, conf.app_dir, *args, **opts)
File "/Library/Python/2.6/site-packages/couchapp/commands.py", line 76, in push
dbs = conf.get_dbs(dest)
File "/Library/Python/2.6/site-packages/couchapp/config.py", line 146, in get_dbs
return [Database(dburl, use_proxy=use_proxy) for dburl in dburls]
File "/Library/Python/2.6/site-packages/couchapp/client.py", line 223, in __init__
self.res.head()
File "/Library/Python/2.6/site-packages/restkit/resource.py", line 122, in head
params_dict=params_dict, **params)
File "/Library/Python/2.6/site-packages/couchapp/client.py", line 143, in request
raise RequestFailed("unknown error [%s]" % str(e))
RequestFailed: unknown error [[Errno 22] Invalid argument]
I'm on OS X 10.6.8, CouchDB is already setup with admins, and the .couchapprc file has the default db set as http://user:pass#localhost:5984/mydb. I've followed the instructions from couchapp.org for a Homebrew install. The only thing I can figure is that this is a Python-related problem, but I don't know Python and can't seem to figure out why this thing is failing. Any help tracking down this problem and fixing it would be much appreciated.
Thanks.
When this happens to me it usually means SOMEWHERE....SOMEHOW, some JSON in the _doc folder is formatted badly, and it could be on a weird level. So like two _ids or a _rev where it shouldn't be.
I get the same problem and solved it, by downgrade to other version.
https://github.com/downloads/couchapp/couchapp/couchapp-0.8.1-macosx.zip
Seems the best solution, for now.

Error running celeryd

I'm posting this question (and answer) so if anybody else has this problem in the future, you'll be able to google it.
If you are trying to run celeryd in Django like so:
python manage.py celeryd
You can receive the following error immediately after it has started:
celery#eric-desktop-dev has started.
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
<... snip ...>
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/connection.py", line 134, in __init__
self._x_start_ok(d, login_method, login_response, locale)
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/connection.py", line 704, in _x_start_ok
args.write_longstr(response)
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/serialization.py", line 352, in write_longstr
self.write_long(len(s))
TypeError: object of type 'NoneType' has no len()
A rather cryptic error message, with no real clue as to where to go to fix the problem. See below for the answer so you don't waste a bunch of time on this error like I did today :)
You're missing a celery setting in settings.py. In my case it was caused by a typo (I missed an 'S' in BROKER_PASSWORD). Double check you included all the required settings and that each one is spelled everything correctly, and you'll avoid making as ass of yourself like I did today :)

Categories

Resources