SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Test Connection freezes
Goto page 1, 2  Next
 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Test Connection freezes
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Test Connection freezes Reply with quote
I'm giving 27x7 Scheduler a test run. I'd like to see if we could use it to manage multiple SQL servers at multiple sites from a single central interface but I fail right at the start. When I try to add a new SQLServer Database Profile, after filling in Profile name, Database URL, User name and Password and clicking Test Connection button the Database Profile Properties dialog freezes with the Test Connection button stuck pressed. It can be moved around, but it does not respond to buttons, it cannot be closed. I have to kill 24x7 Scheduler from the task manager. What am I doing wrong?
Wed Apr 25, 2012 7:58 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
A few questions first.

Which version of 24x7 are you testing? (You can see it in help/about menu)
Do you see jdbc.log file in the scheduler installation directory? If yes, anything interesting in that file related to the connection freezing issue?
In the version you are testing, please take a look at properties of SQLServer interface (this is an item in the system tree). Does it show ./drivers/mss/sqljdbc4.jar or ./drivers/mss/sqljdbc.jar as the driver file name?
Wed Apr 25, 2012 8:48 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:

Which version of 24x7 are you testing? (You can see it in help/about menu)

Multi-Platform Edition
Version 5.0 Build 377
JVM Version 1.6.0_29-b11

SysOp wrote:

Do you see jdbc.log file in the scheduler installation directory? If yes, anything interesting in that file related to the connection freezing issue?

No jdbc.log file there.

SysOp wrote:

In the version you are testing, please take a look at properties of SQLServer interface (this is an item in the system tree). Does it show ./drivers/mss/sqljdbc4.jar or ./drivers/mss/sqljdbc.jar as the driver file name?


SQLServer interface properties are (copy-pasted as they were):

Interface name: SQLServer
Driver's path: ./drivers/mss/sqljdbc4.jar
Driver's class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Wed Apr 25, 2012 9:09 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Please post the database URL you are testing. In the posted text let's replace server name with asterisks or other symbols to mask it. I'm interested in seeing the format of your database URL rather than actual values.

Are you trying SQL or Windows authenticated connection? If SQL authenticated connection, is the target SQL Server instance server configured to accept SQL authenticated connections?

Also, please use Tools/Options menu, Log tab, to enable tracing mode, check "Trace Enabled" option. close the Options dialog and then try Test Connection again. Does it generate jdbc.log file? If not, please check debug.log file, the ending lines related to your Test Connection. Do you see anything interesting there?
Wed Apr 25, 2012 9:27 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:
Please post the database URL you are testing. In the posted text let's replace server name with asterisks or other symbols to mask it. I'm interested in seeing the format of your database URL rather than actual values.

jdbc:sqlserver://localhost:1433;databaseName=master

SysOp wrote:

Are you trying SQL or Windows authenticated connection? If SQL authenticated connection, is the target SQL Server instance server configured to accept SQL authenticated connections?

It's an SQL authenticated connection and the server instance is configured properly. The funny thing is that as long there is something misconfigured (either server name/IP or port number or database name or user name/password) the resulting error message accurately indicates the cause. As soon as there is everything correctly set up the test connection freezes.

SysOp wrote:

Also, please use Tools/Options menu, Log tab, to enable tracing mode, check "Trace Enabled" option. close the Options dialog and then try Test Connection again. Does it generate jdbc.log file? If not, please check debug.log file, the ending lines related to your Test Connection. Do you see anything interesting there?

After turning on tracing mode there's still no jdbc.log file.. The following lines appeared in debug.log. They seem to be quite meaningless to me.
Code:

2012-04-25 19:00:30,727 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - loadDriver()  driverPath=./drivers/mss/sqljdbc4.jar driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
2012-04-25 19:00:30,728 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - parsed urls: 1
2012-04-25 19:00:30,728 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - url #0 file:/T:/24x7/drivers/mss/sqljdbc4.jar
2012-04-25 19:00:30,729 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - java.net.URLClassLoader@5f634c
2012-04-25 19:00:30,752 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - SQLServerDriver:2

Wed Apr 25, 2012 1:08 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Let's ignore Test Connect for a moment and save the profile with correct settings.
Please create a new SQL job in 24x7 with any valid SQL command(s) and assign to the profile in question. Run the job normally and check Job Log tab. Does it show any errors? Does it show 'job completed'' message or it freezes too?
Wed Apr 25, 2012 1:38 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
It doesn't freeze, but does not run either.

The job log shows : "Create process error. Extended error: User name must be specified in domain\user format!" But this machine is not in a domain.

Also there are two errors in debug.log:

#1. This one is probably because of Hungarian regional settings. The date might seem weird.
Code:

2012-04-25 19:51:27,218 [main] ERROR com.softtreetech.jscheduler.business.log.LoggerImpl - parseLogRecord(...) :
java.text.ParseException: Unparseable date: "25-ápr.-2012 05:53:38 DU"


#2. Something about elevation.
Code:

2012-04-25 19:52:48,582 [main] DEBUG com.softtreetech.jscheduler.common.util.LegacyCodeConvertionUtils - java.lang.Exception: An exception occurred in [RegistryUtil.getKey] method. An exception occurred in [RegistryUtil.execCommand] method. Cannot run program "regedit": CreateProcess error=740, The requested operation requires elevation

Wed Apr 25, 2012 2:34 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Strange error. Are you trying to run that database job as a different OS user?
Please clear host/user/password from the job properties, they are not needed there, and very rarely used with database jobs, only when using windows authentication methods for database connections.
So when cleared, the job should run local under default scheduler credentials. That will clear the described error. Please let us know if that helps.

By the way, to refer to local users, please use Windows machine\name or .\name notation.
Wed Apr 25, 2012 3:50 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:
Strange error. Are you trying to run that database job as a different OS user?
Please clear host/user/password from the job properties, they are not needed there, and very rarely used with database jobs, only when using windows authentication methods for database connections.
So when cleared, the job should run local under default scheduler credentials. That will clear the described error. Please let us know if that helps.

It seems I didn't fully understand how it works. I thought those user/password settings were for SQL authentication.
The good news is that now it start or at least it seems so from debug.log. The bad news is it freezes immediately after starting it. As you can see it in the log, the job should add a row to test.dbo.test_table. I checked the table and no rows were added.


These are the new lines added to debug.log:

Code:

2012-04-25 22:11:24,895 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.DetachedJobRunner - runJob (JobPropertiesWorkFile):
2012-04-25 22:11:24,899 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.DetachedJobRunner - runJob(): jid=412; workfile created
2012-04-25 22:11:24,899 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.DetachedJobRunner - runJob(): start
2012-04-25 22:11:24,900 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.DetachedJobRunner - execProcess(): command line [T:\24x7\jre\bin\java.exe -jar jscheduler.jar /JOBFILE 412]; work directory [T:\24x7\]
2012-04-25 22:11:24,919 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.DetachedJobRunner - waitForProcess(): start
2012-04-25 22:11:24,919 [Thread-7] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner$TimeoutVerifier - run(): start
2012-04-25 22:11:24,919 [Thread-7] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner$TimeoutVerifier - run(): timeout check not required
2012-04-25 22:11:25,256 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - JVM version: 1.6.0_29-b11
2012-04-25 22:11:25,257 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - main(...) : start
2012-04-25 22:11:25,257 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - main(...) : job on demand: runtime id=412
2012-04-25 22:11:25,257 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : start
2012-04-25 22:11:25,260 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : creating business objects
2012-04-25 22:11:25,495 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : creating UI controller
2012-04-25 22:11:25,577 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : initializing business objects
2012-04-25 22:11:25,808 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : loading preferences
2012-04-25 22:11:25,810 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : Setting shutdown event hook
2012-04-25 22:11:25,814 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : loading job db
2012-04-25 22:11:25,821 [main] DEBUG com.softtreetech.jscheduler.db.drivers.file.FileJobDbStorage - buildIndex(): totalRecordsNumber: 10
2012-04-25 22:11:25,821 [main] DEBUG com.softtreetech.jscheduler.db.drivers.file.FileJobDbStorage - buildIndex(): deletedRecordsNumber: 1
2012-04-25 22:11:25,888 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : job on demand: loading workfile
2012-04-25 22:11:25,897 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : job on demand: deleting workfile
2012-04-25 22:11:25,898 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : job on demand: running
2012-04-25 22:11:25,907 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - runJob()
2012-04-25 22:11:25,908 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - executeScript(): script=INSERT INTO test.dbo.test_table
(
   a,
   b
)
VALUES
(
2,2
)
2012-04-25 22:11:25,908 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - executeScript(): starting SQL Script
2012-04-25 22:11:25,908 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - executeScript(): job not using user authentication
2012-04-25 22:11:25,909 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - Enabling JDBC trace
2012-04-25 22:11:25,926 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - loadDriver()  driverPath=./drivers/mss/sqljdbc4.jar driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
2012-04-25 22:11:25,926 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - parsed urls: 1
2012-04-25 22:11:25,927 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - url #0 file:/T:/24x7/drivers/mss/sqljdbc4.jar
2012-04-25 22:11:25,927 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - java.net.URLClassLoader@1358f03
2012-04-25 22:11:25,956 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.sql.SqlConnector - SQLServerDriver:2

Wed Apr 25, 2012 4:21 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
We see now the job is also hanging on connect, just like the Test Connect. So at least the results are consistent. But this time we may have a chance to take a glimpse at the jdbc config file.
Code:
2012-04-25 22:11:25,909 [Job #9 - Test job] DEBUG com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner - Enabling JDBC trace


Do you see jdbc.log file now? Is there anything interesting in that file shedding light on the connection issue?

If you don't see it, let's try couple other steps. Let's check if ODBC connection is working. If you have an ODBC profile, please add new database profile to 24x7 settings using the ODBC database interface. Let's try a Test Connect. If that works, change job database profile to the ODBC based profile and run the job. Let's see if that works too.

Now, if the ODBC profile fails too, the issue could be outside of 24x7, for example, an antivirus or firewall could be blocking certain activities or communications started from the scheduler process.

If the ODBC profile succeeds, let's focus on getting native SQL connection working. Can you check your SQL Server logs if they register any failed connections from the scheduler?
Wed Apr 25, 2012 4:49 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:

Do you see jdbc.log file now? Is there anything interesting in that file shedding light on the connection issue?

There are three identical (except for run-time #) entries in jdbc.log.

Code:

Wed Apr 25 22:11:25 CEST 2012
Job: Test job
Run-time #: 412
----------------------------------
JdbcOdbcDriver class loaded
registerDriver: driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@289d2e]
DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.microsoft.sqlserver.jdbc.SQLServerDriver,SQLServerDriver:1]



SysOp wrote:

If you don't see it, let's try couple other steps. Let's check if ODBC connection is working. If you have an ODBC profile, please add new database profile to 24x7 settings using the ODBC database interface. Let's try a Test Connect. If that works, change job database profile to the ODBC based profile and run the job. Let's see if that works too.

There are working ODBC connections on the machine but I don't know how to add them to 24x7. Simply setting jdbc:odbc:odbc_profile as database url yields the error message "The specified DSN contains an architecture mismatch between the Driver and Application". I'm sorry but I'm quite a bit tired so I'll have to postpone this issue till tomorrow. Thanks for you help though.

UPDATE:
Okay, I created several ODBC connections and figured out that only those on User DSN tab are working, the others (System DSN and File DSN) are not. Test Connection reported no error and did not freeze, so I used the one on User DSN to create the job. It ran and the row was inserted into the table.

SysOp wrote:

Can you check your SQL Server logs if they register any failed connections from the scheduler?

Yes, there are entries for all the incorrect cases (mismatching username/password/ip/port/database name) but there aren't any when everything is set up properly. I'll alter login auditing settings to see what happens.

UPDATE2:
Nothing happened.
Wed Apr 25, 2012 5:27 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Really weird. Which version of SQL Server is that?
Thu Apr 26, 2012 9:34 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Also, please tell me what you get after changing in "SQLServer" Database Interface properties in 24x7 setting driver name from ./drivers/mss/sqljdbc4.jar to ./drivers/mss/sqljdbc.jar. Does that work or give any messages on Test Connect
Thu Apr 26, 2012 9:37 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:
Really weird. Which version of SQL Server is that?


Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (Intel X86)
Jun 17 2011 00:57:23
Copyright (c) Microsoft Corporation
Data Center Edition on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (WOW64)

SysOp wrote:

Also, please tell me what you get after changing in "SQLServer" Database Interface properties in 24x7 setting driver name from ./drivers/mss/sqljdbc4.jar to ./drivers/mss/sqljdbc.jar. Does that work or give any messages on Test Connect

It yields the following error message:
"Cannot connect to the database: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use sqljdbc4.jar class library, which provides support for JDBC 4.0.."
Thu Apr 26, 2012 3:16 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
I believe your issue is described here
http://connect.microsoft.com/SQLServer/feedback/details/696635/jdbc-connection-hangs-since-security-update-kb2539636

Note, 24x7 is using internally Java 1.6.0_29-b11 build, which is a stable build, but appears incompatible with your specific version of SQL Server. That Java build introduced a change to how data is sent to databases to counteract the so-called BEAST vulnerability. The solution for that issue is described here
http://blogs.msdn.com/b/jdbcteam/archive/2012/01/19/patch-available-for-sql-server-and-java-6-update-30.aspx
Basically, you have 2 options: (1) install Microsoft patch on SQL Server side, or (2) downgrade JRE used by 24x7 to version 6 update 27. In the latest case replace files in c:\24x7\JRE with files from JRE 1.6.027

Please let us know if that helps.
Thu Apr 26, 2012 3:48 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.