Unable to add eHealth as a data source to Performance Center

Document ID : KB000032763
Last Modified Date : 14/02/2018
Show Technical Document Details

DESCRIPTION:

Unable to fully remove eHealth as a data source from Performance Center. Re-added eHealth data source not successfully binding and syncing.

CONFIGURATION:

eHealth integrated as a data source to Performance Center

DETAILS

eHealth was previously added as a data source to Performance Center.

eHealth was removed as a data source from Performance Center.

unable to successfully re-add eHealth as a data source to Performance Center.

The eHealth data source can be removed from the Performance Center UI, however it still exists in the data_sources2 table in the mysql netqosportal database on the Performance Center system.


SYMPTOMS:

The following is logged to the DMService.log:

The connection to data source <eHealth system> was unexpectedly terminated. The problem may be in either the data source or CAPC.  The following stack trace may indicate where the problem lies.  You may also want to check the logs for the data source to determine if it is the cause of the problem.

javax.xml.ws.WebServiceException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at $Proxy95.pullRequest(Unknown Source)

Caused by: java.net.SocketException: SocketException invoking http://<eHealth system>:<port>/axis2/services/ProductSync2WS: Unexpected end of file from server
at sun.reflect.GeneratedConstructorAccessor38184.newInstance(UnknownSource)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)



The following messages may also be logged to the DMService.log:

ERROR | pool-4-thread-38 | <date and time> | com.ca.im.portal.dm.productsync.DataSourcePoller
|
An error occurred during a sync request with data source <eHealth system>: additional info: enum.datasourceerror.DS_PRODUCT_ID_CHANGED. The following stack trace shows the context of the sync request:
com.ca.im.portal.api.services.interfaces.datasource.DataSourceOp$Exception: enum.datasourceerror.DS_PRODUCT_ID_CHANGED
at com.ca.im.portal.api.services.datasource.DataSourcePoll.pollProductSyncWS(DataSourcePoll.java:149)
at com.ca.im.portal.api.services.datasource.DataSourcePoll.poll(DataSourcePoll.java:92)
at com.ca.im.portal.dm.productsync.PullSyncPhaseTask.pollDataSource(PullSyncPhaseTask.java:87)
at com.ca.im.portal.dm.productsync.PullSyncPhaseTask.execute(PullSyncPhaseTask.java:64)
at com.ca.im.portal.dm.productsync.SyncPhaseExecutor$MakeDSSyncPhaseCallable$1.call(SyncPhaseExecutor.java:100)
at com.ca.im.portal.dm.productsync.SyncPhaseExecutor$MakeDSSyncPhaseCallable$1.call(SyncPhaseExecutor.java:93)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

CAUSE:

eHealth was previously integrated with Performance Center as a data source and was removed via the Delete Data Source option in Performance Center. eHealth was not unregistered before attempting to re-add it as a data source. There was a left-over entry in the Performance Center netqosportal database's data_sources2 table.



SOLUTION:

1. Verify that ehealth is not connected to a different CAPC:

select * from nh_metadata where subject_area = 'NPC';

*The value of NpcWebSiteHost should be Ip of CAPC machine.

2. Clear out CAPC entries from the ehealth database:

delete from nh_metadata where subject_area = 'NPC';

3. In the CAPC mysql netqosportal database, check to see if items still exist for the old data source:

select * from data_sources2 where sourcetype = 32;

4. Check ds_items for items with the id of the old ehealth data source (use the sourceid value from the previous query):

setect * from ds_items where sourceid=9;

No items should be found. We don't want to add eHealth back if all the same items are already there.

5. If no items for ehealth are found, remove the ehealth row from data_sources2 table:

delete from data_sources2 where sourcetype = 32 and sourceid=9;

6. Add the ehealth data source via the CAPC UI.

*If the eHealth data source starts synching, but get into a loop where it bounces between Binding, Synchronizing and Synchronization failed, perform the following additional steps to set Connection = "close" (versus "keep-alive"):

7. Backup the config file:

      cp /opt/CA/PerformanceCenter/DM/webapps/dm/META-INF/spring/webservices.xml /opt/CA/PerformanceCenter/DM/webapps/dm/META-INF/spring/webservices.xml.orig

8. Open the following config file in an editor:

         /opt/CA/PerformanceCenter/DM/webapps/dm/META-INF/spring/webservices.xml
       
         ...and change this...

         <http:conduit name="*.http-conduit">
            <http:tlsClientParameters disableCNCheck="true" />
            <http:client ReceiveTimeout="${web.cxf.client.services_timeout}"/>
        </http:conduit>

        ...to this (adds 'Connection="close"' to http:client element)...

         <http:conduit name="*.http-conduit">
            <http:tlsClientParameters disableCNCheck="true" />
            <http:client ReceiveTimeout="${web.cxf.client.services_timeout}" Connection="close"/>
        </http:conduit>

9. Restart the CAPC services:

        /etc/init.d/caperfcenter_console stop
        /etc/init.d/caperfcenter_eventmanager stop
        /etc/init.d/caperfcenter_sso stop
        /etc/init.d/caperfcenter_devicemanager stop

        /etc/init.d/caperfcenter_devicemanager start
        /etc/init.d/caperfcenter_sso start
        /etc/init.d/caperfcenter_eventmanager start
        /etc/init.d/caperfcenter_console start


After this change, the eHealth data source should sync successfully