DataStax opscenterd won't start on Ubuntu 15.04 x64 - linux

Issue:
sudo service opscenterd start
Failed to start opscenterd.service: Unit opscenterd.service failed to load: No such file or directory.
(ERROR)-(Exit Code 6)-(Unknown error code)
sudo service opscenterd status
opscenterd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Config
[webserver]
port = 8888
interface = 0.0.0.0
I tried another port and ip (localhost)
Cassandra installed and running (dsc21, cassandra 2.1.10)
no log files been generated in /var/log/opscenter/
opscenter installed via apt-get (5.2)
Please help me to resolve this issue

I have the same issues as you, seems like OpsCenter could not run as service on Ubuntu 15, I went running it as background process and it works,
try:
$ sudo your_opscenter_install_path/bin/opscenter
hope helpping

Related

MongoDB Error: couldn't connect to server in linux

When I type 'mongo' in terminal to run the mongo server. it doesn't run. It shows me the eroor : couldn't connect to server. exception: connection failed.
Then I tried to restart mongodb server by
$ sudo systemctl start mongod
$ sudo systemctl status mongod
When I run the status command, I see it is showing
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor prese
Active: failed (Result: exit-code)
N.B - I am running linux mint 20.1. And I have read all the answer and tried. But nothing worked for me.
Oh, I followed this guide to install, uninstall and reinstalling MongoDB. But still it is not working for me.

Not able to run Cassandra locally using brew

I am trying to run Cassandra on my machine. Tying cqlsh gives me this error,
Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
Running cassandra -f hangs.
I installed cassandra using brew install cassandra.
Also I have done all of the followings:
Killed docker instance
Uninstall and reinstall Cassandra (deleted all the Cassandra data and filles from my machine)
Restarted my machine
Purged docker data
I don't know why still I am running into this. Running brew services list shows:
Name Status User Plist
cassandra started aanish /Users/aanish/Library/LaunchAgents/homebrew.mxcl.cassandra.plist
mysql stopped
mysql#5.7 started aanish /Users/aanish/Library/LaunchAgents/homebrew.mxcl.mysql#5.7.plist
postgresql stopped
The cqlsh connection error indicates that localhost is not listening on port 9042 (Cassandra's CQL client port). The most likely reason is that the Cassandra process is not running.
You can confirm whether the Java process is listening on port 9042 if you run the following command in a terminal:
$ sudo lsof -nPi -sTCP:LISTEN
You will need to review the system.log (typically in /var/log/cassandra) to figure out what is going on with Cassandra.
Note that if you set rpc_address in cassandra.yaml to the IP of your mac, you need to specify that address when you connect with cqlsh. For example:
$ cqlsh 10.1.2.3

Failed to stop mongodb.service while installing MongoDB on Ubuntu

While installing Mongodb I am facing error like
Failed to stop mongod.service: Unit mongod.service not loaded.
I tried to stop this service using-
~$ sudo systemctl stop mongodb
but it givs same error, I also check the status for mongodb using command
sudo systemctl status mongodb
this will result following response
● mongodb.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
I can install mongodb only after mongod.service get stoped, please guide how to stop service.
You need to create the mongod.service first. Then enable and stop
https://programmersought.com/article/28701054205/#:~:text=%2Flib%2Fsystemd%2Fsystem%2Fmongod.service
Execute this command in terminal
sudo systemctl enable mongod
After that check the status of service using
sudo service mongodb status
then you will be able to stop the service.

MongoDB service not working after upgrade to Ubuntu 15.04

I have recently upgraded my ubuntu from 14.10 to 15.04. All features seems to be working fine except MongoDB. I am using mongoDB with ruby on rails application using Mongoid gem. MongoDB is not controllable from service as we do normally in ubuntu.
sudo service mongodb start
or
sudo service mongod start
I get this error message
Failed to restart mongod.service: Unit mongod.service failed to load:
No such file or directory.
But i have to start it manually each time i have to connect my application to MongoDB server using
sudo mongod -f /etc/mongod.conf
So mongodb is connected as long as that terminal is opened. I am using MongoDB in Ruby on Rails application using Mongoid adapater/ORM.
When i run
sudo service mongodb status
i get following output
mongodb.service - An object/document-oriented database
Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since بدھ 2015-05-06 14:47:53 PKT; 5s ago
Docs: man:mongod(1)
Process: 28602 ExecStart=/usr/bin/mongod --config /etc/mongodb.conf (code=exited, status=4)
Main PID: 28602 (code=exited, status=4)
مٓی 06 14:47:53 NX00443 systemd[1]: Started An object/document-oriented database.
مٓی 06 14:47:53 NX00443 systemd[1]: Starting An object/document-oriented database...
مٓی 06 14:47:53 NX00443 systemd[1]: mongodb.service: main process exited, code=exited, status=4/NOPERMISSION
مٓی 06 14:47:53 NX00443 systemd[1]: Unit mongodb.service entered failed state.
مٓی 06 14:47:53 NX00443 systemd[1]: mongodb.service failed.
Any help in this regard will be appreciated.
It turns out that Mongo>2.6.3 has a known issue with start:
Support Systemd (cannot start mongodb with init scripts with Fedora 15 or above)
As noted here: in this link and it seems that this possibly won't be fully fixed for >2.6.3 until Ubuntu 16.04, unless there is a strong outcry.
So the solution is to issue:
sudo apt-get install --reinstall mongodb
This reverted back to mongo 2.6.3 and NOW ALL WORKS! For those that run across this...
You need to change the path configuration of the db:
for example in the file "/etc/mongod.conf" set "dbPath: /data/db"
You need to give the right to mongodb user to access this path:
sudo chown -R mongodb /data/db
The above solution works for me too:
> sudo apt-get install --reinstall mongodb
I've tried several methods that I found in this site and other sites, but only this one works for me! So, for now, back to Mongodb 2.6.3!
Update: problem fixed (2015/8/2 14:39):
I just found out that MongoDB 3.0.5 is released, so I purged version 2.6.3 and tried to install 3.0.5 on my Ubuntu 15.04. But the problem remains! However, after I reintalled it with the Debian wheezy package instead, finally the sudo service mongod start command works (it didn't work when I install 3.0.4 debian wheezy version). Now the new MongoDB 3.0.5 is running fine on my Ubuntu 15.04!
To install Debian wheezy version, please refer to the official installation guide on MongoDB:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
i saw /var/log/mongodb/mongodb.log and it need to move authentication 2.6 schema to 3.0.5 schema and i just removed journal and all DBs in /var/lib/mongodb/ then restart the service and it worked again.
2016-01-17T14:43:08.529+0200 I CONTROL [initandlisten] allocator: tcmalloc
2016-01-17T14:43:08.529+0200 I CONTROL [initandlisten] options: { command: [ "run" ], config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,10.0.0.170", http: { enabled: false }, port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongodb.pid" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", path: "/var/log/mongodb/mongodb.log", quiet: true } }
2016-01-17T14:43:08.834+0200 I STORAGE [initandlisten] Old 2.4 style user index identified. The authentication schema needs to be updated by running authSchemaUpgrade on a 2.6 server.
None of the above solution worked for me. There are few kernel level changes in ubuntu 15.04 and they are not going to resolve this issue in current release. Hopefully it will be fixed in next stable release of ubuntu.
It helped me on Ubuntu 16.04:
cd /var/lib
sudo rm -rf ./mongodb
sudo mkdir mongodb
sudo chown -R mongodb mongodb/
sudo service mongodb restart

MongoDB service not running in Fedora

Just installed a clean version of mongodb on Fedora 17 64-bit, but the Mongo service wont run.
I followed these instructions during installation
Running
service mongod start
results in
Starting mongod (via systemctl): Job failed. See system journal and 'systemctl status' for details. [FAILED]
So I ran
systemctl status mongod.service
which gives me
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
Loaded: loaded (/etc/rc.d/init.d/mongod)
Active: failed (Result: exit-code) since Mon, 18 Jun 2012 13:15:56 +0200; 58s ago
Process: 13584 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/mongod.service
Mongo logs in /var/log/mongo/mongod.log is empty
Thanks
How to install mongodb and mongodb-server on fedora linux (verified on f16 & f17). All commands are intended to be run in a su session.
1) make sure you have no mongodb installation lying around
# yum erase mongodb
# yum erase mongo-10gen (if it is installed)
2) install from fedora yum repository
# yum --disablerepo=* --enablerepo=fedora,updates install mongodb mongodb-server
3) start mongod (mongodb daemon)
# systemctl start mongod.service
4) verify mongod is running
# systemctl status mongod.service
# tail /var/log/mongodb/mongodb.log
# nmap -p27017 localhost
or running client
# mongo
MongoDB shell version: 2.0.2
connecting to: test
> db.test.save( { a: 1 } )
> db.test.find()
{ "_id" : ObjectId("4fdf28f09d16204d66082fa3"), "a" : 1 }
5) customize configuration
# vim /etc/mongodb.conf
# systemctl restart mongod.service
6) make mongodb service automatically start at boot
# systemctl enable mongod.service
Update for Fedora 18
When started for the first time by systemd on a slow or loaded machine, mongod service might timeout before finishing its initialization, with systemd flagging the service as failed.
Symptoms:
# journalctl -xn
-- Unit mongod.service has begun starting up.
10:38:43 local mongod[24558]: forked process: 24560
10:38:43 local mongod[24558]: all output going to: /var/log/mongodb/mongodb.log
10:40:13 local systemd[1]: mongod.service operation timed out. Terminating.
10:40:13 local systemd[1]: Failed to start High-performance, schema-free document-oriented database.
-- Subject: Unit mongod.service has failed
Very easy cure, restart the service:
# systemctl restart mongod.service
this should finish the initialization successfully and leave the daemon in running state.
I just had the same issue and in my case it was caused by installing mongodb following instructions of some websites using non-official repo. If you have the same issue and the answer above are not solving your problem, try uninstalling "mongodb-org" package and reinstalling it following the instructions of the official documentation : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
Remainder to uninstall package in fedora:
sudo dnf remove <package-name>

Resources