- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- SSH problem with servicegard
Operating System - Linux
1748176
Members
4280
Online
108758
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2010 03:26 AM
тАО11-05-2010 03:26 AM
SSH problem with servicegard
Hi all,
Have a strange problem with SAP extension with serviceguard which I am confident relates to ssh.
Basically the cluster runs a remote script via ssh to start the Application instance on the remote node. The issue I believe is environment. It for example needs the path /usr/sap/SWP/SYS/exe/run set. This is not happening and I believe this to be the issue. When I run a remote command to the application server to simply give me the env output it is not the same as when you su to the user on the box.
On a cluster that is working I get the correct output. The specific SAP user is running csh shell and as I say if I login as that user all is fine so it must relate to the files ssh uses to set env. On the other cluster the same ssh command to give me the env output gives me the same as if I logged in i.e the DIR_LIBRARY is set as expected.
Any help would be appreciated.
Have a strange problem with SAP extension with serviceguard which I am confident relates to ssh.
Basically the cluster runs a remote script via ssh to start the Application instance on the remote node. The issue I believe is environment. It for example needs the path /usr/sap/SWP/SYS/exe/run set. This is not happening and I believe this to be the issue. When I run a remote command to the application server to simply give me the env output it is not the same as when you su to the user on the box.
On a cluster that is working I get the correct output. The specific SAP user is running csh shell and as I say if I login as that user all is fine so it must relate to the files ssh uses to set env. On the other cluster the same ssh command to give me the env output gives me the same as if I logged in i.e the DIR_LIBRARY is set as expected.
Any help would be appreciated.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 01:42 AM
тАО11-09-2010 01:42 AM
Re: SSH problem with servicegard
Well, sshd certainly provides an initial PATH setting for a SSH session, but in HP-UX, it's normally immediately overwritten by /etc/profile or /etc/csh.login. Both of those read the new setting from /etc/PATH.
The first question would be: exactly where and how are the necessary environment variables set in the working case?
You mentioned the SAP user uses the csh shell.
Does /etc/csh.login include everything that /etc/profile does (or the appropriate equivalents)? How about /etc/csh.cshrc? And the user-specific login scripts: since csh does not execute .profile, does the SAP user's ~/.login and/or ~/.cshrc do everything required?
What is the exact syntax of your su command? "su sapuser" or "su - sapuser"? If you use the first form, some variables that are set in the environment of the original user will "leak" to the SAP user's environment (intentionally or otherwise).
If you haven't tried "su - sapuser", try it now; I think it might fail just like when trying to use ssh. In that case, double-check your csh login scripts: make sure they will initialize everything SAP requires.
If "su - sapuser" works but SSH fails, be aware that SSH by default won't allocate a TTY for the connection at the remote side if you supply it with a remote command. This will often cause parts of login scripts to be skipped.
Try adding option "-t" to your SSH command line... or maybe even "-tt", since if the cluster runs the remote command, the client end of the SSH command might not have a TTY either.
MK
The first question would be: exactly where and how are the necessary environment variables set in the working case?
You mentioned the SAP user uses the csh shell.
Does /etc/csh.login include everything that /etc/profile does (or the appropriate equivalents)? How about /etc/csh.cshrc? And the user-specific login scripts: since csh does not execute .profile, does the SAP user's ~/.login and/or ~/.cshrc do everything required?
What is the exact syntax of your su command? "su sapuser" or "su - sapuser"? If you use the first form, some variables that are set in the environment of the original user will "leak" to the SAP user's environment (intentionally or otherwise).
If you haven't tried "su - sapuser", try it now; I think it might fail just like when trying to use ssh. In that case, double-check your csh login scripts: make sure they will initialize everything SAP requires.
If "su - sapuser" works but SSH fails, be aware that SSH by default won't allocate a TTY for the connection at the remote side if you supply it with a remote command. This will often cause parts of login scripts to be skipped.
Try adding option "-t" to your SSH command line... or maybe even "-tt", since if the cluster runs the remote command, the client end of the SSH command might not have a TTY either.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 11:01 AM
тАО11-09-2010 11:01 AM
Re: SSH problem with servicegard
Yes, very often you'll need to call your environment setting scripts before you try to run your commands that start/stop the environments.
So, figure out which scripts aren't being run and you'll have to run them prior to whatever commands bring up and down the server.
In ksh, the command to run a scripts is just a "." by itself on a line, which will make the commands in the script run as if they were being in the current command shell.
for example:
. /home/SAPADM/bin/environment_set
Then, you can run your commands to actually start/stop things.
In csh, the command is "source"
for example:
source /home/SAPADM/bin/environment_set
Then, you can run your commands to actually start/stop things.
So, figure out which scripts aren't being run and you'll have to run them prior to whatever commands bring up and down the server.
In ksh, the command to run a scripts is just a "." by itself on a line, which will make the commands in the script run as if they were being in the current command shell.
for example:
. /home/SAPADM/bin/environment_set
Then, you can run your commands to actually start/stop things.
In csh, the command is "source"
for example:
source /home/SAPADM/bin/environment_set
Then, you can run your commands to actually start/stop things.
We are the people our parents warned us about --Jimmy Buffett
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP