You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "svignal, Aptilon.com" <sv...@aptilon.com> on 2000/08/31 21:13:53 UTC

Urgent!!!

Hello,
I've downloaded the mod_jserv from the binary distribution and this is the
result:

API module structure `jserv_module' in file libexec/mod_jserv.so is
garbled - perhaps this is not an Apache module DSO?./apachectl restart:
httpd could not be started

I use apache 1.3.11.

Thank a lot.

Sebastien Vignal
svignal@aptilon.com


Re: Urgent!!!

Posted by Rachel Greenham <ra...@enetgroup.co.uk>.
"svignal, Aptilon.com" wrote:
> 
> Hello,
> I've downloaded the mod_jserv from the binary distribution and this is the
> result:
> 
> API module structure `jserv_module' in file libexec/mod_jserv.so is
> garbled - perhaps this is not an Apache module DSO?./apachectl restart:
> httpd could not be started
> 
> I use apache 1.3.11.

You don't say what OS/platform. The only binaries available are for Win32
(i386) and Linux (i386). Any other operating system, or even those ones on
different platforms (remember Linux runs on practically anything these days)
won't run those binaries, so you'd need to build from source.

... which isn't hard once you know what to watch out for.

-- 
Rachel

Re: MySQL, Tomcat, Communication Link Error

Posted by Louis Tribble <lo...@metamata.com>.
Bob Tanner wrote:
> 
> I have a simple servlet that performs a simple SELECT on an MySQL database.
> After running for approximately 24 hours, tomcat starts to throw IOException
> expection.

I remember a colleague having a similar problem. This may not be your
problem, but it's worth checking. One connection was being kept around
for occassional use by a servlet. Every morning, we would have to restart
Tomcat because of a similar exception. It turned out that the Mark 
Matthews' JDBC driver closes the socket for a connection after about
8 hours of non-use. The first use after that throws the exception.

Louis Tribble

> 
> Here is the stack:
> 
> java.io.IOException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite(Native Method)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
>         at java.io.BufferedOutputStream.write(BufferedOutputStream.java:112)
>         at java.io.DataOutputStream.write(DataOutputStream.java:88)
>         at org.gjt.mm.mysql.MysqlIO.send(MysqlIO.java)
>         at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java)
>         at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java)
>         at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java)
>         at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
>         at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
>         at org.gjt.mm.mysql.Statement.executeQuery(Statement.java)
>         at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Statement.java:78)
>         at org.ffh.servlet.MyServlet.doPost(MyServlet.java:98)
> 
> The reasons I think it is tomcat:
> - I can kill MySQL and I get the same error.
> - I can still access the same MySQL database and same table from the mysql
>   command line.
> - I can still access the same MySQL database and same table from another servlet
>   running in the same instance of tomcat that causes this error.
> - I can access the same MySQL database and same table from the SAME servlet
>   running in another instance of tomcat.
> - Restarting MySQL has not effect on the problem.
> - Restarting tomcat 'fixes' the problem.
> 
> I am going to try the latest CVS snapshot to see if it fixes the problem. But I
> thought I would post here to see what others have to say.
> 
> Environment:
> 
> Tomcat3.2-dev
> 
> $ rpm -q MySQL
> MySQL-3.23.11-1
> 
> $ java -version
> java version "1.2.2"
> Classic VM (build 1.2.2_006, green threads, nojit)
> 
> --
> Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
> http://www.mn-linux.org                 | Fax   : (612)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9

-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble                                         louis@metamata.com
Metamata, Inc.                                   http://www.metamata.com
Tools for serious Java developers.                       +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Re: [Tomcat-users] Re: MySQL, Tomcat, Communication Link Error

Posted by Matt Goss <mg...@rtci.com>.
Bob,
Database pooling is a great way to increase the speed of your code (at least by
a factor of 10). I would just edit your database pooling code to check if the
connection is null and create another if so....
Matt Goss

Bob Tanner wrote:

> Quoting Kevin Sangalee (kevin@susa.net):
> > Where do you get and release your connections? I've seen errors like that
> > when database server daemons have been restarted for whatever reason,
> > causing the tcp/ip socket connection to be broken. Perhaps mySQL has a
> > configurable timeout on server processes (i.e. to avoid possibility of
> > memory wind-ups etc).
>
> I removed the database pooling code, I am going it raw in the init().
>
>       Class.forName(driver).newInstance();
>       Connection conn = DriverManager.getConnection(url);
>       stmt = conn.createStatement();
> --
> Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
> http://www.mn-linux.org                 | Fax   : (612)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9

Re: [Tomcat-users] Re: MySQL, Tomcat, Communication Link Error

Posted by Kevin Sangalee <ke...@susa.net>.
If it's in init(), then you're only connecting when the servlet is
first instantiated. If that connection times out, requests to that servlet
will still be trying to use the duff connection. So you're essentially no
further forward unless you either connect on every request or test your
connection before using it and do a getConnection(url) if it fails.

The long term fix will be to check your connection pool and mySQL config.
I've used one called DBConnectionManager with mySQL, I'm not sure but I
think it verifies connections before handing them out (as I'm sure lots of
others do too).

On Thu, 31 Aug 2000, Bob Tanner wrote:

> I removed the database pooling code, I am going it raw in the init().
> 
>       Class.forName(driver).newInstance();
>       Connection conn = DriverManager.getConnection(url);
>       stmt = conn.createStatement(); 
> -- 
> Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
> http://www.mn-linux.org                 | Fax   : (612)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 
> 
> 


Re: [Tomcat-users] Re: MySQL, Tomcat, Communication Link Error

Posted by Bob Tanner <ta...@real-time.com>.
Quoting Kevin Sangalee (kevin@susa.net):
> Where do you get and release your connections? I've seen errors like that
> when database server daemons have been restarted for whatever reason,
> causing the tcp/ip socket connection to be broken. Perhaps mySQL has a
> configurable timeout on server processes (i.e. to avoid possibility of
> memory wind-ups etc).

I removed the database pooling code, I am going it raw in the init().

      Class.forName(driver).newInstance();
      Connection conn = DriverManager.getConnection(url);
      stmt = conn.createStatement(); 
-- 
Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
http://www.mn-linux.org                 | Fax   : (612)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 


Re: MySQL, Tomcat, Communication Link Error

Posted by Kevin Sangalee <ke...@susa.net>.
Where do you get and release your connections? I've seen errors like that
when database server daemons have been restarted for whatever reason,
causing the tcp/ip socket connection to be broken. Perhaps mySQL has a
configurable timeout on server processes (i.e. to avoid possibility of
memory wind-ups etc).

Anyhow, a good connection pooler should verify connections before it gives
them to you, and discard them connection on exceptions like the one below.
My suggestion is make Tomcat the last place to look for the cause of this
error, and perhaps catch the exception and try to re-establish the
database connection if it fails - see what happens.

On Thu, 31 Aug 2000, Bob Tanner wrote:

> I have a simple servlet that performs a simple SELECT on an MySQL database.
> After running for approximately 24 hours, tomcat starts to throw IOException
> expection.
> 
> Here is the stack:
> 
> java.io.IOException: Broken pipe
> 	at java.net.SocketOutputStream.socketWrite(Native Method)
> 	at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
> 	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:112)
> 	at java.io.DataOutputStream.write(DataOutputStream.java:88)
> 	at org.gjt.mm.mysql.MysqlIO.send(MysqlIO.java)
> 	at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java)
> 	at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java)
> 	at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java)
> 	at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
> 	at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
> 	at org.gjt.mm.mysql.Statement.executeQuery(Statement.java)
> 	at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Statement.java:78)
> 	at org.ffh.servlet.MyServlet.doPost(MyServlet.java:98)
> 
> The reasons I think it is tomcat: 
> - I can kill MySQL and I get the same error.
> - I can still access the same MySQL database and same table from the mysql
>   command line.
> - I can still access the same MySQL database and same table from another servlet
>   running in the same instance of tomcat that causes this error.
> - I can access the same MySQL database and same table from the SAME servlet
>   running in another instance of tomcat.
> - Restarting MySQL has not effect on the problem.
> - Restarting tomcat 'fixes' the problem.
> 
> I am going to try the latest CVS snapshot to see if it fixes the problem. But I
> thought I would post here to see what others have to say.
> 
> Environment:
> 
> Tomcat3.2-dev
> 
> $ rpm -q MySQL
> MySQL-3.23.11-1
> 
> $ java -version
> java version "1.2.2"
> Classic VM (build 1.2.2_006, green threads, nojit)
> 
> -- 
> Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
> http://www.mn-linux.org                 | Fax   : (612)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 
> 
> 


MySQL, Tomcat, Communication Link Error

Posted by Bob Tanner <ta...@real-time.com>.
I have a simple servlet that performs a simple SELECT on an MySQL database.
After running for approximately 24 hours, tomcat starts to throw IOException
expection.

Here is the stack:

java.io.IOException: Broken pipe
	at java.net.SocketOutputStream.socketWrite(Native Method)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:112)
	at java.io.DataOutputStream.write(DataOutputStream.java:88)
	at org.gjt.mm.mysql.MysqlIO.send(MysqlIO.java)
	at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java)
	at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java)
	at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java)
	at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
	at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
	at org.gjt.mm.mysql.Statement.executeQuery(Statement.java)
	at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Statement.java:78)
	at org.ffh.servlet.MyServlet.doPost(MyServlet.java:98)

The reasons I think it is tomcat: 
- I can kill MySQL and I get the same error.
- I can still access the same MySQL database and same table from the mysql
  command line.
- I can still access the same MySQL database and same table from another servlet
  running in the same instance of tomcat that causes this error.
- I can access the same MySQL database and same table from the SAME servlet
  running in another instance of tomcat.
- Restarting MySQL has not effect on the problem.
- Restarting tomcat 'fixes' the problem.

I am going to try the latest CVS snapshot to see if it fixes the problem. But I
thought I would post here to see what others have to say.

Environment:

Tomcat3.2-dev

$ rpm -q MySQL
MySQL-3.23.11-1

$ java -version
java version "1.2.2"
Classic VM (build 1.2.2_006, green threads, nojit)

-- 
Bob Tanner <ta...@real-time.com>       | Phone : (612)943-8700
http://www.mn-linux.org                 | Fax   : (612)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 


Re: Urgent!!!

Posted by Yang Yue Xiang <ya...@comp.nus.edu.sg>.
why not compile it from source code?

On Thu, 31 Aug 2000, svignal, Aptilon.com wrote:

> Hello,
> I've downloaded the mod_jserv from the binary distribution and this is the
> result:
> 
> API module structure `jserv_module' in file libexec/mod_jserv.so is
> garbled - perhaps this is not an Apache module DSO?./apachectl restart:
> httpd could not be started
> 
> I use apache 1.3.11.
> 
> Thank a lot.
> 
> Sebastien Vignal
> svignal@aptilon.com
>