Caídas de algunas aplicaciones puede significar considerables pérdidas, por ejemplo:
Para estas y muchas otras compañías un downtime puede ser crucial y algo que simplemente no pueden permitir, alta disponibilidad es la solución central y crítica para su éxito. Sin HA y HP se comprometen la satisfacción del cliente y las ganancias.
Hablando de Performance existen algunas soluciones conocidas:
mysql> describe book; mysql> show index from book; +-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | book | 0 | PRIMARY | 1 | call_cutter | A | 216144 | NULL | NULL | | BTREE | | | book | 0 | PRIMARY | 2 | call_number | A | 216144 | NULL | NULL | | BTREE | | | book | 0 | PRIMARY | 3 | call_letter | A | 216144 | NULL | NULL | | BTREE | | | book | 1 | book_idx_1 | 1 | year | A | 17 | NULL | NULL | YES | BTREE | | | book | 1 | book_idx_2 | 1 | title | A | 216144 | NULL | NULL | YES | BTREE | | | book | 1 | book_idx_3 | 1 | publisher | A | 108072 | NULL | NULL | YES | BTREE | | | book | 1 | book_idx_4 | 1 | place | A | 13509 | NULL | NULL | YES | BTREE | | +-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ 7 rows in set (3.16 sec) mysql> explain select * from book where call_letter='QA' and call_number between 75.9999 and 76.0001; +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | book | ALL | NULL | NULL | NULL | NULL | 216144 | Using where | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ 1 row in set (0.00 sec) mysql> explain select * from book where call_letter='QA' and call_number between 75.9999 and 76.0001 and call_cutter='/abc'; +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ | 1 | SIMPLE | book | range | PRIMARY | PRIMARY | 64 | NULL | 1 | Using where | +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ 1 row in set (0.04 sec) |
global buffers + (session buffers* maxconnections) = RAM Mem
Donde se puede observar que el total de la memoria empleada por el manejador de base de datos está repartido entre una sección global y otra dedicada cada conexión de los usuarios.
session buffers
|
global buffers
|
# The following options will be passed to all MySQL clients # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /tmp/mysql.sock skip-locking #set-variable = key_buffer=64M #set-variable = max_allowed_packet=300M #set-variable = table_cache=500 #set-variable = sort_buffer=32M set-variable = net_buffer_length=64M #set-variable = myisam_sort_buffer_size=16M set-variable = max_connections=500 #set-variable = interactive_timeout=604800 set-variable = wait_timeout=604800 #set-variable = thread_stack=64M set-variable = tmp_table_size=32M set-variable = back_log=100 #set-variable = binlog_cache_size=64M set-variable = connect_timeout= 45 set-variable = join_buffer_size=2M #set-variable = key_buffer_size=64M set-variable = long_query_time=604800 set-variable = max_binlog_cache_size=1000M set-variable = max_binlog_size=1000M set-variable = net_read_timeout=300 set-variable = net_write_timeout=300 set-variable = net_retry_count=50 #set-variable = preload_buffer_size=16M #set-variable = query_cache_size=128M #set-variable = sort_buffer_size=64M #set-variable = thread_cache_size=100 set-variable = key_buffer=64M set-variable = max_allowed_packet=300M set-variable = table_cache=512 set-variable = sort_buffer_size=2M set-variable = read_buffer_size=2M set-variable = read_rnd_buffer_size=8M set-variable = myisam_sort_buffer_size=64M set-variable = thread_cache=8 set-variable = query_cache_size=32M # Try number of CPU's*2 for thread_concurrency set-variable = thread_concurrency=8 #log-bin server-id = 1 # Point the following paths to different dedicated disks tmpdir = /var/tmp/ #log-update = /centia01/final/database/mysql/var/log-catarina # Uncomment the following if you are using BDB tables set-variable = bdb_cache_size=4M set-variable = bdb_max_lock=10000 # Uncomment the following if you are using Innobase tables innodb_file_per_table innodb_data_file_path = ibdata1:1G:autoextend innodb_data_home_dir = /mysql/data/innodb innodb_log_group_home_dir = /mysql/data/innodb innodb_log_arch_dir = /mysql/data/innodb set-variable = innodb_mirrored_log_groups=1 set-variable = innodb_log_files_in_group=5 set-variable = innodb_log_file_size=400M set-variable = innodb_log_buffer_size=256M innodb_flush_log_at_trx_commit=1 innodb_log_archive=0 set-variable = innodb_buffer_pool_size=2000M set-variable = innodb_additional_mem_pool_size=256M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 #set-variable = innodb_force_recovery=3 [mysqldump] quick set-variable = max_allowed_packet=300M [mysql] prompt=(\u) [\d]>\_ no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] set-variable = key_buffer=20M set-variable = sort_buffer=20M set-variable = read_buffer=2M set-variable = write_buffer=2M [myisamchk] set-variable = key_buffer=20M set-variable = sort_buffer=20M set-variable = read_buffer=2M set-variable = write_buffer=2M [mysqlhotcopy] interactive-timeout |
Configuración my.cnf
Se puede definir como el proceso de poner la misma información en varios lugares.
Una normalización reduce problemas de integridad y optimiza las actualizaciones, quizás con el costo del tiempo de recuperación. Cuando se pretende evitar esta demora resultado de la combinación de muchas tablas entonces se puede utilizar la denormalización.
Antes de denormalizar es importante considerar:
Candidatos a denormalización:
Importante: nunca se realiza un denormalización en un modelo lógico.
Cuando 2 tablas se mezclan (join) frecuentemente, considerar tener una tabla premezclada (prejoined) la cual debera:
Ventaja: consultas rápidas y eficientes
Desventaja: la tabla puede quedar inconsistente rapidamente, se recomienda para datos más estáticos que dinámicos.
Mantener reportes en línea puede ser muy costoso, es mejor considerar tener una tabla que incluya los datos de dicho reporte.
Dicha tabla deberá contener:
En ocasiones algún departamento de la organización necesita consultar mientras otro hace modificaciones, se pueden usar dos tablas para balancear la carga y obtener buen tiempo de acceso y modificación.
Se debe tener un esquema de duplicación que permita actualizar el espejo de manera eficiente, esto puede hacerse:
Si la cantidad de información es considerable se puede pensar en partir una tabla ya sea vertical u horizontalmente
También se puede considerar el separar columnas:
create table item (itemnum integer not null,itemsize char(1), itemcolor
char(10), |
se dividiría en:
create table item |
create table item_desc o bien create table item_desc(itemnum integer not null,itemctr
integer not null, |
Dada una relacion 1-1, combinar las 2 tablas en una sola
Se complica si hay otras relaciones involucradas, otra relación 1-m implicaría demasiada redundancia y un aumento considerable del tiempo para actualizaciones.
Cuando alguna columna de una tabla (A) es solicitada frecuentemente en una consulta de alguna otra tabla (B) entonces vale la pena agregar dicha columna de (A) en (B).
Dichas columnas serán redundantes y deberán cumplir con:
Muchas veces la repetición de tuplas puede transformase en varias columnas de la misma tupla
create table cust_balance ( custnum integer not null, balanceperiod integer not null, balance float) |
create table cust_balance ( custnum integer not null, period1_balance float, period2_balance float, period3_balance float, period4_balance float, period5_balance float, period6_balance float) |
Criterio:
Similar al de reportes para minimizar muchas fórmulas, se usa cuando:
create table dept ( parentdeptnum integer not null, deptname char(25), supervisornum integer, reportstodeptnum integer) |
create table dept ( deptnum integer not null, childdeptnum integer not null, level integer, detail char(1), deptname char(25), supervisornum integer) |
Dos columnas adicionales se incorporaron:
level, contiene un valor numérico indicando el nivel dentro de la jerarquía del childdeptnum; si el hijo reside 2 niveles abajo en la jerarquía del padre entonces el level será 2.
detail, contiene una "Y" si el childdeptnum esta hasta abajo de la jerarquía, "N" de otra manera.
Partir una tabla de manera que su tamaño se aproxime al de la página que maneja el dbms.
Respecto a disponibilidad existen también diferentes soluciones
[HOWTO] MySQL Replication About: It took me days to figure out how to replicate database in MySQL, and the official docs are somewhat sparse. Hopefully this will help -- it's geared towards any general MySQL installation. Edit: This guide only works with MyISAM table types (the default for MySQL). The Master Server MySQL replicates the data between the two databases by using binary logs stored on the master server. The first step is to setup the server so it creates them. Create a directory to store the binary logs This creates the directories and sets the permissions so only the mysql daemon can read/write to the logs.
Edit the MySQL Configuration This turns on the binary logging, tells it where to store the logs, and creates a server id.
Add under the [mysqld] section. It doesn't matter what the value for server-id is, as long as it is different from the slave's (which you will set later). Also make sure that "bind ip_address" and "skip-networking" are commented out, so that the slave user can log in remotely.
Once you're done, restart the mysql server for the changes to take effect, and for the logging to start.
If you were already using binary logging before this, you don't need to make any changes, except for adding a server-id. The slave can keep up with your current binary logs, so there's no reason to delete them or flush the logs. Setup a slave account This both creates a new account in mysql.user, and grants replication privileges only .
Adding "@'%'" means that "slave_user_name" can connect from any host. Change yours to whatever host name options you want to use. AFAIK, you don't need to run FLUSH PRIVILEGES; in mysql for it to recognize the new account. Get a database dump There are two ways to get the data from the master to the slave -- this howto only covers one: exporting the actual data to a file, and then restoring it on the slave. The other option is LOAD DATA FROM MASTER; which does pretty much the same thing. Note that you will need to have two shells open at this point -- one mysql shell and one terminal shell. The mysql shell must stay open while you do the database dump to get a clean export. Switch to the database you want to replicate. FLUSH TABLES only locks the database you're currently using.
Once again, do NOT close your mysql session until you do a mysqldump in another shell (screen comes in handy). If you do, the tables will be unlocked.
Once you get the MASTER STATUS results, WRITE THEM DOWN because you'll need them in a minute. Should look something like this:
Get the db dump:
and unlock the tables
You're done now with the master server. The Slave Server Import the mysqldump from the master server:
Edit the slave's MySQL configuration to setup replication:
Add under the [mysqld] section. It doesn't matter what the value for server-id is, as long as it is different from the master's.
Restart MySQL -- don't worry, it won't start slaving yet.
Tell the slave specifically where to start logging: This is where you use the data from SHOW MASTER STATUS; from the master mysql database.
Note that you don't put quotes around the value for MASTER_LOG_POS or mysql will give you an error. Now start slaving!
And that's it! |
Qué es Clustering ?
Un cluster puede hacerse de distintas maneras y con distintos propósitos.
The following are various cluster types found in use today. If you use or intend to use one of these cluster types, you may want to consider SSI clustering as an alternative or addition.
High performance (HP) clusters, typified by Beowulf clusters , are constructed to run parallel programs (weather simulations, data mining, etc.).
Load-leveling clusters, typified by Mosix , are constructed to allow a user on one node to spread his workload transparently across all nodes in the cluster. This can be very useful for compute intensive, long running jobs that aren't massively parallel.
Web-service clusters, typified by the Linux Virtual Server (LVS) project and Piranha , do a different kind of load leveling. Incoming web service requests are load-leveled by a front end system across a set of standard servers.
Storage clusters, typified by Sistina's GFS and the OpenGFS project , consist of nodes which supply parallel, coherent, and highly available access to filesystem data.
Database clusters, typified by Oracle 9I RAC (formerly Oracle Parallel Server), consist of nodes which supply parallel, coherent, and HA access to a database.
High Availability clusters, typified by Lifekeeper , FailSafe and Heartbeat , are also often known as failover clusters. Resources, most importantly applications and nodes, are monitored. When a failure is detected, scripts are used to fail over IP addresses, disks, and filesystems, as well as restarting applications.
Caso MySQL
Un NDB Cluster database consiste de una colección de nodos de 3 tipos:
1. Uno o más management servers (MGM nodes)
2. Uno o más database/storage nodes (DB nodes)
3. Uno o más applications (API nodes)
Un nodo es un programa ejecutándose en alguna computadora
Los nodos pueden correr en diferentes computadoras (o en la misma) y se comunican a través de módulos de software llamados "transporters".
Funcionamiento
Node y System Recovery
Ejemplos de configuraciones:
Failed Nodes | Computers Recovery Procedure |
{D2} | System Restart |
Failed Nodes | Computers Recovery Procedure |
{D2}, {D3} | Node Recovery |
{D2, D3} | System Restart |
{C1}, {C2} | Node Recovery (after computer is replaced/restarted) |
{C3}, {C4}, {C3, C4} | Restart Applications and Management Server |
Failed Nodes | Computers Recovery Procedure |
{D2}, {D3}, {D2, D4}, {D2, D5}, {D3, D4}, {D3,D5} | Node Recovery |
{D2, D3}, {D4, D5}+ all three node failures | System Restart |
{C1}, {C2} | Node Recovery (after computer is replaced/restarted) |
{C3}, {C4}, {C3, C4} | Restart Applications and Management Server |
Failed Nodes | Computers Recovery Procedure |
{D2}, {D3}, ..., {D9} | Node Recovery |
{D2,D3}, {D4,D5}, {D6,D7}, {D8,D9} | System Restart |
{D2,D4}, {D2,D5}, {D2,D6}, {D2,D7}, {D2,D8}, {D2,D9} | Node Recovery |
{D3,D4}, {D3,D5}, {D3,D6}, {D3,D7}, {D3,D8}, {D3,D9} | Node Recovery |
{D4,D6}, {D4,D7}, {D4,D8}, {D4,D9} | Node Recovery |
{D5,D6}, {D5,D7}, {D4,D8}, {D4,D9} | Node Recovery |
{D6,D8}, {D6,D9} | Node Recovery |
{D7,D8}, {D7,D9} | Node Recovery |
{C1}, {C2} | Node Recovery if Arbitrator survived |
{C1}, {C2} | System Restart if Arbitrator did not survive |
{C3}, {C4}, {C3, C4} | Restart Applications and Management Server |
Implementación
Partimos de una configuración básica cona las siguientes máquinas
Función |
Host |
Port |
Manager | agua | 9000 |
Transport | agua | 9099 |
Monitor (Manager client) | agua | - |
Storage y API | scanner | 9001 |
Storage y API | ict | 9002 |
API | santa | 9003 |
Balancer | ict | 9999 |
Manager | Storage1 | Storage2 | API | Balancer | |||||||
agua | scanner | ict | santa | ict | |||||||
Bajar el binario de la plataforma, mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz /carlos>gunzip mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz .... /carlos>mv mysql-max-4.1.9-sun-solaris2.8-sparc mysql_manager /carlos>cd mysql_manager editar el archivo nuevo config.ini /mysql_manager>vi config.ini
iniciamos el manager /mysql_manager>bin/ndb_mgmd -f config.ini listo el manager ya esta corriendo /mysql_manager>bin/ndb_mgm --connect-string=agua.udlap.mx:9000 ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s) ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s) ndb_mgm>
ndb_mgm> 3 stop ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s) ndb_mgm>
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> show [ndb_mgmd(MGM)] 1 node(s) [mysqld(API)] 3 node(s)
ndb_mgm> shutdown |
Bajar el binario de la plataforma, mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz /carlos>gunzip mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz .... /carlos>mv mysql-max-4.1.9-sun-solaris2.8-sparc mysql_1
/carlos>cd mysql_1 /mysql_1>cp support-files/my-medium.cnf data/my.cnf editamos el archivo de configuracion /mysql_1>vi data/my.cnf
/mysql_1>scripts/mysql_install_db /mysql_1>cp support-files/mysql.server . /mysql_1>vi mysql.server
/mysql_1>chmod 755 mysql.server /mysql_1>mkdir cluster /mysql_1>bin/ndbd --connect-string=agua.udlap.mx:9000 --initial /mysql_1>./mysql.server start
/mysql_1>bin/mysql -u root --protocol=tcp -P
9001 -p mysql Welcome to the MySQL monitor. Commands end with ; or \g. Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; mysql> create database ejemplo; mysql> use ejemplo; insert into usuarios values (555); mysql> select * from usuarios; mysql>
mysql> select * from usuarios;
mysql> select * from usuarios; mysql>
mysql> delete from user where host='scanner'; mysql> delete from user where user=''; mysql> insert into user (host,user,password) values
('%','lolo',password('lolopass')); mysql> insert into db values mysql> flush privileges;
mysql> show processlist;
mysql> quit
|
Bajar el binario de la plataforma, mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz /carlos>gunzip mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz .... /carlos>mv mysql-max-4.1.9-sun-solaris2.8-sparc mysql_2
/carlos>cd mysql_2 /mysql_2>cp support-files/my-medium.cnf data/my.cnf editamos el archivo de configuracion /mysql_2>vi data/my.cnf
/mysql_2>scripts/mysql_install_db /mysql_2>cp support-files/mysql.server . /mysql_2>vi mysql.server
/mysql_2>chmod 755 mysql.server /mysql_2>mkdir cluster
/mysql_2>bin/ndbd --connect-string=agua.udlap.mx:9000 --initial /mysql_2>./mysql.server start
/mysql_2>bin/mysql -u root --protocol=tcp -P
9002 -p mysql Welcome to the MySQL monitor. Commands end with ; or \g. Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; mysql> create database ejemplo; mysql> use ejemplo; Database changed mysql> select * from usuarios; mysql>
mysql>set autocommit=0; mysql> insert into usuarios values(455); mysql> select * from usuarios;
mysql> commit; mysql>
mysql> quit /mysql_2>bin/ndbd --connect-string=agua.udlap.mx:9000
/mysql_2>bin/mysql
-u root --protocol=tcp -P 9002 -p mysql Welcome to the MySQL monitor. Commands end with ; or \g. Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> delete from user where host='ict'; mysql> delete from user where user=''; mysql> insert into user (host,user,password) values
('%','lolo',password('lolopass')); mysql> insert into db values mysql> flush privileges;
mysql> show processlist;
mysql> show processlist;
mysql> quit
|
Bajar el binario de la plataforma, mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz /carlos>gunzip mysql-max-4.1.9-sun-solaris2.8-sparc.tar.gz .... /carlos>mv mysql-max-4.1.9-sun-solaris2.8-sparc mysql_api
/carlos>cd mysql_api /mysql_api>cp support-files/my-medium.cnf data/my.cnf editamos el archivo de configuracion /mysql_api>vi data/my.cnf
/mysql_api>scripts/mysql_install_db /mysql_api>cp support-files/mysql.server . /mysql_api>vi mysql.server
/mysql_api>chmod 755 mysql.server
/mysql_api>./mysql.server start
/mysql_api>bin/mysql -u root --protocol=tcp -P
9003 -p mysql Welcome to the MySQL monitor. Commands end with ; or \g. Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; mysql> create database ejemplo; mysql> use ejemplo; Database changed mysql> select * from usuarios; mysql>
mysql> select * from usuarios; mysql>
mysql> delete from user where host='santa'; mysql> delete from user where user=''; mysql> insert into user (host,user,password) values
('%','lolo',password('lolopass')); mysql> insert into db values mysql> flush privileges;
mysql> show processlist; mysql>
mysql> quit
|
Descargamos algun software de balanceo como: En el caso de solaris recomiendo el primero. /carlos>tar -xvf pen-0.15.0.tar /carlos> cd pen-0.15.0 /pen-0.15.0> ./configure /pen-0.15.0> make Si ocurre algun problema de compilacion se puede corregir usando las variables de ambiente de mi cuenta >csh (Si se esta en un shell diferente) /pen-0.15.0> ./pen -r 9999 santa:9003 scanner:9001 ict:9002 o /pen-0.15.0> pen -dfr 9999 santa:9003 scanner:9001 ict:9002 (si se desea hacer el debug)
/mysql_x>bin/mysql -u lolo --protocol=tcp -h ict -P
9999 -p ejemplo Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show tables;
mysql> select * from usuarios;
mysql> quit
Welcome to the MySQL monitor. Commands end with ; or \g. Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show tables; mysql> select * from usuarios2;
mysql> select * from usuarios; +------+ mysql>
mysql> quit
/mysql_x>pkill pen |
|
Bitácora de funcionamiento normal (balanceo de cargas)
Thu Feb 10 11:52:05 2005] [jk_connect.c (136)]: Into jk_open_socket [Thu Feb 10 11:52:05 2005] [jk_connect.c (143)]: jk_open_socket, try to connect socket = 12 to 127.0.0.1:8009 [Thu Feb 10 11:52:05 2005] [jk_connect.c (159)]: jk_open_socket, after connect ret = 0 [Thu Feb 10 11:52:05 2005] [jk_connect.c (168)]: jk_open_socket, set TCP_NODELAY to on [Thu Feb 10 11:52:05 2005] [jk_connect.c (185)]: jk_open_socket, return, sd = 12 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (701)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 12 to 127.0.0.1:8009 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (737)]: sending to ajp13 #391 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (1035)]: ajp_send_request 2: request body to send 0 - request body to resend 0 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (851)]: received from ajp13 #77 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (477)]: ajp_unmarshal_response: status = 302 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (483)]: ajp_unmarshal_response: Number of headers is = 1 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[0] [Location] = [http://localhost:8888/jsp-examples/] [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (851)]: received from ajp13 #2 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (1716)]: Into jk_endpoint_t::done, recycling connection [Thu Feb 10 11:52:05 2005] [jk_lb_worker.c (374)]: Into jk_endpoint_t::done [Thu Feb 10 11:52:05 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Thu Feb 10 11:52:05 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/jsp-examples/' [Thu Feb 10 11:52:05 2005] [jk_uri_worker_map.c (483)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match lbajp13worker -> /jsp-examples/ [Thu Feb 10 11:52:05 2005] [mod_jk.c (1689)]: Into handler r->proxyreq=0 r->handler=jakarta-servlet r->notes=135831864 worker=lbajp13worker [Thu Feb 10 11:52:05 2005] [jk_worker.c (90)]: Into wc_get_worker_for_name lbajp13worker [Thu Feb 10 11:52:05 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done found a worker [Thu Feb 10 11:52:05 2005] [mod_jk.c (472)]: agsp=8888 agsn=localhost hostn=localhost shostn=localhost cbsport=0 sport=0 [Thu Feb 10 11:52:05 2005] [jk_lb_worker.c (513)]: Into jk_worker_t::get_endpoint [Thu Feb 10 11:52:05 2005] [jk_lb_worker.c (283)]: Into jk_endpoint_t::service [Thu Feb 10 11:52:05 2005] [jk_lb_worker.c (299)]: Into jk_endpoint_t::service sticky_session=1 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (1741)]: Into jk_worker_t::get_endpoint [Thu Feb 10 11:52:05 2005] [jk_lb_worker.c (313)]: Into jk_endpoint_t::service worker=worker2 jvm_route=worker2 rc=1 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (1367)]: Into jk_endpoint_t::service [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (257)]: Into ajp_marshal_into_msgb [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (425)]: ajp_marshal_into_msgb - Done [Thu Feb 10 11:52:05 2005] [jk_connect.c (136)]: Into jk_open_socket [Thu Feb 10 11:52:05 2005] [jk_connect.c (143)]: jk_open_socket, try to connect socket = 13 to 127.0.0.1:8010 [Thu Feb 10 11:52:05 2005] [jk_connect.c (159)]: jk_open_socket, after connect ret = 0 [Thu Feb 10 11:52:05 2005] [jk_connect.c (168)]: jk_open_socket, set TCP_NODELAY to on [Thu Feb 10 11:52:05 2005] [jk_connect.c (185)]: jk_open_socket, return, sd = 13 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (701)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 13 to 127.0.0.1:8010 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (737)]: sending to ajp13 #392 [Thu Feb 10 11:52:05 2005] [jk_ajp_common.c (1035)]: ajp_send_request 2: request body to send 0 - request body to resend 0 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (851)]: received from ajp13 #143 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (477)]: ajp_unmarshal_response: status = 200 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (483)]: ajp_unmarshal_response: Number of headers is = 4 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[0] [ETag] = [W/"16576-1106167226000"] [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[1] [Last-Modified] = [Wed, 19 Jan 2005 20:40:26 GMT] [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[2] [Content-Type] = [text/html] [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[3] [Content-Length] = [16576] [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (851)]: received from ajp13 #8188 [Thu Feb 10 11:52:06 2005] [mod_jk.c (372)]: writing 4096 (4096) out of 8184 [Thu Feb 10 11:52:06 2005] [mod_jk.c (372)]: writing 4088 (4088) out of 4088 [Thu Feb 10 11:52:06 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Thu Feb 10 11:52:06 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/jsp-examples/images/execute.gif' [Thu Feb 10 11:52:06 2005] [jk_uri_worker_map.c (483)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match lbajp13worker -> /jsp-examples/ [Thu Feb 10 11:52:06 2005] [mod_jk.c (1689)]: Into handler r->proxyreq=0 r->handler=jakarta-servlet r->notes=135831864 worker=lbajp13worker [Thu Feb 10 11:52:06 2005] [jk_worker.c (90)]: Into wc_get_worker_for_name lbajp13worker [Thu Feb 10 11:52:06 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done found a worker [Thu Feb 10 11:52:06 2005] [mod_jk.c (472)]: agsp=8888 agsn=localhost hostn=localhost shostn=localhost cbsport=0 sport=0 [Thu Feb 10 11:52:06 2005] [jk_lb_worker.c (513)]: Into jk_worker_t::get_endpoint [Thu Feb 10 11:52:06 2005] [jk_lb_worker.c (283)]: Into jk_endpoint_t::service [Thu Feb 10 11:52:06 2005] [jk_lb_worker.c (299)]: Into jk_endpoint_t::service sticky_session=1 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (1741)]: Into jk_worker_t::get_endpoint [Thu Feb 10 11:52:06 2005] [jk_lb_worker.c (313)]: Into jk_endpoint_t::service worker=worker1 jvm_route=worker1 rc=1 [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (1367)]: Into jk_endpoint_t::service [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (257)]: Into ajp_marshal_into_msgb [Thu Feb 10 11:52:06 2005] [jk_ajp_common.c (425)]: ajp_marshal_into_msgb - Done |
Bitácora de funcionamiento con un nodo caído y recuperación de conexión
[Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1468)]: sending request to tomcat failed in send loop. err=1 [Thu Feb 10 12:44:12 2005] [jk_connect.c (136)]: Into jk_open_socket [Thu Feb 10 12:44:12 2005] [jk_connect.c (143)]: jk_open_socket, try to connect socket = 12 to 140.148.3.56:8009 [Thu Feb 10 12:44:12 2005] [jk_connect.c (159)]: jk_open_socket, after connect ret = -1 [Thu Feb 10 12:44:12 2005] [jk_connect.c (188)]: jk_open_socket, connect() failed errno = 111 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (720)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (140.148.3.56:8009). Failed errno = 111 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1024)]: Error connecting to the Tomcat process. [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1468)]: sending request to tomcat failed in send loop. err=2 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1477)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=worker1 failed errno = 111 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1724)]: Into jk_endpoint_t::done, closing connection 0 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (567)]: In jk_endpoint_t::ajp_close_endpoint [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (353)]: lb: recoverable error... will try to recover on other host [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1741)]: Into jk_worker_t::get_endpoint [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (313)]: Into jk_endpoint_t::service worker=worker2 jvm_route=worker2 rc=1 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1367)]: Into jk_endpoint_t::service [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (257)]: Into ajp_marshal_into_msgb [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (425)]: ajp_marshal_into_msgb - Done [Thu Feb 10 12:44:12 2005] [jk_connect.c (136)]: Into jk_open_socket [Thu Feb 10 12:44:12 2005] [jk_connect.c (143)]: jk_open_socket, try to connect socket = 12 to 127.0.0.1:8010 [Thu Feb 10 12:44:12 2005] [jk_connect.c (159)]: jk_open_socket, after connect ret = 0 [Thu Feb 10 12:44:12 2005] [jk_connect.c (168)]: jk_open_socket, set TCP_NODELAY to on [Thu Feb 10 12:44:12 2005] [jk_connect.c (185)]: jk_open_socket, return, sd = 12 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (701)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 12 to 127.0.0.1:8010 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (737)]: sending to ajp13 #391 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1035)]: ajp_send_request 2: request body to send 0 - request body to resend 0 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (851)]: received from ajp13 #77 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (477)]: ajp_unmarshal_response: status = 302 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (483)]: ajp_unmarshal_response: Number of headers is = 1 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (537)]: ajp_unmarshal_response: Header[0] [Location] = [http://localhost:8888/jsp-examples/] [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (851)]: received from ajp13 #2 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1716)]: Into jk_endpoint_t::done, recycling connection [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (374)]: Into jk_endpoint_t::done [Thu Feb 10 12:44:12 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Thu Feb 10 12:44:12 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/jsp-examples/' [Thu Feb 10 12:44:12 2005] [jk_uri_worker_map.c (483)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match lbajp13worker -> /jsp-examples/ [Thu Feb 10 12:44:12 2005] [mod_jk.c (1689)]: Into handler r->proxyreq=0 r->handler=jakarta-servlet r->notes=135833800 worker=lbajp13worker [Thu Feb 10 12:44:12 2005] [jk_worker.c (90)]: Into wc_get_worker_for_name lbajp13worker [Thu Feb 10 12:44:12 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done found a worker [Thu Feb 10 12:44:12 2005] [mod_jk.c (472)]: agsp=8888 agsn=localhost hostn=localhost shostn=localhost cbsport=0 sport=0 [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (513)]: Into jk_worker_t::get_endpoint [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (283)]: Into jk_endpoint_t::service [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (299)]: Into jk_endpoint_t::service sticky_session=1 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1741)]: Into jk_worker_t::get_endpoint [Thu Feb 10 12:44:12 2005] [jk_lb_worker.c (313)]: Into jk_endpoint_t::service worker=worker3 jvm_route=worker3 rc=1 [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (1367)]: Into jk_endpoint_t::service [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (257)]: Into ajp_marshal_into_msgb [Thu Feb 10 12:44:12 2005] [jk_ajp_common.c (425)]: ajp_marshal_into_msgb - Done |