Cassandra CCM Error: "ccmlib.common.ArgumentError" - cassandra

I installed CCM utility of Cassandra, but when I try to create a cluster with the following command:
root#ubuntu2:~# ccm create cluster1 -v=2.0.9
I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/ccm", line 5, in
pkg_resources.run_script('ccm==2.0', 'ccm')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/ccm-2.0-py2.7.egg/EGG-INFO/scripts/ccm", line 72, in
File "build/bdist.linux-x86_64/egg/ccmlib/cmds/cluster_cmds.py", line 125, in run
File "build/bdist.linux-x86_64/egg/ccmlib/cluster.py", line 51, in init
File "build/bdist.linux-x86_64/egg/ccmlib/cluster.py", line 64, in load_from_repository
File "build/bdist.linux-x86_64/egg/ccmlib/repository.py", line 40, in setup
File "build/bdist.linux-x86_64/egg/ccmlib/repository.py", line 211, in download_version
ccmlib.common.ArgumentError: Invalid version =2.0.9 (underlying error is: HTTP Error 404: Not Found)
Changing to any other version of Cassandra in the command does not help.
There is no issue with Internet connection.
Will appreciate help.

Try ... -v 2.0.9
As the error suggests, the version number '=2.0.9' is not valid.

Related

AWS SAM giving error Unsupported Lambda runtime nodejs18.x

I am trying to run a simple lambda function using AWS sam, version(1.57.0)
I've installed in my ubuntu system nodejs version 14.18.3
When I try to run the project it gives errorUnsupported Lambda runtime nodejs18.x
Below is the full stacktrace
Invoking index.handler (nodejs18.x)
Traceback (most recent call last):
File "samcli/__main__.py", line 12, in <module>
File "click/core.py", line 829, in __call__
File "click/core.py", line 782, in main
File "click/core.py", line 1259, in invoke
File "click/core.py", line 1259, in invoke
File "click/core.py", line 1066, in invoke
File "click/core.py", line 610, in invoke
File "click/decorators.py", line 73, in new_func
File "click/core.py", line 610, in invoke
File "samcli/lib/telemetry/metric.py", line 176, in wrapped
File "samcli/lib/telemetry/metric.py", line 126, in wrapped
File "samcli/lib/utils/version_checker.py", line 41, in wrapped
File "samcli/cli/main.py", line 86, in wrapper
File "samcli/commands/local/invoke/cli.py", line 106, in cli
File "samcli/commands/local/invoke/cli.py", line 183, in do_cli
File "samcli/commands/local/lib/local_lambda.py", line 144, in invoke
File "samcli/lib/telemetry/metric.py", line 240, in wrapped_func
File "samcli/local/lambdafn/runtime.py", line 177, in invoke
File "samcli/local/lambdafn/runtime.py", line 88, in create
File "samcli/local/docker/lambda_container.py", line 91, in __init__
ValueError: Unsupported Lambda runtime nodejs18.x
[43955] Failed to execute script __main__
I did have node version 18 installed in the system prior to this. I thought that may be giving the issue so I uninstalled that version and installed version 14.
I don't have any idea why sam is running it on node version 18
I just recently looked into this as well since Node 18 is the current LTS. If you go to the Serverless Image Repository you'll see that AWS SAM doesn't currently have an image for Node 18. There's an explanation about this in this Github issue.

Could not open extension control file citext.control

Environment(s)
Ubuntu 20.04 & Debian 10 with Python 3.8 or 3.7, respectively.
Postgresql versions 11, 12, and 14 have been tried.
Psycopg2-binary 2.8.6
Overview
I'm attempting to install a Django project, and I'm getting this error:
psycopg2.errors.UndefinedFile: could not open extension control file "/usr/share/pgsql/extension/citext.control": No such file or directory
The psycopg devs informed me this is likely an issue with the postgresql-contrib libraries. Similarly, others have been able to fix this error by installing postgresql-contrib, however, this does not work for me. I've also tried installing postgresql-12.
I can see that citext.control is available in /usr/share/postgresql/12/extension/citext.control, so I tried ln -s /usr/share/postgresql/12 /usr/share/pgsql with no effect.
I also ran CREATE EXTENSION citext; in Postgres, also without effect.
Any support with this would be greatly appreciated, as I was hoping to have this project live already!
Thanks so much.
Trace
Running migrations:
Applying core.0043_install_ci_extension_pg...Traceback (most recent call last):
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedFile: could not open extension control file "/usr/share/pgsql/extension/citext.control": No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 16, in <module>
execute_from_command_line(sys.argv)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/user/janeway/src/utils/management/commands/install_janeway.py", line 58, in handle
call_command('migrate')
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/__init__.py", line 131, in call_command
return command.execute(*args, **defaults)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 202, in handle
post_migrate_state = executor.migrate(
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/contrib/postgres/operations.py", line 17, in database_forwards
schema_editor.execute("CREATE EXTENSION IF NOT EXISTS %s" % schema_editor.quote_name(self.name))
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 136, in execute
cursor.execute(sql, params)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/user/venvs/janeway/lib/python3.8/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.OperationalError: could not open extension control file "/usr/share/pgsql/extension/citext.control": No such file or directory
Have you tried installing python3-psycopg2 from the packaging system instead?
My Ubuntu 20 setup has this installed, and postgresql connections work with django.
ii python3-psycopg2 2.8.4-2 amd64 Python 3 module for PostgreSQL
I had installed postgresql-contrib on the local django server rather than the remote DB server. Installing on the same server as Postgresql resolved the issue.

Cant start docker `OSError: [Errno 8] Exec format error: '/usr/local/bin/docker-credential-ecr-login'`

I want to start my docker-compose and I always get this error.
Docker Desktop tells me I'm logged in. I also rebooted once and logged in again.
I don't quite understand why that's not possible. If I pull other Docker Containers in another project, everything works.
We dont use paython in our project.
$ docker --version
Docker version 19.03.8, build afacb8b
$ docker-compose --version
docker-compose version 1.25.4, build 8d51620a
$ python --version
Python 3.7.4
macOS Catalina 10.15.3
Here is the stacktrace
> docker-compose up
Pulling mongo (mongo:latest)...
Traceback (most recent call last):
File "site-packages/docker/credentials/store.py", line 80, in _execute
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 488, in run
File "subprocess.py", line 800, in __init__
File "subprocess.py", line 1551, in _execute_child
OSError: [Errno 8] Exec format error: '/usr/local/bin/docker-credential-ecr-login'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "site-packages/docker/auth.py", line 264, in _resolve_authconfig_credstore
File "site-packages/docker/credentials/store.py", line 35, in get
File "site-packages/docker/credentials/store.py", line 104, in _execute
docker.credentials.errors.StoreError: Unexpected OS error "Exec format error", errno=8
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose/cli/main.py", line 72, in main
File "compose/cli/main.py", line 128, in perform_command
File "compose/cli/main.py", line 1077, in up
File "compose/cli/main.py", line 1073, in up
File "compose/project.py", line 548, in up
File "compose/service.py", line 361, in ensure_image_exists
File "compose/service.py", line 1250, in pull
File "compose/progress_stream.py", line 102, in get_digest_from_pull
File "compose/service.py", line 1215, in _do_pull
File "site-packages/docker/api/image.py", line 396, in pull
File "site-packages/docker/auth.py", line 48, in get_config_header
File "site-packages/docker/auth.py", line 324, in resolve_authconfig
File "site-packages/docker/auth.py", line 235, in resolve_authconfig
File "site-packages/docker/auth.py", line 281, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Unexpected OS error "Exec format error", errno=8')
[52557] Failed to execute script docker-compose
resetting the docker in docker-hub/settings solved the problem.

Unable to Start Scheduler

I am new to Python and trying to install Airflow in my Mac, by following this tutorial
While these two commands work fine:
$ airflow initdb
$ airflow webserver -p 8080
The scheduler command (airflow scheduler) throws the following error:
[2020-02-18 13:18:09,012] {scheduler_job.py:1382} ERROR - Exception when executing execute_helper Traceback (most recent call last):
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1380, in _execute
self._execute_helper()
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1413, in _execute_helper
self.processor_agent.start()
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/dag_processing.py", line 554, in start
self._process.start()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'SchedulerJob._execute.<locals>.processor_factory'
[2020-02-18 13:18:09,035] {helpers.py:322} INFO - Sending Signals.SIGTERM to GPID None
Traceback (most recent call last): File "/Users/mac/Workspace/airflow/airflow_venv/bin/airflow", line 37, in <module>
args.func(args) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/cli.py", line 75, in wrapper
return f(*args, **kwargs) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/bin/cli.py", line 1040, in scheduler
job.run() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/base_job.py", line 221, in run
self._execute() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1384, in _execute
self.processor_agent.end() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/dag_processing.py", line 707, in end
reap_process_group(self._process.pid, log=self.log) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/helpers.py", line 324, in reap_process_group
signal_procs(sig) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/helpers.py", line 293, in signal_procs
os.killpg(pgid, sig)
TypeError: an integer is required (got type NoneType)
EDIT: Python 3.8 is supported now https://github.com/apache/airflow#requirements. So this answer might not be relevant now.
This due to the Python version you are using. Airflow doesn't support Python 3.8 yet https://github.com/apache/airflow#stable-version-1109.
Downgrade your Python to 3.7 and check.
Maybe there are some compatibility problems?
Using Python 3.6.10 and airflow v1.10.4, I can get airflow running. Maybe you could try some other versions?
This worked for me!
1- Make sure you are using the correct celery version that supports your other packages like RabbitMQ ( as V5 doesn't support AMQP in its usual format), my advice is to use V4.6.X
2-THIS HAS NOTHING TO DO WITH PYTHON VERSION IF YOU ARE USING AIRFLOW V2.0
3- simply make yourself happy with airflow db reset (command may differ if you are using airflow Version X<2.0 )
4- Avoid deleting any dag like you delete a file and use airflow dag ... commands to do so. (it makes up a mess in your environment that you wont like, trust me on this..)
Wish you luck bearing python stuff..

vagrant dcos install cassandra error

I followed the official vagrant-dcos instruction to install cassandra with minimal setup, by running command below, and got errors. Any idea?
dcos package install --options=examples/oinker/pkg-cassandra.json cassandra --yes
see error below:
Traceback (most recent call last):
File "cli/dcoscli/subcommand.py", line 101, in run_and_capture
File "cli/dcoscli/package/main.py", line 22, in main
File "cli/dcoscli/util.py", line 22, in wrapper
File "cli/dcoscli/package/main.py", line 36, in _main
File "dcos/cmds.py", line 43, in execute
File "cli/dcoscli/package/main.py", line 322, in _install
File "dcos/packagemanager.py", line 177, in get_package_version
File "dcos/packagemanager.py", line 359, in __init__
File "cli/env/lib/python3.5/site-packages/requests/models.py", line 866, in json
File "json/__init__.py", line 319, in loads
File "json/decoder.py", line 339, in decode
File "json/decoder.py", line 357, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Seems to be issue on cosmos. I restarted whole vagrant and it worked fine.

Resources