jueves, 22 de abril de 2010

MySQL: Lost connection to MySQL server at 'reading initial communication packet'

En FreeBSD /etc/hosts.allow
mysqld: ALL: allow 

En non-FreeBSD Unix /etc/hosts.allow
mysqld: ALL

Vigilar también que no esté en /etc/hosts.deny

http://www.bramschoenmakers.nl/en/node/595

miércoles, 21 de abril de 2010

SOLARIS - ps -aux equivalente de GNU/Linux

El equivalente del ps -aux de GNU/Linux en Solaris seria:

ps -elf

O tambien

/usr/ucb/ps -aux

lunes, 19 de abril de 2010

Oracle RAC O2CB Cluster Service

Oracle RAC O2CB Cluster Service

Before we can do anything with OCFS2 like formatting or mounting the file system, we need to first have OCFS2's cluster stack, O2CB, running (which it will be as a result of the configuration process performed above). The stack includes the following services:

  • NM: Node Manager that keep track of all the nodes in the cluster.conf
  • HB: Heart beat service that issues up/down notifications when nodes join or leave the cluster
  • TCP: Handles communication between the nodes
  • DLM: Distributed lock manager that keeps track of all locks, its owners and status
  • CONFIGFS: User space driven configuration file system mounted at /config
  • DLMFS: User space interface to the kernel space DLM

All of the above cluster services have been packaged in the o2cb system service (/etc/init.d/o2cb). Here is a short listing of some of the more useful commands and options for the o2cb system service.

  • /etc/init.d/o2cb status
    Module "configfs": Not loaded
    Filesystem "configfs": Not mounted
    Module "ocfs2_nodemanager": Not loaded
    Module "ocfs2_dlm": Not loaded
    Module "ocfs2_dlmfs": Not loaded
    Filesystem "ocfs2_dlmfs": Not mounted
    Note that with this example, all of the services are not loaded. I did an "unload" right before executing the "status" option. If you were to check the status of the o2cb service immediately after configuring OCFS using ocfs2console utility, they would all be loaded

  • /etc/init.d/o2cb load
    Loading module "configfs": OK
    Mounting configfs filesystem at /config: OK
    Loading module "ocfs2_nodemanager": OK
    Loading module "ocfs2_dlm": OK
    Loading module "ocfs2_dlmfs": OK
    Mounting ocfs2_dlmfs filesystem at /dlm: OK
    Loads all OCFS modules.

  • /etc/init.d/o2cb online ocfs2
    Starting cluster ocfs2: OK
    The above command will online the cluster we created, ocfs2.

  • /etc/init.d/o2cb offline ocfs2
    Unmounting ocfs2_dlmfs filesystem: OK
    Unloading module "ocfs2_dlmfs": OK
    Unmounting configfs filesystem: OK
    Unloading module "configfs": OK
    The above command will offline the cluster we created, ocfs2.

  • /etc/init.d/o2cb unload
    Cleaning heartbeat on ocfs2: OK
    Stopping cluster ocfs2: OK
http://www.debian-administration.org/articles/578

miércoles, 14 de abril de 2010

Cluster o2cb - ERROR: Wrong stack

/usr/lib/ocf/resource.d/ocfs/o2cb monitor
ERROR: Wrong stack

Ojo el o2cb
init script esta ejecutandose.
Parar y borrar del inicio

lunes, 12 de abril de 2010

Instalación Oracle10g en Ubuntu

Añadir el siguiente repositorio:deb http://oss.oracle.com/debian unstable main non-free
Añadir su clave GPG

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
apt-get updateapt-get install oracle-xe
/etc/init.d/oracle-xe configure


Añadirmos en el bashrc
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE

sqlplus sys as sysdba


GNU/Linux - Añadir nuevo fichero swap

Por ejemplo de 64 MB
dd if=/dev/zero of=/swapfile bs=1024 count=65536
mkswap /swapfile
swapon /swapfile

en /etc/fstab
/swapfile swap swap defaults 0 0
cat /proc/swaps


viernes, 9 de abril de 2010

NAGIOS - Documentación Extra con serviceextinfo y hostextinfo

Una de las posibilidades que tiene nagios para documentar cada host, servicio, etc es enlazar cada check con una documentación detallada de cada host/servicio, un howto solucionar esa incidencia, etc. Para ello hay que poner en la definición extendida del servicio donde el campo notes_url tendra el valor la URL donde queremos que enlace este servicio, por ejemplo una entrada de un plone o cualquier otro CMS.


define service{
        use                             generic-service
        host_name                       serveis_wiki
        service_description             wiki
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_http_url_"/webapps/wiki/check.action"!80!"OK"!web.dom.com
       }

define serviceextinfo{
        host_name               serveis_wiki
        service_description     wiki
        notes_url               http://mycms/docs/servicio1/
       }

jueves, 8 de abril de 2010

POSTFIX - Cola de correo muy llena

Una buena manera de acelerar el proceso es hacer un flush donde se entreguen primero los correos más pequeños.

postqueue -p | awk '{print $2}' | sort -n | xargs postsuper -r ; postsuper -f