Broker fails to start as a service
search cancel

Broker fails to start as a service

book

Article ID: 55200

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

If I start the broker in the foreground from a command prompt, it starts with no problems.  But, when starting the broker, on a Windows platform, as a service, startup fails.

My HServer log file is showing the following error message:

HServer | <date> <time> | Connecting through datasource harvest using user <userid>...
HServer | <date> <time> | ERROR: E0302004d: Cannot connect to the datasource harvest as user <userid>.
HServer | <date> <time> | ERROR: [Microsoft][ODBC SQL Server Driver]
[SQL Server]Login failed for user '<user domain>\<userid>'.
SQLSTATE=28000HServer | <date> <time> | ERROR: Initialization fails

The odd thing is, the Harvest portion of the error message shows one user id ( <userid> ), and the ODBC portion of the error message show another user id ( <user domain>\<userid> ). Where are these user ids coming from and which one is really being used?

Environment

Harvest Software Change Manager all versions
on a Windows platform with a SQL Server database

Resolution

The user id found in the Harvest portion of the message is coming from either Harvest's hsvr.dfo file (created with the ' svrenc -s ...' command), or the ' -user ' argument in your HServer.arg file, if that exists.

To understand the user id in the ODBC portion of the message, we need to look at the properties of the Harvest data source. To find this info, refer to the %CA_SCM_HOME%\HServer.arg 's -datasource option. This argument identifies the data source that Harvest uses. Now look at the Windows ODBC Data Sources Control Panel applet, switch to System DSN tab and then identify the data source definition there. Click on Configure to launch the properties of this datasource.

If "With Integrated Windows Authentication..." has been selected on this panel, ODBC will attempt to connect to the database using the Windows user id and password belonging to the user that started the process.

If "With SQL Server Authentication..." has been selected, ODBC will attempt to connect to the database using the user id and password from the hsvr.dfo file, which is passed to it by the broker process.

Either way, the user id must be a valid SQL Server login ID with permissions to the Harvest database in order for the login to succeed.

In case of the specific error message above, the user had specified "With Windows NT Authentication" in their ODBC properties, but had not set up the user id (that started the broker) inside SQL Server as a valid login ID. Instead the user id he wanted to use was the one in his hsvr.dfo file.

The problem was resolved by changing the ODBC setting to "With SQL Server Authentication..."