UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.
Absent Member.
11586 views

Scan Initialization Failed

Jump to solution

It doesn't seem to matter what settings I have the scan always fails to initialize. Even a basic scan with default parameters (http://zero.webappsecurity.com/) fails to initialize. This is a fresh install. Many of the other tickets on here reference the log viewer, it doesn't seem to have any errors. Just warnings. We're not using any sql server either. If needed i can supply pages from the log viewer here. Just tell me what tabs to copy.

 

Thanks,

 

-James

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert
  • Does your SQL Express service in the Servcies Control Panel show as "SQL Server (SQLEXPRESS)".  This is the default Named User Instance that WebInspect is expecting.  Sometimes when we have included SQL Express within the Webisnpect installer (webinspect_FR.exe for "Full Release"), this Named Instance may be MSSQLEXPRESS, but that will also be accepted.

 

  • Did you install this SQL Express on your own, or was it part of the WebInspect "Full Release" installer (webinspect-FR.exe), which currenlty delivered SQL Express 2012 SP1 in WebInspect 16.20?

 

 

SQL CACHE FOLDER:

 

  • Windows7 & Vista:  C:\Users\%CURRENTUSER%\Appdata\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\      (or ..\MSSQLEXPRESS\)
      • UAC may prevent browsing to this folder, but this can be bypassed by having the user open it by Running "%APPDATA%\..\Local" from  the Windows Start Menu or the Windows Explorer Path field. This command short-cut will open Windows Explorer into their \Local\ folder.

 

  • Windows XP:  C:\Documents and Settings\%CURRENTUSER%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\   (or ..\MSSQLEXPRESS\)

 

 

 

BASIC FIX:

 

To delete the SQL Express Cache folder, it is generally necessary to perform these additional steps:

  1. Exit WebInspect.
  2. Stop these Windows services, if running:
    • "SQL Server (SQLEXPRESS)"   [or "SQL Server (MSSQLEXPRESS)"]
    • "WebInspect Scheduler Service"
    • "AMP Sensor for WebInspect"
  3. Open the Task Manager and locate and "End Process" for any sqlservr.exe processes or sql writer processes listed.
  4. Close the "HPE Fortify Monitor" found in the System Tray, if present.
  5. Delete the SQL Express cache folder.
  6. Restart SQL Express service.
    • If desired, restart the other "WebInspect" named services.
  7. Restart WebInspect and verify functioning (start a new scan, import a scan, or report generation).
    • If desired, restart the HPE Fortify Security Monitor process from the Windows Start Menu.

 

 

 

ADVANCED FIX:

 

  1. Delete the cache folder again, but do not restart the services yet.
  2. Verify the user is logged on as a Local Administrator account.
  3. Delete the Scans.XML file (will be rebuilt) from WebInspect's ScanData directory:
    • C:\Users\%CURRENTUSER%\AppData\Local\HP\HP WebInspect\ScanData\   (Windows 7 64-bit)
    • Or, C:\Documents and Settings\%CURRENTUSER%\Local Settings\Application Data\SPI Dynamics\WebInspect\#.#\ScanData\
  4. Verify the existence of a "version.txt" file accompanying the Scans.xml file in that same ScanData directory.
    • It can be created by hand by copying the current file contents from another up-to-date WebInspect installation.
  5. Verify that the SQLEXPRESS service is being run by the default service name, "NT AUTHORITY\NetworkService", or one with more permissions.
  6. This error can occur when  a user attempts to "Run As" a limited-use administrative domain user account that is not a Local Administrator such as "Domain\SQLServer2005SQLBrowserUser".
  7. Restart the services for SQL Express and WebInspect and verify the fix.

(From my current WebInspect 16.20 installation, the Version.txt file is actually absent.)

 

In a few cases where the SQL Express instalation failed to solidify its Named User instances setting, these additional items can help correct it.  Bear in mind that you still need to remove the SQL Cache folder with this corrective measure.

Locate and use the SQLCM.EXE CLI tool that comes with SQL Express. Typically located under   C:\Program Files\Microsoft SQL Server\100\Tools\Binn\

 

Connect to the SQLEXPRESS named instance with this command:

  • sqlcmd.exe -S .\SQLEXPRESS
    •       Can possibly use these equivalents in the above command:  localhost\SQLEXPRESS or machine_name_here\SQLEXPRESS
    • Notice that you must run the following as two separate queries, not as a single line entered.   Running them together or just the first one will always respond with  the message, "Configuration option 'user instances enabled' changed from  1 to 1. Run the RECONFIGURE statement to install."  Running them  together will NOT do everything you think it will (SQL Express quirk).
    • Ref:  http://msdn.microsoft.com/en-us/library/ms143684.aspx
sp_configure 'user instances enabled' ,1 ;
go;

reconfigure;
go;

 


-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify

View solution in original post

5 Replies
Admiral Admiral
Admiral

Try clearing the SQL Express cache - you can do that by simply stopping all SQL Express related services and processes and then deleting the folder C:\Users\<your username>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

Restart the SQL Express services (or the machine) and try it again. 

0 Likes
Absent Member.
Absent Member.

Unfortunately, that didn't work. I also added Sql express to the admin group as outlined in this solution:

/t5/WebInspect/Errors-quot-Scan-Initialization-Failed-quot/td-p/2395520

 

Below is the error log from my latest scan attempt.

 

 

2017-02-04 12:43:03,318 ERROR [8 ] SPI.Scanners.Web.Framework.ScanManagerEntryInternal in initialize, exception thrown:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Scan'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.GetScanInfo(String scanFilePath, Boolean bFixingState)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.initialize(ConnectionModeType type, Boolean reInitialize)
ClientConnectionId:562915a1-27f1-42ad-85dd-a84cc5f0ab76
Error Number:208,State:1,Class:16
2017-02-04 12:43:03,606 ERROR [8 ] SPI.Scanners.Web.Framework.ScanManagerEntryInternal in initialize, exception thrown:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Scan'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.GetScanInfo(String scanFilePath, Boolean bFixingState)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.initialize(ConnectionModeType type, Boolean reInitialize)
ClientConnectionId:753db350-a4fa-4ee7-8a7b-d2040a86edc2
Error Number:208,State:1,Class:16
2017-02-04 12:43:03,758 ERROR [8 ] SPI.Scanners.Web.Framework.ScanManagerEntryInternal in initialize, exception thrown:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Scan'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.GetScanInfo(String scanFilePath, Boolean bFixingState)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.initialize(ConnectionModeType type, Boolean reInitialize)
ClientConnectionId:5d31bebc-b8ce-42d7-a401-29ae19898752
Error Number:208,State:1,Class:16
2017-02-04 12:43:03,898 ERROR [8 ] SPI.Scanners.Web.Framework.ScanManagerEntryInternal in initialize, exception thrown:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Scan'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.GetScanInfo(String scanFilePath, Boolean bFixingState)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.initialize(ConnectionModeType type, Boolean reInitialize)
ClientConnectionId:c0153c9c-c2c1-413e-ad4f-eb64df04eded
Error Number:208,State:1,Class:16
2017-02-04 12:43:04,054 ERROR [8 ] SPI.Scanners.Web.Framework.ScanManagerEntryInternal in initialize, exception thrown:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Scan'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.GetScanInfo(String scanFilePath, Boolean bFixingState)
at SPI.Scanners.Web.Framework.ScanManagerEntryInternal.initialize(ConnectionModeType type, Boolean reInitialize)
ClientConnectionId:c6bd9d2b-84b9-4d47-be30-0c7f7659ed33
Error Number:208,State:1,Class:16

0 Likes
Absent Member.
Absent Member.

we are having the same problem.  Logs do not show errors.  Followed Step of deleting SQL Express cache.

0 Likes
Micro Focus Expert
Micro Focus Expert
  • Does your SQL Express service in the Servcies Control Panel show as "SQL Server (SQLEXPRESS)".  This is the default Named User Instance that WebInspect is expecting.  Sometimes when we have included SQL Express within the Webisnpect installer (webinspect_FR.exe for "Full Release"), this Named Instance may be MSSQLEXPRESS, but that will also be accepted.

 

  • Did you install this SQL Express on your own, or was it part of the WebInspect "Full Release" installer (webinspect-FR.exe), which currenlty delivered SQL Express 2012 SP1 in WebInspect 16.20?

 

 

SQL CACHE FOLDER:

 

  • Windows7 & Vista:  C:\Users\%CURRENTUSER%\Appdata\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\      (or ..\MSSQLEXPRESS\)
      • UAC may prevent browsing to this folder, but this can be bypassed by having the user open it by Running "%APPDATA%\..\Local" from  the Windows Start Menu or the Windows Explorer Path field. This command short-cut will open Windows Explorer into their \Local\ folder.

 

  • Windows XP:  C:\Documents and Settings\%CURRENTUSER%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\   (or ..\MSSQLEXPRESS\)

 

 

 

BASIC FIX:

 

To delete the SQL Express Cache folder, it is generally necessary to perform these additional steps:

  1. Exit WebInspect.
  2. Stop these Windows services, if running:
    • "SQL Server (SQLEXPRESS)"   [or "SQL Server (MSSQLEXPRESS)"]
    • "WebInspect Scheduler Service"
    • "AMP Sensor for WebInspect"
  3. Open the Task Manager and locate and "End Process" for any sqlservr.exe processes or sql writer processes listed.
  4. Close the "HPE Fortify Monitor" found in the System Tray, if present.
  5. Delete the SQL Express cache folder.
  6. Restart SQL Express service.
    • If desired, restart the other "WebInspect" named services.
  7. Restart WebInspect and verify functioning (start a new scan, import a scan, or report generation).
    • If desired, restart the HPE Fortify Security Monitor process from the Windows Start Menu.

 

 

 

ADVANCED FIX:

 

  1. Delete the cache folder again, but do not restart the services yet.
  2. Verify the user is logged on as a Local Administrator account.
  3. Delete the Scans.XML file (will be rebuilt) from WebInspect's ScanData directory:
    • C:\Users\%CURRENTUSER%\AppData\Local\HP\HP WebInspect\ScanData\   (Windows 7 64-bit)
    • Or, C:\Documents and Settings\%CURRENTUSER%\Local Settings\Application Data\SPI Dynamics\WebInspect\#.#\ScanData\
  4. Verify the existence of a "version.txt" file accompanying the Scans.xml file in that same ScanData directory.
    • It can be created by hand by copying the current file contents from another up-to-date WebInspect installation.
  5. Verify that the SQLEXPRESS service is being run by the default service name, "NT AUTHORITY\NetworkService", or one with more permissions.
  6. This error can occur when  a user attempts to "Run As" a limited-use administrative domain user account that is not a Local Administrator such as "Domain\SQLServer2005SQLBrowserUser".
  7. Restart the services for SQL Express and WebInspect and verify the fix.

(From my current WebInspect 16.20 installation, the Version.txt file is actually absent.)

 

In a few cases where the SQL Express instalation failed to solidify its Named User instances setting, these additional items can help correct it.  Bear in mind that you still need to remove the SQL Cache folder with this corrective measure.

Locate and use the SQLCM.EXE CLI tool that comes with SQL Express. Typically located under   C:\Program Files\Microsoft SQL Server\100\Tools\Binn\

 

Connect to the SQLEXPRESS named instance with this command:

  • sqlcmd.exe -S .\SQLEXPRESS
    •       Can possibly use these equivalents in the above command:  localhost\SQLEXPRESS or machine_name_here\SQLEXPRESS
    • Notice that you must run the following as two separate queries, not as a single line entered.   Running them together or just the first one will always respond with  the message, "Configuration option 'user instances enabled' changed from  1 to 1. Run the RECONFIGURE statement to install."  Running them  together will NOT do everything you think it will (SQL Express quirk).
    • Ref:  http://msdn.microsoft.com/en-us/library/ms143684.aspx
sp_configure 'user instances enabled' ,1 ;
go;

reconfigure;
go;

 


-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify

View solution in original post

Absent Member.
Absent Member.

Thanks, i didn't know what he FR installer was. I used the FR installer after uninstalling everything we had relating to SQL. The FR installer installed the SQL server and it worked from there.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.