Search the web
Sign In
New User? Sign Up
wlshell
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Problem detecting connection failure in script file   Message List  
Reply | Forward Message #628 of 675 |
Re: [wlshell] Re: Problem detecting connection failure in script file

Sorry John, I did not get a reply to this issue, neither was I able to come up with a decent work around. We are upgrading to WLS9 and I'm looking at moving our existing wlshell scripts to WLST. WLST is by no means perfect -- for one it is and extension of jython which is 4 releases (2.1) behind the current python release (2.5) hence finding decent documentation can be a bit challenging at times.
Dylan
----- Original Message ----
From: conroyj <weblogic@...>
To: wlshell@yahoogroups.com
Sent: Friday, January 5, 2007 2:43:02 PM
Subject: [wlshell] Re: Problem detecting connection failure in script file

Hi Paco/Dylan/Arnaud

I notice that several people have experienced this problem but that
nobody has ever posted a solution (I have now looked through all 625
messages here!).

Has anyone worked out a resolution?
The only one I have been able to come up with was to ping the
instance prior to running my script using

java weblogic.Admin -url t3://IP:PORT -username user -password pwd
ping IP

and then not runing the script if the "Failed to connect" message
came back.
This approach, unfortunately, has some obvious flaws.

There must be a better way, even if it's just an "exit wlshell on
script failure".

Thanks

John

--- In wlshell@yahoogroups .com, "d_j_l_2006" <dylan_lobo@ ...> wrote:
>
> Hello,
>
> I'm unable to detect failure to the "connect" command from within a
> script file. I've pasted both the code and the output when calling
> the script with 1) A non existent server 2) wrong credentials
> Notice that the if command is not reached when connect fails.
> Thanks in advance.
>
> Dylan
>
> # =-=-=-=-=-=- =-=-=-=-= -=-=-=-=- =-=-=-=-= -=-=-=-=- =-=-=-=-= -=-=-=-=-
> =-=-=-=-=-=- =-=-=-=-= -=-
> #
> # File name : connect.wlsh
> #
> # Author : Dylan Lobo
> #
> # Description : This file is a wlshell script that
> establishes
> # a connection to the Weblogic server
> # =-=-=-=-=-=- =-=-=-=-= -=-=-=-=- =-=-=-=-= -=-=-=-=- =-=-=-=-= -=-=-=-=-
> =-=-=-=-=-=- =-=-=-=-= -=-
> if ($server == null) or ($user == null) or ($password == null) then
> echo "Usage: java wlshell.Main [-f scriptfile] -v
> server=WLS_URL -v user=USERNAME -v password=PASSWORD"
> exit 1
> end
>
> ############ ######### ######
> #Connect to the server
> ############ ######### ######
> connect $server $user $password
> if $CONNECTED == false then
> echo "Unable to connect to the server ... exiting"
> exit 2
> end
>
>
>
>
>
>
> myserver01$ wlsh.sh -f connect.wlsh -v server=non_existant -v
> user=sample -v password=sample
> wlshell, a shell for BEA WebLogic Server. Version 2.0.2
> by Paco Gomez (c) 2002 - 2004. www.wlshell. com
> type "help" for a list of commands
> wlsh [not connected]> if ($server == null) or ($user == null) or
> ($password == null) then wlsh [not connected]> connect $server
> $user $password connecting to t3://non_existant as sample...failed
> couldn't execute all the script, there was an error at line 1:
error
> while reading script file at line 22:
> javax.naming. ServiceUnavailab leException [Root exception is
> java.net.UnknownHos tException: non_existant] type "help" for a list
> of commands
>
> wlsh [not connected]>
>
> Wrong credentials
>
> myserver$ wlsh.sh -f connect.wlsh -v server=myserver: 61000 -v
> user=sample -v password=sample
> wlshell, a shell for BEA WebLogic Server. Version 2.0.2
> by Paco Gomez (c) 2002 - 2004. www.wlshell. com
> type "help" for a list of commands
> wlsh [not connected]> if ($server == null) or ($user == null) or
> ($password == null) then wlsh [not connected]> connect $server
> $user $password connecting to t3://myserver: 61000 as
sample...failed
> couldn't execute all the script, there was an error at line 1:
error
> while reading script file at line 22:
> javax.naming. AuthenticationEx ception [Root exception is
> java.lang.SecurityE xception: User: sample, failed to be
> authenticated. Start server side stack trace:
> java.lang.SecurityE xception: User: sample, failed to be
> authenticated.
> at weblogic.common. internal. RMIBootServiceIm pl.authenticate
> (RMIBootServiceImpl .java:92)
> at weblogic.common. internal. RMIBootServiceIm pl_WLSkel. invoke
> (Unknown Source)
> at weblogic.rmi. internal. BasicServerRef. invoke
> (BasicServerRef. java:441)
> at weblogic.rmi. internal. BasicServerRef$ 1.run
> (BasicServerRef. java:382)
> at weblogic.security. service.Security ServiceManager. runAs
> (SecurityServiceMan ager.java: 726)
> at weblogic.rmi. internal. BasicServerRef. handleRequest
> (BasicServerRef. java:377)
> at weblogic.rmi. internal. BasicExecuteRequ est.execute
> (BasicExecuteReques t.java:30)
> at weblogic.kernel. ExecuteThread. execute
> (ExecuteThread. java:234)
> at weblogic.kernel. ExecuteThread. run(ExecuteThrea d.java:210)
> End server side stack trace
> ]
> type "help" for a list of commands
>
> wlsh [not connected]>
>



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Tue Jan 9, 2007 5:02 pm

d_j_l_2006
Offline Offline
Send Email Send Email

Forward
Message #628 of 675 |
Expand Messages Author Sort by Date

Hello, I'm unable to detect failure to the "connect" command from within a script file. I've pasted both the code and the output when calling the script with...
d_j_l_2006
Offline Send Email
Nov 3, 2006
4:52 pm

Hi Paco/Dylan/Arnaud I notice that several people have experienced this problem but that nobody has ever posted a solution (I have now looked through all 625 ...
conroyj
Offline Send Email
Jan 6, 2007
2:12 am

Sorry John, I did not get a reply to this issue, neither was I able to come up with a decent work around. We are upgrading to WLS9 and I'm looking at moving...
Dylan Lobo
d_j_l_2006
Offline Send Email
Jan 10, 2007
3:20 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help