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

Hyperic HQ

Agent will not start in certain environments on solaris

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 4.5.1
  • Fix Version/s: 4.6
  • Component/s: Agent / PDK
  • Environment:
    solaris 10
  • Case Links:
    none
  • Regression:
    No
  • Tags:

Description

While testing tc Server we stumbled upon an issue that cause the agent not to start, see https://issuetracker.springsource.com/browse/TCSRV-1245

Quick Summary:
The "tr" command being used "uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]" does not work unless 1) the locale is set in the environment 2) the locale is set to something other then the UTF-8 locale.
It will give the user "Bad String" as the result.

Note: As long as LC_CTYPE environment variable on solaris was set to a locale other than UTF-8 "tr" command worked fine.

We can remove the locale requirement if we change the command in the agent to: uname -s | tr "[A-Z]" "[a-z]" |tr -d ' '

I have not tested this on every platform, but I did test on Mac OSX, and solaris, and it worked fine without the locale set.

I am not saying this needs to be done, but it is something we should be aware of and that we can probably avoid this issue completely, by changing to the other command and testing the other platforms.

Issue Links

Activity

Hide
Jason Konicki added a comment -

I just noticed that this support ticket had the exact same problem and the ticket was report incomplete. Maybe we should inform this customer?

Show
Jason Konicki added a comment - I just noticed that this support ticket had the exact same problem and the ticket was report incomplete. Maybe we should inform this customer?
Hide
Jason Konicki added a comment -

moved to 4.6

Show
Jason Konicki added a comment - moved to 4.6
Hide
Jason Konicki added a comment -

Removed the dependency on locale by changing "tr [:upper:] [:lower:] | tr -d [:blank:]" to "tr "[A-Z]" "[a-z]" |tr -d ' '" in the hq-agent.sh script.

Show
Jason Konicki added a comment - Removed the dependency on locale by changing "tr [:upper:] [:lower:] | tr -d [:blank:]" to "tr "[A-Z]" "[a-z]" |tr -d ' '" in the hq-agent.sh script.
Hide
Frederic Calindas added a comment -

Verified with Hyperic Server Daily Build 4.6.0-EE-254 (7/29/11) and Hyperic Agent Daily Build 4.6.0-EE-256 (7/29/11).

Set LC_CTYPE to UTF-8 and started agent.

Display and wrapper.log showed: 'couldn't set locale correctly' but agent started successfully.

Checking status shows:
bash-3.00$ ./hq-agent.sh status
couldn't set locale correctly
couldn't set locale correctly
pargs: Couldn't determine locale of target process.
pargs: Some strings may not be displayed properly.
HQ Agent is running (PID:25163).

Show
Frederic Calindas added a comment - Verified with Hyperic Server Daily Build 4.6.0-EE-254 (7/29/11) and Hyperic Agent Daily Build 4.6.0-EE-256 (7/29/11). Set LC_CTYPE to UTF-8 and started agent. Display and wrapper.log showed: 'couldn't set locale correctly' but agent started successfully. Checking status shows: bash-3.00$ ./hq-agent.sh status couldn't set locale correctly couldn't set locale correctly pargs: Couldn't determine locale of target process. pargs: Some strings may not be displayed properly. HQ Agent is running (PID:25163).

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    2 years, 37 weeks, 6 days ago