Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

HQApi

Intermittent failures in ResourceApi.createService()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Case Links:
    none

Description

Creation of services through the HQApi CLI can fail intermittently. This appears to be a regression introduced in HQ 4.5. Stacktrace:

org.hyperic.hq.appdef.shared.PlatformNotFoundException: platform for service 16771 not found
at org.hyperic.hq.appdef.server.session.PlatformManagerImpl.getPlatformByService(PlatformManagerImpl.java:1086)
at sun.reflect.GeneratedMethodAccessor1453.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

(full stack will be attached)

Activity

Hide
Ryan Morgan added a comment -

I've been able to reproduce this about 10-15% of the time. I've also been able to bypass this error by replacing the PlatformDAO.findByServiceId call with ServiceDAO.get(id).getServer().getPlatform(). So it would appear the issue is related to the server's service collection.

We're not sure why yet, but it would appear that fixing HHQ-4560 also fixes this issue.

Show
Ryan Morgan added a comment - I've been able to reproduce this about 10-15% of the time. I've also been able to bypass this error by replacing the PlatformDAO.findByServiceId call with ServiceDAO.get(id).getServer().getPlatform(). So it would appear the issue is related to the server's service collection. We're not sure why yet, but it would appear that fixing HHQ-4560 also fixes this issue.
Hide
Ryan Morgan added a comment -


Fixed by HHQ-4560

Show
Ryan Morgan added a comment - Fixed by HHQ-4560
Hide
Frederic Calindas added a comment -

Verified with 4.5.1.2-EE-19 on RHEL 5.4 x64 with MySQL 5.1.46-community using provide HQAPI 4.1.0.M1.

Created similar scripts on two systems (4.5 and 4.5.1.2):

$HQAPI resource createService --resourceId <RESOURCEID> --host=<HOST> --user=hqadmin --password=hqadmin --name "Create Service $i" --prototype=HTTP – sotimeout=10 port=80 path=/opt/create/service/$i hostname=${HOSTNAME} pattern=HTTP method=GET

On 4.5 environment, looped script to run multiple times; able to reproduce reported issue:

Error running command: Error creating 'Create Service X': platform for service XXXXX not found

This was easily reproducible in various runs.

On 4.5.1.2 environment, looped script several times including up to 200 count. Unable to reproduce reported error.

Show
Frederic Calindas added a comment - Verified with 4.5.1.2-EE-19 on RHEL 5.4 x64 with MySQL 5.1.46-community using provide HQAPI 4.1.0.M1. Created similar scripts on two systems (4.5 and 4.5.1.2): $HQAPI resource createService --resourceId <RESOURCEID> --host=<HOST> --user=hqadmin --password=hqadmin --name "Create Service $i" --prototype=HTTP – sotimeout=10 port=80 path=/opt/create/service/$i hostname=${HOSTNAME} pattern=HTTP method=GET On 4.5 environment, looped script to run multiple times; able to reproduce reported issue: Error running command: Error creating 'Create Service X': platform for service XXXXX not found This was easily reproducible in various runs. On 4.5.1.2 environment, looped script several times including up to 200 count. Unable to reproduce reported error.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    3 years, 13 weeks ago