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

Cassandra install failing with permissions / missing file errors #1311

Closed
kikiya opened this issue Nov 2, 2016 · 2 comments
Closed

Cassandra install failing with permissions / missing file errors #1311

kikiya opened this issue Nov 2, 2016 · 2 comments

Comments

@kikiya
Copy link

kikiya commented Nov 2, 2016

A brief description

Cassandra install failing with permissions / missing file errors. Trying to install from 'sudo apt-get install cassandra' and there are a number of failures preventing it from starting and maybe even installing.

Expected results

Type "sudo apt-get install cassandra" then "nodetool status" to verify however. 'nodetool status' results in problems

Actual results (with terminal output if applicable) - Issue with installation

kikia$ sudo apt-get install Cassandra
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
cassandra-tools
The following NEW packages will be installed:
cassandra
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
Need to get 0 B/28.3 MB of archives.
After this operation, 37.9 MB of additional disk space will be used.
Selecting previously unselected package cassandra.
(Reading database ... 33516 files and directories currently installed.)
Preparing to unpack .../archives/cassandra_3.6_all.deb ...
Unpacking cassandra (3.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up cassandra (3.6) ...
sysctl: cannot open "/etc/sysctl.d/cassandra.conf": No such file or directory

Warning: unable to set vm.max_map_count; is this an OpenVZ
instance? If so, it is highly recommended that you set
vm.max_map_count to 1048575 in the host.

Deleting the local sysctl.d/cassandra.conf.
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.

  • further issue seen when checking status
    /kikia$ nodetool status nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.

Your Windows build number

14393.351

Not sure if there's some permission that should be updated before doing this install. This is the first install that has failed so far.

@therealkenc
Copy link
Collaborator

therealkenc commented Sep 23, 2020

The OP repro "sudo apt-get install cassandra" will fail out of the gate, because cassandra is not an Ubuntu package. Which was probably enough for this to be skipped at the time.

$ echo "deb https://downloads.apache.org/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
$ curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add 
$ sudo apt update && sudo apt upgrade
$ sudo apt install cassandra

That apt install takes on recent WSL1 (sic), where let's call recent 19041. The vm.max_map_count warning cited in the OP persists, but is nonfatal:

image

nodetool status nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused

That error is because cassandra was never started, or at least not in the OP repro:

image

/proc/sys/vm/max_map_count is #3126
/proc/sys/net/ipv4/tcp_keepalive_time is #1809
/var/run/utmp is #573.

@ayush-shinde
Copy link

The error you're encountering, "Permission denied," indicates that the current user does not have the necessary permissions to write to the /etc/apt/keyrings/ directory. To resolve this, you need to use sudo to run the command with elevated privileges.

sudo curl -o /etc/apt/keyrings/apache-cassandra.asc https://downloads.apache.org/cassandra/KEYS
This will prompt you to enter your password, allowing curl to save the file with the necessary permissions.

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

3 participants