Monday, March 4, 2013

Killing a Windows Service that Seems to be Hanged on Stopping or Starting

Windows Services can sometimes stuck in the stopping or starting state. I have faced this issue with IBM Datacap Server services in development environment.  Rebooting workstation clears the problem. But following can be done to kill  hanged service and avoid reboot workstation or server.


  • Get the Service Name. Go to Services(Run--> services.msc)
       


  • Find out the Process ID using sc queryex on the Windows Service.
                    C:\Users\Admin>sc queryex DCTMS
    SERVICE_NAME: DCTMS
                    TYPE                  : 10  WIN32_OWN_PROCESS
                    STATE               : 3  STOP_PENDING
                                                      (STOPPABLE, PAUSABLE, IGNORES_SHUTDOWN)
                   WIN32_EXIT_CODE      : 0  (0x0)
                   SERVICE_EXIT_CODE  : 0  (0x0)
                   CHECKPOINT        : 0x0
                   WAIT_HINT          : 0x0
                   PID                           : 4716
                   FLAGS                     :
  • The Process ID is 4716.  So now we can issue the taskkill /F command on the process.
         Note: in Windows 2008, if we are not running the command prompt with ‘run as administrator’, we  
         will get an access denied error on the delete.
            
              C:\Users\Admin>taskkill /f /pid 4716
   SUCCESS: The process with PID 4716 has been terminated.

         

Friday, March 1, 2013

Unable to stop WAS application server


Problem

IBM WebSphere application Server(WAS) failed to stop. When you stop the Websphere server by clicking stop server shortcut on desktop, it looks like server is stopped. But you still see the server1.pid file at below location - E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1. That means server is still running.


The following errors are logged in stopServer.log, which is WAS log file.

[23/09/11 16:39:40:751 CEST] 0000000a WsServerStop  E   ADMU3002E: Exception attempting to process server server1
[23/09/11 16:39:40:751 CEST] 0000000a WsServerStop  E   ADMU3007E: Exception com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: The system cannot create a SOAP connector to connect to host <ServerName> at port 9080with SOAP connector security enabled.
[23/09/11 16:39:40:751 CEST] 0000000a WsServerStop  A   ADMU3007E: Exception com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: The system cannot create a SOAP connector to connect to host <ServerName> at port 9080 with SOAP connector security enabled.
                at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:486)
                …
                ... 27 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found]
                …
                ... 32 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found]
                …
                ... 33 more

[23/09/11 16:39:40:767 CEST] 0000000a AdminTool     A   ADMU0509I: The server "server1" cannot be reached. It appears to be stopped.
[23/09/11 16:39:40:767 CEST] 0000000a AdminTool     A   ADMU0211I: Error details may be seen in the file: E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\stopServer.log
[23/09/11 16:39:40:939 CEST] 00000016 WindowsServic 3   inputRec == Service failed to stop.  stopServer return code -10
[23/09/11 16:39:40:939 CEST] 0000000a WindowsServic 1   retCode from childProcess.waitFor() is -10
[23/09/11 16:39:40:939 CEST] 0000000a WindowsServic 3   -- interrupt the thread that is collecting stdout
[23/09/11 16:39:41:939 CEST] 00000014 WindowsServic 3   readAndDisplayServiceLogFile(), caught InterruptedException
[23/09/11 16:39:41:939 CEST] 0000000a WindowsServic 3   exitCode = -10
[23/09/11 16:39:41:939 CEST] 0000000a WindowsServic 3   Service failed to stop.  stopServer return code -10



Cause

With WAS 6.1 or later, self-signed certificate will automatically be updated, and when user executes any administration commands after the update, the following message will be displayed.

----------------------------------------------------------------
*** SSL SIGNER EXCHANGE PROMPT ***
SSL signer from target host testserver.ibm.com is not found in trust
store /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/etc/trust.p12.

Here is the signer information (verify the digest value matches what is
displayed at the server):

Subject DN: CN=testserver.ibm.com, O=IBM, C=US
Issuer DN: CN=testserver.ibm.com, O=IBM, C=US
Serial number: 1192512730
Expires: Wed Oct 15 14:32:10 JST 2008
SHA-1 Digest:
D3:4F:52:C1:17:54:C3:58:0E:07:D3:BD:4E:0E:5A:ED:4A:F8:59:08
MD5 Digest: 7B:2F:22:F6:85:EF:CE:08:D6:83:62:AB:61:E1:EC:BF

Add signer to the trust store now? (y/n)
----------------------------------------------------------------

If user manually executes stopServer command on DOS console to stop WAS application server, since he can see the message, he would be able to stop the application server by answering "y" to the message.
However if user tried to stop using Windows' "Service" GUI or a bach program which calls stopServer.bat so on, he didn't have a chance to see the message.


Resolving the problem

Run one of the following WAS admin commands to display the message so that you can accept to add signer to the trust store. After that, the message will not be displayed.
  • serverStatus
  • stopServer
  • stopManager
  • stopNode
  • wsadmin

1.      Open command prompt and go to following location.
E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\bin
2.      Then execute following batch file
serverStatus.bat server1
3.      Pop will come up asking for log in credentials for WAS Admin user


Followings is complete output on command prompt


E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>serverStatus.bat
server1
ADMU0116I: Tool information is being logged in file E:\Program
           Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\serverSt
atus.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU0500I: Retrieving server status for server1

*** SSL SIGNER EXCHANGE PROMPT ***
SSL signer from target host null is not found in trust store E:/Program Files/IB
M/WebSphere/AppServer/profiles/AppSrv01/etc/trust.p12.

Here is the signer information (verify the digest value matches what is displaye
d at the server):

Subject DN:    CN=<servername.Domain.comt, O=IBM, C=US
Issuer DN:     CN=<servername.Domain.comt, O=IBM, C=US
Serial number: 1315078236
Expires:       Sun Sep 02 21:30:36 CEST 2012
SHA-1 Digest:  AB:F9:9A:64:97:00:58:BC:B3:BE:1F:81:72:46:D5:38:00:A4:A6:B9
MD5 Digest:    CE:5C:DF:20:B5:E4:C9:64:F3:91:70:00:BF:E2:BF:27

Add signer to the trust store now? (y/n) y
A retry of the request may need to occur if the socket times out while waiting f
or a prompt response.  If the retry is required, note that the prompt will not b
e redisplayed if (y) is entered, which indicates the signer has already been add
ed to the trust store.
ADMU0508I: The Application Server "server1" is STARTED

E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>

Tuesday, February 26, 2013

IBM Datacap Taskmaster Capture- Installation and Configuration

Pre-Requisites 

Microsoft Internet Information Services and Microsoft .NET Framework

If you are going to install one or more of the Taskmaster web server components (Taskmaster Web, RV2, Fingerprint Service, or Taskmaster Web Services), Microsoft Internet Information Services (IIS) should be installed prior to Microsoft .NET Framework 3.5.1. If IIS is installed after .NET, you must run Microsoft's ASP.NET IIS Registration Tool (aspnet_regiis.exe) with the installation parameter (-i) to update the ASP.NET application script maps to point to the appropriate ASP.NET ISAPI version.

To determine whether IIS and .NET are already installed:

  1. From the WebServer's WindowsStartmenu, selectAdministrative Tools>Server Manager.
  2. In the Server Manager hierarchy pane, expandRoles. The Web Server (IIS)role should be visible.
  3. To determine whether the Microsoft .NET Framework 3.5.1 is installed, expand the Features Summary. An entry for the Microsoft .NET Framework 3.5.1 feature should be displayed.
  4. Depending on whether either or both are installed, do one of the following:
    • If neither .NET nor IIS is displayed, install IIS, then install Microsoft .NET Framework 3.5.1, and then continue with the Taskmaster installation process.
    • If both .NET and IIS are displayed, runaspnet_regiis.exe, then continue with the Taskmaster installation process.
    •  If only IIS is displayed, install Microsoft .NET Framework 3.5.1, and then continue with the Taskmaster installation process.
    • If only .NET is displayed, install IIS, then runaspnet_regiis.exe, then continue with the Taskmaster installation process.

      • On the Windows Start menu, right-click the shortcut for the command prompt window and selectRun as administrator.
      • 2. Run theaspnet_regiis.exewith the -i parameter, using the entire path, for example: C:\>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i C:\>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i 
      • Progress messages are displayed indicating the start and completion of the installation. Some times you will not find v4.0.30319 folder. This is because you have not installed yet  Microsoft .NET Framework 4.0. (It will be installed automatically during Datacap installation) 

Procedure to Install IIS on Windows 2008 R2

  1. Click Start, point to Administrative Tools and then click Server Manager.
  2. In Roles Summary, click Add Roles.
  3. Use the Add Roles Wizard to add the Web server role.Select following options

Procedure to Install .NET Framework 3.5.1

  1. Click Start, point to Administrative Tools and then click Server Manager.
  2. In the Server Manager interface, click Features to display all the installed Features in the right hand pane. Verify that .NET Framework 3.5.1 is listed. If not then in Server Manager interface, select Add Features to displays a list of possible features.
  3. In the Select Features interface, expand .NET Framework 3.5.1 Features.
  4. Once you expand .NET Framework 3.5.1 Features, you will see two check boxes. One for .NET Framework 3.5.1 and other for WCF Activation. Check the box next to .NET Framework 3.5.1 and click Next.
  5. In the Confirm Installation Selections interface, review the selections and then click Install.
  6. Allow the installation process to complete and then click Close.

Microsoft .NET Framework 4.0

Computers running IBM Datacap Taskmaster Capture software components require Microsoft .NET Framework 4.0. If Microsoft .NET Framework 4.0 is not already installed, it will be installed automatically during the Taskmaster software installation process.
You can install Microsoft .NET Framework 4.0 on your servers and workstations before installing  Taskmaster to shorten the time required for the Taskmaster installation.

Installing & configure Taskmaster on a single machine

Install Taskmaster Server

  • Run Datacap installation Setup
  • Select the appropriate language, then clickOK.
  • When additional, distributed software is required, the InstallShield Wizard displays a list of the items to be installed, click Install.
         









  • ClickNext
  • Accept the license agreement and click Next.
  • Select the Custom option. Then click Next.
  • Include all of the Taskmaster software components.
         
Components













  • Expand the Taskmaster Client software component and include only the separately licensed applications for which you have a license.
  •  Expand the Connectors software component and include only the connectors for which you have a license.
  • Click Next.
  • Click Install.
  • Click Finish.
       

Generating and exporting the encryption keys

  1. Open a command prompt and navigate to theC:\Datacap\Taskmaster folder.
  2. Run the key management program,dcskey.exe as below.
  3. This will export the encryption keys from the local keystore to adc_KTF.xml key transport file.
        

    



 Installing and configuring Taskmaster Web

  • From the Windows Start menu, selectAll Programs>Datacap>Administrator>Taskmaster Web>Taskmaster Web Server Configuration
         
  • If not found then check prerequisites
     

  • Click Configure

        

  •  Click OK, then click Exit. The Taskmaster Web site has been created
  • Go to Administrative Tools, then double-click Internet Information Services (IIS) Manager.
  • In the Connections pane, expand the computer node, expand the Sites node,and expand the Default Web Site. The tmweb.net site is displayed. If it is not displayed, right-click the site and select Refresh.
  • In the Application Pools pane, select the tmweb.net application pool, then in the Actions pane, in the Edit Application Pool section, click Advanced Settings.  
  • In the Process Model section, click the browse button to the right of Identity.
  • In the Application Pool Identity window, change the Built-in account to Local System, then click OK.
  • In the Process Model section, set Load User Profile to True.
  • Click OK.
  • In the Connections pane, expand the Sites node, and expand the Default Web Site.
  • Select the tmweb.net site, and in the middle pane, double-click Session State.
  • Under Cookie Settings, change the Nameto tmwebor another unique name, then, in the Actions pane, click Apply.
       

  • In the Connections pane, select the Default Web Site, then, in the Actions pane, under Manage Web Site, click Restart.



 Configure Internet Explorer

  • From the Windows Start menu, select All Programs>Datacap> Administrator>Taskmaster Web>Taskmaster Web Client Configuration.
         
  • Ensure that http://localhost is the default URL that is displayed.
       
  • Click Configure.
       
  • Click OK, then click Exit.
  • Start Internet Explorer and enter the URL for Taskmaster Web followed by the tmweb.net virtual directory and the test page:http://localhost/tmweb.net/ietest.aspx, then press <Enter>.
  • Click Test. The red Xs will change to green check marks when the test completes successfully. If the Datacap TIFF Viewer does not download, switch to the 32-bit version of Internet Explorer and repeat this procedure from step 1.


IBM Datacap - Requirements Gathering


Requirements Gathering

Following are some guidelines to identify the application requirements and the details to design the capture system or solution using IBM Datacap Taskmaster Capture.

Requirements are classified into following sections... 
ü  Current capture or document processing environment
ü  Physical locations that receive and process documents
ü  Types of documents, their characteristics, and the data they contain
ü  Business rules that validate whether the data is valid
ü  Document volumes and time constraints
ü  Business requirements for dealing with exceptions
ü  Output requirements for data and documents
ü  Scanner requirements
ü  Hardware and software requirements

1.       Requirements for current capture or document processing environment

a.       Scanning

With this, you discover the characteristics and details of the business processes and systems that are currently in place. Identify the scanning requirements:
Ø  Are paper documents currently being scanned?
Ø  At what point in the business process are they scanned: upon arrival, in the middle of the process, at the end of the process, or a mixture?
Ø  What equipment and software are being used to scan the documents?
Ø  Will the current equipment be replaced, or will it be used with the new system?
Ø  Can the scanners handle the projected peak volumes based on comparing the scanner specifications to the scan volume?
Ø  Will the scanner handle de-skewing and noise removal?
Ø  For each location, will scanning be done by using thick-client ISIS or thin-client TWAIN scanner drivers? (The preferred practice is to test a specific scanner interface, driver, and scan hardware in a test environment.)
Ø  What happens to the paper documents after they are processed? Are they stored on-site, returned, stored off-site, or destroyed?
Ø  Will the new system change the way paper documents are handled after they are scanned?

b.      Processing

By explicitly documenting the current processes, you can identify the specific areas of process improvement.
Ø  How many people “touch” the document from arrival to completion, and in which departments or locations do these people work?
Ø  What is the current document handling process?
Ø  Are documents processed centrally or at remote locations?
Ø  How many people are involved in processing documents?
Ø  Which processing is currently being performed?
– Receiving documents, logging, counting, batching, and date-stamping
– Sorting documents for filing and distribution
– Preparing file folders
– Filing documents
– Distributing files or documents for processing
– Photocopying for distribution
– Manual typing of data
– Retrieving files from file cabinets
– Searching through files to find documents
– Matching documents against exceptions reports
– Refiling documents and files
– Pending or suspense file management
– Keeping calendars or diaries to track follow-up documents
– Searching for misplaced or lost files
– Reconstructing lost files
– Purging files and removing selected documents for disposition
– Transporting documents to and from storage rooms or off-site storage
– Filing internal forms or copies of correspondence

c.       Policies and systems currently in place

Identify the policies and systems that are currently in place:
Ø  Has our organization approved the destruction of original paper documents following scanning?
Ø  What systems are used for tracking and inventory of paper documents and files?
Ø  What ECM or other systems are currently involved in the current scanning or capture operation?

d.      Time frames

Identify the requirements regarding time constraints:
Ø  How long does it take for a document to be processed from arrival to completion?
Ø  Are there significant differences in time depending on document type? If yes, identify the differences.
Ø  What steps in the process take longer than desired?

2.       Processing location requirements

a.       Physical documents

Identify the requirements for physical documents:
Ø  How many physical locations create or receive physical documents?
Ø  Are the physical documents processed in the location where they are received, or are they moved to a central location for processing?
– How are they moved: by mail, internal courier, or external courier?
– Are photo or scanned copies made before they are moved?

b.      Electronic documents

Identify the requirements for electronic documents:
Ø  How many physical locations create or receive electronic documents?
Ø  Are the electronic documents processed in the location where they are received, or are they moved to a central location for processing?
– How are they moved: by email, electronic media, file copying, or file transfer?
– Are copies made before they are moved?

3.       Document type requirements

The questions in this section help to identify the documents types, how they are created, and their characteristics. You must identify and gather single and multiple page samples of all document types.
Identify the requirements for document type:
Ø  What are the document types and any subtypes, that we process? Consider the following examples:
– Packing slips for complete, partial, back ordered shipments
– Invoices, including purchase order invoices, non-purchase order invoices, preapproved invoices, trade     Invoices, non-trade invoices, and credit memos
– Attachments, including shipping confirmation notices and acknowledgement of receipt forms
– Loan applications, including the application form type by form number
– Insurance claim, such as the claim form by form number
– Tax forms, including the form number and year
Ø  Who creates the documents?
Ø  Can the design of the documents be changed if necessary to increase recognition accuracy?
Ø  If documents are created by external parties, approximately how many sources are involved?
Ø  What is the input source for each type of document: scanner, fax, email, or other systems?
Ø  For each type of document, does it have a fixed number of pages or a variable number of pages?
Ø  What is the number of pages per document?
Ø  For images, what is the image resolution and format (black and white, color, gray scale)?
Ø  What is the input file format for electronic documents?
Ø  Do documents contain more than one business transaction?
Ø  Do people stamp, mark up, or write on documents as they are processed?

4.       Captured data requirements

With this information, you can determine the data recognition requirements and other aspects of handling the data, including validations, lookups, verification, indexing, and data entry.
Identify the requirements for captured data:
Ø  What fields should be manually entered at the batch level (for example, Scan Date, Expected Number of Documents, or Expected Number of Pages)?
Ø  What fields should be captured at the document level (for example, Invoice Number, Invoice Date, or Invoice Total)?
Ø  What fields should be captured at the line item detail level (for example, Item ID, Item Quantity, or Item Price)?
Ø  For each document type, is data primarily machine printed or hand printed?
Ø  For hand printed documents, is the print constrained or unconstrained?
Ø  Are there pages that do not have data that must be recognized, such as attachment pages? It is common for forms to have instruction pages that are scanned but that do not have data on them.
Ø  How is data located on the pages where you need to use recognition to read the data?
– Fixed form layout. Fields are on specific zones where the location can be used to find the data.
– Variable form layout. Fields have text labels where a search for the text label can locate the field.
– Data is contained in a barcode.
Ø  Is data validated by using an external database?
Ø  What are the business rules for validating the values of the fields?
Ø  Do fields have lists of valid values?
Ø  Is it data optional or required?
Ø  Does the data printed on the page conform to a repeatable pattern? (For example, Credit Memo Number startswith the letters CR followed by six numerics, a hyphen, and three numerics.)

5.       Verification requirements

Verification intersects users with the documents. You must understand where these users are located and what tasks they are authorized to perform on each type of document. Business rules need to be applied that might mirror existing practices for handling paper-based data entry. Verification might also be desired as a quality control step to ensure that every image is readable.
Identify the requirements for verification:
Ø  Will verification be handled in a central location or from remote locations?
Ø  Are there business rules or policies that will require multiple verification steps?
Ø  Who will perform verification?
Ø  Does verification need to restrict access to specific document types by different groups of users?
Ø  Do we need to display every document or page or can we display only documents or pages were we have exceptions?
Ø  Will some documents require manual page identification by an operator?
Ø  Based on the information gathered on input documents, captured data, and export requirements, how should low confidence data, invalid data, unidentified documents, and incorrectly identified pages be handled?
Ø  When recognition results are high confidence, do you want an operator to view the document anyway?
Ø  Do operators need to visit all fields with low confidence characters?
Ø  Under which circumstances can the operator split out a document from the batch to finish processing the other valid documents in the batch? How should the split-out documents be handled?
Ø  Should operators be able to mark document for deletion (documents will not be exported)?
Ø  Should deletion trigger a follow-up process or automatic notification?

6.       Export requirements

Identify the format, content, and target system or systems of the data and images for export:
Ø  What is the document format for the exported documents for each type of document: TIFF, PDF, PDF with text, PDF/A, original input format, or other?
Ø  Is the original image or the enhanced image used for export?
Ø  Are color and gray scale images to be exported as color and gray scale?
Ø  Is a specific file naming convention needed for the exported document?
Ø  What are the document properties of the exported documents?
Ø  Do the images have areas that need to be redacted?
Ø  What are the target application systems for the exported data?
Ø  What are the interfaces that are available in the target systems for ingesting the data?
Ø  What data fields are exported to target application systems?
Ø  Does the data need to be reformatted to accommodate the needs of the target application?

7.       Volume and timing requirements

You must size and appropriately install and configure various Taskmaster components (remote/local clients, background processing, Fingerprint Service, Fingerprint Maintenance Tool). To assist with this task, create a matrix based on the following information:
Ø  Sources of input
Ø  Input volumes for each source
Ø  Approximate number of unique documents (number of fingerprints)
Ø  Peak periods
Ø  Timing (processing windows) requirements

Identify the volume and time requirements:

Ø  What are the input sources: scanner, fax, email, or other systems?
Ø  How many document or image files are processed per day from each source?
Ø  How many documents per document type are processed per day?
Ø  For highly variable documents, such as invoices, how many different document formats are processed?
Ø  What is the peak volume of documents and image files? Are there peak processing cycles daily, weekly, monthly, or annually?
Ø  Are there peak volume requirements per day, or are there specific service level agreements about how quickly documents will be processed?
Ø  Do existing paper files need to be scanned (backfile)? Quantify the volume and time frame for digitizing. Are the processing requirements different for historical documents compared to new documents?
Ø  Is the ability to prioritize batches or to change the sequence in which the batches are processed required?
Ø  What are the availability requirements for the system?

8.       Administration requirements

Ø  What are the production reporting requirements? Compare Taskmaster standard reports to determine if custom reports formats are needed.
Ø  What information needs to display for job monitoring? Compare Taskmaster monitoring views to determine if additional fields are required.
Ø  What is the organization model for administering the system?
Ø  What are the security requirements for authentication?