Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Process hangs(Process hangs on tomcat how to find out why)
Process hangs [message #778191] Wed, 11 January 2012 15:15 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
For testing I wrote a very little Scout app. It only makes a connection to a SQLserver database and loads a list of persons. Enough to test deployment.

On my local machine against a local database it works fine.
If I change the database connection to the production database, it works fine.

Now I deployed everything to the production environment (Tomcat), and if I then download the client and start or only connect my local client to the production scout server nothing happens anymore.

(Note: I have another application running against a mySQL database and there everything runs fine. I can also make connections from my development environment to production environment and that works fine.)

When the client applications is waiting (in the bottom of the screen is a message Calling server... appears) I checked the server and when I connect to my application with an additional "/process" adress I get an overview of what is happening on the server.

If I select the sessions page I see that there are some sessions started.
If I select the services page and select a service then the page refreshes and I get detailed info about the service. But if I select the MsSQlService nothing refreshes ,at least not as long as the clients are waiting.

If I kill the database process only then I get an Processing Error in the client, and on the server I see an error message in a log file about a connection reset.

So obvious something hangs but I can't find out what. What makes my production environment different in that way I does not work with the database anymore?





Re: Process hangs [message #778195 is a reply to message #778191] Wed, 11 January 2012 15:52 Go to previous messageGo to next message
Remo Arpagaus is currently offline Remo ArpagausFriend
Messages: 3
Registered: April 2010
Junior Member
My first guess would be that some database resource is locked by another consumer and your Scout server is waiting for it to be freed. Do you have any chance to see the active sessions on your database and to see whether there are any transactions which are blocked? Are you using MySQL for development and MSSQL for production? I don't actually know MSSQL but maybe sys.sysprocesses could give you a hint.

But it might be something else completely. I suppose it is not feasible to connect to the productive database directly from your development environment? That way you could try to debug the server and see where your issue is.
Re: Process hangs [message #778201 is a reply to message #778195] Wed, 11 January 2012 16:19 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
For this project MSSQL for development and production (other project both MySQL)
Checked the database queried on sys.sysprocesses. I see one process but not blocking. I see some strange things there, hostprocess is 0 (all other enries have a number there and net_address is 000000000000 all other enties have a hexadecimale number. So one step further.

Thanks
Re: Process hangs [message #778205 is a reply to message #778191] Wed, 11 January 2012 16:32 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 100
Registered: March 2010
Senior Member
What is the ISqlStyle ou are using? please paste your used sqlservice and sqlstyle class. What is the test statement the sql style uses?

Maybe you could enable logging in finest level to see how far it gets and whether it can create at least the connection or fails already BY creating the connection.
Re: Process hangs [message #778210 is a reply to message #778205] Wed, 11 January 2012 16:49 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
Hereby the code. It makes no difference if I uncomment the teststatement or not.

public class MsSqlService extends AbstractSqlService implements IService {

  @Override
  protected String getConfiguredJdbcDriverName() {
    return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  }

  @Override
  protected Class<? extends ISqlStyle> getConfiguredSqlStyle() {
    return atlas2.server.services.common.sql.RidMsSqlStyle.class;
  }
}



public class RidMsSqlStyle extends MSSQLSqlStyle {
  @Override
  public void testConnection(Connection conn) throws SQLException {
    System.out.println("execTestConnection by SELECT count(*) FROM dbo.sysobjects");

//    Statement testStatement = null;
//    try {
//      testStatement = conn.createStatement();
//      testStatement.execute("SELECT count(*) FROM dbo.sysobjects");
//      System.out.println("execTestConnection OK");
//    }
//    finally {
//      System.out.println("execTestConnection finally");
//      if (testStatement != null) try {
//        testStatement.close();
//      }
//      catch (Throwable t) {
//      }
//    }

  }
}


On the database host-name and net-adress are 0. So why is this different if I make a connection to the same database from two different locations. From my laptop everything works, when deployed it does not work. Maybe it is not a Scout problem then?
Re: Process hangs [message #778348 is a reply to message #778210] Thu, 12 January 2012 14:11 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
Tested with a simple java swing program. Same problem so it has nothing to do with Scout.

Thanks for the support
Re: Process hangs [message #779366 is a reply to message #778348] Sun, 15 January 2012 14:13 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
Solved,

Java version 1.6.0_29 does not work. As far as I have tested, 1.6.0_23, 1.6.0_24, 1.6.0_26, 1.6.0_30 work fine.
Re: Process hangs [message #779633 is a reply to message #779366] Mon, 16 January 2012 08:20 Go to previous message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 100
Registered: March 2010
Senior Member
Hi Bertin, sorry for my delay, thanks for your patience!
Using beyond compare a source/class comparison could be done to find out what changed between 1.6.0_29 and _30
Previous Topic:Validation rules
Next Topic:CalenderField
Goto Forum:
  


Current Time: Fri Nov 28 11:36:52 GMT 2014

Powered by FUDForum. Page generated in 0.03630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software