Tuesday, December 10, 2013

xtrabackup_55: Error writing file 'UNOPENED' (Errcode: 32)

SmartOS and percona-cluster-5.5.31nb3

Error in /var/log/mysql/error.log

WSREP_SST: [INFO] Streaming the backup to joiner at 192.168.0.5 4444 (20131210 11:16:26.461)
WSREP_SST: [ERROR] innobackupex finished with error: 3.  Check /var/mysql//innobackup.backup.log (20131210 11:16:27.891)
WSREP_SST: [ERROR] Cleanup after exit with status:22 (20131210 11:16:27.912)
131210 11:16:27 [ERROR] WSREP: Failed to read from: wsrep_sst_xtrabackup --role 'donor' --address '
192.168.0.5:4444/xtrabackup_sst' --auth 'sst:secret' --socket '/tmp/mysql.sock' --datadir '/var/mysql/' --defaults-file '/opt/local/etc/my.cnf' --gtid '6ceed930-6185-11e3-ae0d-8e7504b63f54:2'
131210 11:16:27 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup --role 'donor' --address '
192.168.0.5:4444/xtrabackup_sst' --auth 'sst:secret' --socket '/tmp/mysql.sock' --datadir '/var/mysql/' --defaults-file '/opt/local/etc/my.cnf' --gtid '6ceed930-6185-11e3-ae0d-8e7504b63f54:2': 22 (Invalid argument)
131210 11:16:27 [Warning] WSREP: 0 (node1): State transfer to 1 (node2) failed: -1 (Not owner)

 

And in /var/mysql//innobackup.backup.log you see

xtrabackup_55: Error writing file 'UNOPENED' (Errcode: 32) 

I've removed

 [sst]
streamfmt = xbstream


from /opt/local/etc/my.cnf

Monday, October 14, 2013

Install Baikal server on a SmartOS zone

Baïkal is a Lightweight CalDAV+CardDAV server. The home page is http://baikal-server.com/

Baïkal needs some PHP modules. I use Apache as web server.

pkgin in apache-2.4.6 ap24-php53-5.3.27
pkgin in php53-pdo-5.3.27
pkgin in php53-xmlrpc-5.3.27
pkgin in php53-pdo_sqlite-5.3.27 php53-pdo_mysql-5.3.27
pkgin in php53-dom-5.3.27

Now you must configure php.ini, adding the modules.


vi /opt/local/etc/php.ini

extension=xmlrpc.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=mbstring.so
extension=dom.so


The rest is pretty simple, following the install guide.

Friday, August 9, 2013

MegaCLI on SmartOS

I'm working on a Dell R710 with PERC H700 controller.

# prtconf -v|grep -i raid
                        value='RAID controller'
                        value='MegaRAID SAS 2108 [Liberator]'


# prtconf -v|grep -i perc
                        value='PERC H700 Integrated'
...


Firts of all go to LSI website http://www.lsi.com/support/Pages/Download-Results.aspx and search by keyword "MegaCLI. Then download Latest MegaCLI (there is Solaris OS).

Unzip it and copy MegaCLI/MegaCli_Solaris/x86/MegaCli to your SmartOS global zone (under /opt/custom/bin for example).

Now edit it with vi (yes, with vi), search for mr_sas and change this word (the driver name) to dr_sas.

Without doing this the utility doesn't detect any controller.
i.e.

# ./MegaCli -adpCount                              

Controller Count: 0.

Exit Code: 0x00


Thanks to jacques, Nils and elijah on the smartos-discuss mailing list.

Wednesday, August 7, 2013

using send_nsca from SmartOS global zone

If you don't want to install pkgin in the global zone, but you want to use Nagios send_nsca command, this is how I did it.

Inside a zone install the nagios-nsca package.

pkgin in nagios-nsca-2.9.1nb2


From the global zone, cd to the zone zfs and copy these files in a place of your own.

cd /zones/<uuid>

cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1 /opt/custom/nsca/

cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1
/opt/custom/nsca/

cp opt/local/lib/libmcrypt.so.4
/opt/custom/nsca/


Create a configuration file

vi /opt/custom/nsca/send_nsca.cfg


Now set the LD_LIBRARY_PATH variable and run the command

export LD_LIBRARY_PATH=/opt/custom/nsca; echo "host;passive_check;0;All seems to be OK" | /opt/custom/nsca/send_nsca -H nagios.ip -p 5667 -d ";" -c /opt/custom/nsca/send_nsca.cfg

nsca and send_nsca version incompatibility

I have a Nagios NSCA server running on Debian squeeze. The installed nsca package is the 2.7.2

I want to send passive nagios checks from a SmartOS zone. But the pkgsrc version of nsca client package is 2.9.1

There are incompatibility issues between the 2.7 server 2.7 and a 2.9 client (example http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670373).

Dropping packet with invalid CRC32 - possibly due to client using wrong password or crypto algorithm?

To resolve the problem without upgrading Debian to a newer release, you can use backports.
Following the instructions I've added a new source to apt

vi /etc/apt/sources.list.d/backports.list

deb http://mi.mirror.garr.it/mirrors/debian-backports squeeze-backports main

apt-get update

And I've installed the newer version of NSCA server.

apt-get -t squeeze-backports install nsca

Now the latest version of send_nsca available on SmartOS works.

Quick testing shows that the 2.7.2 clients seems to work with the 2.9.1 server.