- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell/tcp: Unknown Service error in script...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
08-07-2001 05:04 AM
08-07-2001 05:04 AM
shell/tcp: Unknown Service error in script...
remsh to host, run command.
remsh to different hosts, run different command
When run on the command line this works fine. When each command is run seperately in cron it works fine. When run together under cron the first remsh succeeds, the second returns 1 and the error: "shell/tcp: Unknown Service"
In checking around, the only info I see on Unknown Service errors has to do with the /etc/services file (logically enough,) unfortunately the services file on both machines are fine, as is the one on the executing host. Anyone run into something similar?
-Timothy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 05:18 AM
08-07-2001 05:18 AM
Re: shell/tcp: Unknown Service error in script...
When you run the commands together how do you do it? ie
remsh machinea
or
remsh machinea
remsh machineb
I also suggest you put some logging in the script & cron i.e in cron
? ? ? ? ? path_to_script >> /tmp/logfile 2>&1
in the script
put after each command
echo "cmd: ?? $?" >> /tmp/logfile
This may help
Good luck
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 05:28 AM
08-07-2001 05:28 AM
Re: shell/tcp: Unknown Service error in script...
script which is going to run from cron requires a full path i.e
/usr/bin/remsh client1 /usr/bin/date
/usr/bin/remsh client2 /usr/sbin/swlist
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 05:31 AM
08-07-2001 05:31 AM
Re: shell/tcp: Unknown Service error in script...
Check out the paths in your script with the command. Here is a post that will help you out:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x026746ff9277d511abcd0090277a778c,00.html
If this doesnt work. Post your script I am sure someone will get you going ..
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 05:58 AM
08-07-2001 05:58 AM
Re: shell/tcp: Unknown Service error in script...
# Run edge reports
remsh landmine ". /exe/users/env/tibadmin.profile; . /exe/users/env/staff.profile; ${PL_DIR}/ClearingEdge.pl $PROGARGS 2>&1 > /tmp/edge_report.log"
mail blah@blah.com < /xcb/apps/ctl/edge.msg
###########################
#### Run entire P&L ######
###########################
remsh p-apsrv1 ". /exe/users/env/tibadmin.profile; . /exe/users/env/staff.profile; ${PL_DIR}/plrun.pl -D
The first remsh is working fine, the second is returning 1 and giving the Unknown Service error.
-Timothy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 06:36 AM
08-07-2001 06:36 AM
Re: shell/tcp: Unknown Service error in script...
I have two thoughts and I'm almost certain that one of these is going to fix you. When you run under cron two things happen: 1) your environment is very sparse and 2) stdin, stdout, and stderr are nolonger a terminal.
I would add the -n arg to remsh to tell it to take stdin from /dev/null and every one of your remote commands should do a
if [ -t 0 -a -t 1 -a -t 2 ]
then
XXXXX
fi
in every place that a possible interactive command or TERM associated command (stty,tabs,...) is executed. This is especially true of your profiles.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 06:47 AM
08-07-2001 06:47 AM
Re: shell/tcp: Unknown Service error in script...
remsh host -l root command
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2001 09:13 AM
08-08-2001 09:13 AM
Re: shell/tcp: Unknown Service error in script...
. Also, try a simple script that just does
remsh landmine hostname
remsh p-apsrv1 hostname
. You realize that the double quotes are not protecting
${PL_DIR}
and $PROGARGS
in the script, right?
Thus, those variables are being resolved in the script and the values being passed for those variables are those extant *within* this script, *not* whatever values may be returned on the remote host via
. /exe/users/env/tibadmin.profile
and . /exe/users/env/staff.profile
.
BV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2001 12:28 PM
08-08-2001 12:28 PM
Re: shell/tcp: Unknown Service error in script...
Try using this syntax:
remsh landmine -n "..."
remsh p-apsrv1 -n "..."
etc.