Starting/Stop Couchbase Server on CentOS 6.6 failing - couchbase

I have couchbase version 2.2.0 installed on 6.7 and it worked fine.
But when i changed the centos version from 6.7 to 6.6, couchbase is not starting at all.
Is couchbase having problem with centos 6.6? Noticed some issues at https://issues.couchbase.com/browse/MB-12536 and https://issues.couchbase.com/browse/MB-12849
But could not get the solution with centos 6.6.
If anybody faced the issue, would be helpful if you could let me know how make couchbase 2.2.0 with centos 6.6
[root#localhost ~]# service couchbase-server start
Starting couchbase-server/usr/bin/dirname: extra operand `2>&1.pid'
Try `/usr/bin/dirname --help' for more information.
[ OK ]
[root#localhost ~]# service couchbase-server restart
Stopping couchbase-serverNOTE: shutdown failed
{badrpc,nodedown}
Starting couchbase-server/usr/bin/dirname: extra operand `2>&1.pid'
Try `/usr/bin/dirname --help' for more information. [ OK ]
Thank you.

I believe the following will solve your problem. Edit your couchbase-server file in /etc/init.d as follows. Change:
daemon --user couchbase "$DAEMON -- -noinput -detached > /opt/couchbase/var/lib/couchbase/logs/start.log 2>&1"
to:
daemon --user couchbase "$DAEMON" -- -noinput -detached > /opt/couchbase/var/lib/couchbase/logs/start.log 2>&1
I.e. don't surround the whole command with quotes just the DAEMON env var. Also change:
daemon "$DAEMON: -k"
to:
daemon "$DAEMON" -k
so it stops right too. That should do it. Let me know if not.

Related

Problems installing MySQL 5.7 properly on fresh CentOS 7 install

I admit that I am new to back-end work in general and I seem to be stuck (for several hours) following through with completing the setting up process for Magento 2.3
I was following https://devdocs.magento.com/guides/v2.3/install-gde/prereq/mysql.html for my commands but to no success.
I managed to get the following installed:
Cent OS 7 (x86_64)
Apache 2.4.6
PHP 7.2.14 (all the extensions installed passed the Setup Wizard readiness check)
I used these commands to install MySQL 5.7 Community Release: (from the documentation)
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql mysql-server
yum -y install mysql-community-server
To check if my installation went well, when I run:
mysql --version
I received an error message saying:
-bash: /usr/bin/mysql: No such file or directory
I know that there is something I definitely am missing out completely. When I try to start the MySQL service using the command:
systemctl start mysqld
I get the resulting error message:
Failed to start mysqld.service: Unit not found.
Any suggestions will much be appreciated. Thank you in advance.
Maybe it installed it as mariadb?
systemctl start mariadb
After removing MySQL 5.7 community release from my Cent OS, I decided to install MariaDB.
Inside the directory /etc/yum.repos.d/ I've created a file called MariaDB.repo and added this into the file:
# MariaDB 10.3 CentOS repository list - created 2019-01-25 05:36 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
I then performed the command in my terminal window:
sudo yum install MariaDB-server MariaDB-client
Because of this, mysql --version and systemctl start mysql works like a charm. Thanks #greenberet123 and #danblack for the suggestion.

Trouble Installing MySQL 8.0 on centos 6

I followed this tutorial to install MySQL 8.0 on my centos 6 Virtual server.
Tutorial
However when I get to the step where Im supposed to start the service (service mysqld start)
I get the following error:
Initializing MySQL database: [ OK ]
/usr/bin/mysqld_safe: line 199: 1632 Killed env MYSQLD_PARENT_ PID=1450 nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin -dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-fi le=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock < /dev/null > / dev/null 2>&1
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
I tried serveral times and always get an error, does anyone know how to fix this?
I ran into this problem, and after inspecting journalctl -xe, I saw that it was due to an out-of-memory error. I solved this by upgrading from a 512MB RAM to a 1GB RAM for my virtual machine

Zabbix Server crash. No connection to mysql, no log files and no system process

our Zabbix Server is running (service zabbix-server start: Job is already running: zabbix-server) and our MySQL Database is running, too.
But the dashboard of the Zabbix Server gives the following information:
"Zabbix Server is not running".
Furthermore there is no Zabbix-server process when I check the processes in the server machine with "ps aux | grep zabbix".
Moreover there a no log files.
Last day I edited the zabbix-server.conf and changed the "MaxHousekeeperDelete" from "500" to "200".
Note: This command isnĀ“t working when in the init.d folder: "./zabbix-server -c /etc/zabbix/zabbix_server.conf"
Can someone help?
King regards :-)
Zabbix Version: 3.2
SYSTEM: Ubuntu 14.04.5 LTS (GNU/Linux 3.19.0-69-generic x86_64)
Check if there is a .pid file for zabbix on the system and delete it.
Then try to start the server again.
This should be a comment but don't have enough rep to do so.
EDIT:
Can you ensure the nscd is running with ps aux| grep nscd? If not install it with sudo apt-get install nscd
EDIT2:
Also can you please ensure that you have set START=yes in /ets/default/zabbix-server

mysql.sock does not exist error in fresh install of MySQL on Arch Linux

I'm trying to use MySQL on Arch Linux. it is already installed but this error comes up when I try to connect:
connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")'
I've looked for /etc/my.cfg but the file does not exist.
Something must have gone wrong during the installation.
How can I "purge" MariaDB and reinstall it?
If you're using archlinux it is a vital idea to understand the package manager (pacman). For the question about /etc/my.cfg you can run
pacman -Ql mariadb
there you will see that the file is actually called:
/etc/mysql/my.cnf
Arch linux will not configure the package for you, that is part of the arch philosophy. It will provide example configurations, and even provide you with a systemd unit file
usr/lib/systemd/system/mysqld.service
but it is your responsibility to ensure that the configuration is correct and actually start the daemon.
systemctl enable mysqld # add the unit file to the boot sequence
systemctl start mysqld # runs ExecStart= in the unit file
systemctl stop mysqld # kills the daemon
systemctl disable mysqld # remove unit from boot sequence
reinstall
Since the word reinstall is in the title of the question and someone might find this question thanks to that: To reinstall mariadb you simply do
pacman -S mariadb
pacman will reinstall a package that is already installed, there is no need to remove the package (for completeness, package removal happens with pacman -R)
as of 7-28-17 I had to do this on a new install. Newbie here might save someone some time. It was a real pain.
OK HERE IS THE DEAL!!!!!
INSTALL APACHE _ NO PROB
INSTALL MYSQL _PROBLEM
pacman -S mysql then before starting service
MUST UNCOMMENT INNODB IN:
nano /etc/mysql/my.cnf
then must initialize datadirectory before starting service:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
You need to initialize the MariaDB data directory prior to starting
the service. This can be done with mysql_install_db command, e.g.:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Optional dependencies for mariadb
galera: for MariaDB cluster with Galera WSREP
perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and
mysql_setpermission
CNF file is /etc/mysql/my.cnf in Arch Linux.
One simple way I can reproduce your issue is when MariaDB is shut down. Sorry if it sounds dumb but as you did not mention it: is MariaDB started? sudo systemctl start mysqld.service
You should have a look at MariaDB logs to get some clue: journalctl _SYSTEMD_UNIT=mysqld.service (maybe paste some part if you still don't get what is going on).
This happens the first time you install MySQL and MariaDB. As grochmal pointed out, you have to set up configurations before first use. But, the user teckk sent these three links in the archlinux newbie corner:
https://wiki.archlinux.org/index.php/MariaDB
https://wiki.archlinux.org/index.php/MariaDB#Reset_the_root_password
https://bbs.archlinux.org/viewtopic.php?id=51981
In short, you have to run the command below before starting the service:
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Optionally (recommended) you should improve the initial security by calling:
sudo mysql_secure_installation
Now you can start the service:
sudo systemctl start mariadb
Optionally, you could install and use a graphical front-end tool.
Carry on with setting up the configurations as described in the archwiki post on MariaDB Configuration.

fresh installed mysql and mysql-server but failed to start server

I am new to Linux and tried to install mysql in my local box
I googled a lot and follow the instruction but none of them works
some people recommand this" but it did not work for me and system give me warning about this is not a official version.
Basically what I did was:
yum install mysql mysql-version
succeed without error, version is 5.5.28
systemctl start mysqld.service
here it threw out error:
Job failed. See system logs and 'systemctl status' for details.
I am using Fedora 16 (3.1.0-7.fc16.i686)
Thank you in advance
Could you try running
yum groupinstall "MySQL Database"
then run
service mysqld start
and see the outcome. Assuming you are running as root or with root permissions.
Got the EXACT same problem. It seems there is an issue regarding the permissions of the /var/lib/mysql directory.
This nailed it for me:
chown -R mysql.mysql /var/lib/mysql
Source: http://www.vivaolinux.com.br/dica/Como-solucionar-ERROR-2002-Cant-connect-to-local-MySQL-server