Setting up Mirth as Eclipse project

Posted in Computación with tags , , , , on 31/August/2015 by Alex Pérez


This is a mini-guide to setup Mirth as an eclipse project, in order to adapt some classes, build it from sources or explore the sources to learn how mirth is built. In fact, this is an enhanced version of my previous guide found in the wiki section of Mirth site. This new version has many screenshots of the configuration to provide an easier guide, and is adapted where needed to Mirth v1.8.1


Required software
To start the setup of eclipse project I’ll assume you have installed and configured:

You can install the appropiate version of subclipse from eclipse. You should go to Help item in eclipse menu, “Software Updates”, “Find and Install”:

“Search for new features to install”, and define a new repository location. Provide the appropiate URL to you eclipse version:


Continue reading

Apache 2.2.11/Subversion memory leak

Posted in Computación with tags , , , , , , , on 24/August/2015 by Alex Pérez

We are running a small-medium site with about 150 svn projects in a old server windows 2003/apache 2.2/svn 1.6.6. Some users reported us that the SVN server goes down. Something is wrong with the svn server: from time to time the apache service starts hogging memory and it dies with only a message:

[crit] Parent: child process exited with status 3 -- Aborting.
[info] removed PID file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid (pid=1436)

It’s not really critical if you configure the service to restart on error, but it’s annoying enough to do some further research.

Server free memory, before and after the change implementation.

free memory reported by Zabbix, as returned by perfmon (memory available) (http://technet.microsoft.com/en-us/library/cc749154.aspx)


Continue reading

Calling stored procedures from Mirth

Posted in Computación with tags , , , , , , on 27/October/2010 by Alex Pérez

Mirth JDBC reader/writer are well suited for simplest cases: only one SELECT and (optionally) a UPDATE for each row, but normally you need to use JDBC reader/writer with JS enabled.

Mirth JDBC API when using JS is very basic and does not allow easily deal with stored procedures: there are only executeCachedQuery() and executeUpdate(). If you’re lucky you can use executeUpdate() as long as your SP doesn’t use IN/OUT parameters or returns any resultset. Otherwise you should call the SPs in a java library and then invoke it from Mirth JS. Some time ago I documented how to call custom java classes from Mirth and this may be used to extend its database API. Continue reading

Shared SCSI Storage with VMWare Server 2.0 and OCFS

Posted in Computación with tags , , , , , , , on 19/October/2010 by Alex Pérez

(An update over the same trick with VMWare Server 1.X)

VMWare Server was declared End Of Availability on Jan/2010, while VMWare is pushing to use Player, ESX(i), vCenter, vSphere and all the “formerly known as” product names. I think that VMWare Server series are a great software, but v2.0 was sentenced to death since:

The King is dead. Long live the King.

Well, let’s see a recipe for configuring a shared SCSI bus + OCFS2 with VMWare Server 2.0.

I will use a turnkey Linux appliance in this test, because it has a very simple startup menu for configuring IP address and it’s debian based (apt-get!). Continue reading

SOAP polling with Mirth

Posted in Computación with tags , , , , , , on 10/October/2010 by Alex Pérez

There are some recurrent problems when developing interfaces with Mirth, and one of the trickiest is SOAP polling. From early versions of Mirth there is a SOAP sender connector, but it doesn’t have any direct connector to poll a webservice. As far as I know polling is considered to be a near-antipattern, but under some circunstances you may be forced to use it if the integration counter-part is closed-source.

To read periodically from a WS you need to setup an interface with these connectors:

  • source: JS Reader
  • destination 1: SOAP Sender
  • postprocessor or destination 2: JS Writer (or any other destination-type with a JS Transformer inside) Continue reading

Indexing NULL column values

Posted in Computación with tags , , , , , , , , on 1/August/2010 by Alex Pérez

After reading some great articles from Burleson Consulting about the “is null/is not null” predicates I decided to make some additional tests. It’s a very common mistake to write SQL with this kind of predicates since the NULL values aren’t included in regular indexes (B*Tree, not function-based), so almost every “IS NULL” results in a TABLE FULL SCAN.

I want to test how much a index can improve a IS [NOT] NULL predicate measuring the #requests per minute that a legacy box can serve. In the old days this server was a mission-critical server, but nowadays is retired as test server and can be compared to a very low end box (P3-512M ram).
Well, I measure the time that the select statement takes to execute (using JMeter)  instead of cost because a 30% reduction cost does not mean a 30% time reduction, and usually the end-user speak in terms of time, and there are many “tricks” like moving a table to the KEEP_POOL that can speed-up SQL execution although the cost is the same.
Continue reading

Using JMeter to test JDBC databases

Posted in Computación with tags , , , , , , , on 17/April/2010 by Alex Pérez

Despite JMeter is a well-known load testing tool when testing web projects, it seems to be unused when testing SQL performance. So I decided to share how to configure a fairly simple SQL test plan involving only one SQL statement.

Download Apache JMeter and Java, if you don’t have them already.

Get a copy of the oracle driver (ojdbc14.jar) or a JDBC driver of your preferred DB, and throw it into the JMETER_HOME/lib directory

  • Open JMeter and create a test plan as shown in fig1. Based on this plan you can complicate it as you want to load your DB and fit it to your needs. There are two JMeter Listeners (red) called “Aggregate Report” and “Summary Report” that will report us some statistical results like mean, median, throughput among others. I recommend you to use the Statistical Aggregate Report listener. Inside the thread group (blue) are two items of type “JDBC Connection Configuration” and “JDBC Request”. As we will see, is where we define the DB connection properties (user, password, driver, IP, SID), and the statement we want to test. Continue reading

Installing oracle instant client on Linux

Posted in Computación with tags , , , , , , , on 20/July/2009 by Alex Pérez

This is a miniguide to install sqlplus with the minimal oracle-software fingerprint. As far as I can, I avoid to install the Oracle Client in my computers, because in MS Windows it modifies heavily the registry, and in linux you should set a lot of environment variables and deal with Oracle Universal Installer (OUI) that depends on many packages, versions, java … etc. And there is a better solution to install a simple sqlplus without installing the whole Oracle Client: oracle instant client.

I’ve used the 10.2.0.4 version, but I suppose that using any other 10.X or even 11.X version should be similar. Continue reading

tcpdump – Packet size limited during capture [ENG]

Posted in Computación with tags , , , , , , on 16/July/2009 by Alex Pérez
Wireshark logo

Wireshark logo

[Due to the # of hits of this entry, I translated this to English …. my poor English xD]

I was looking why a web application was not running at all. The browser must send a request and the app should add some headers in order to login without problems … but seeing that the web application didn’t behave as expected, I decided to see what’s going on and what was sending *exactly* the browser to the app.

So, I left a “tcpdump” running in the server, and replayed the issue with the browser. When I opened the dump file with Wireshark (Ethereal fork, AFAIK), I found that too many frames got a tag “Packet size limited during capture”.

WTF?

After searching with Wireshark some strings that are supposed to exist in the HTTP request ….no luck. But I’m 100% sure that the browser is sending the string I’m searching!?

Wireshark - Packet size limited during capture

Wireshark - Packet size limited during capture

No luck. And … what’s this message “Packet size limited during capture”?

After googling for a while, it seems that older versions of tcpdump, or running tcpdump in old OSes, by default the packet size it’s truncated to 96 or 68 bytes. So, the Wireshark/Ethereal option “Follow TCP Stream” is unable to show what’s exactly going on between the broswser and HTTP server.

If we want to capture network frames full-length, you must use “-s 0” flag. (ie # tcpdump -i eth0 -w file.cap -s 0). But in tcpdump manpage they alert that this is a lot of extra work to the server. With the “-s 0” flag, the frames are captured with the original length, and we can follow the TCP stream as required.

HTH

Plata coloidal casera

Posted in No Computación with tags , , , , , , on 3/July/2009 by Alex Pérez

Desde hace algunos meses estoy asistiendo a lo que parece un resurgimiento de las terapias alternativas/ocultismo/paraciencias en algunos blogs que frecuento. He alucinado bastante con algunos posts acerca de:

  • chemtrails/orgonita
  • campañas anti-vacunación
  • radiestesia, astrología … etc

Sería un error pensar que esto son creencias marginales y restarle importancia al asunto. Al contrario: hace unos meses me sorprendí discutiendo con una amiga acerca de la existencia de los chemtrails. No es un problema de formación, puesto que ella es ingeniera (si, ya sé que no es garantía de nada, pero tiene un nivel alto de formación), sino que más bien lo veo como una total falta de pensamiento crítico. Y -cómo no- su discurso era bastante conspiranoico: en cuanto le respondía que algun punto de teoría hacía aguas siempre aducía la existencia de grupos de control/farmacéuticas … que se estaban encargando de que la opinión pública ignorara semejante proyecto. El colmo es el asunto de la orgonita, en el cual un compuesto de resina-cuarzo-metal se supone que emite un tipo de radiación (por supuesto: no medible, ni detectable, ni tiene efectos observables) que neutraliza la acción de los chemtrails. Como todos sabemos uno de los efectos de los chemtrails es la modificación del clima.
Con los chemtrails, alguien que sigue pensamientos mágicos para esto lo tiene fácil:

  • si no llueve, es por los chemtrails
  • si llueve, es por la acción de la orgonita que está neutralizando los chemtrails
  • si llueve demasiado, es por los chemtrails… (nunca llueve a gusto de todos, está claro xD)
  • si querías ir a la playa y llueve, es por los chemtrails
  • si hace unas semanas que no llueve, es por los chemtrails

Continue reading