LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   WebLogic server (https://www.linuxquestions.org/questions/linux-newbie-8/weblogic-server-880039/)

brownie_cookie 05-11-2011 05:37 AM

WebLogic server
 
Hi all

I need to control a weblogic server.
I don't know much about it, but i need to check it with a plugin from Nagios (or something i made myself, but i don't have anything yet).

Here is some code a plugin uses
Code:

java weblogic.Admin -url t3://localhost:$PORT -username user -password pass
can someone explain what he does here? the port, does it has to be 8080 or 7001 or ..?

your help is much appreciated ^^

:hattip:

acid_kewpie 05-11-2011 07:23 AM

the weblogic admin server runs on 7101 bydefault if I recall with webapps on 7011. Either way, your config will show what ports are being listened for, or just run "netstat -plnt" to see what's there. You probably want to get more familiar with wlst if you want to do more in depth monitoring of weblogic, it's pretty neat.

brownie_cookie 05-11-2011 07:27 AM

when i surf to the website of the weblogic console, i need to use port 7001 like
http://website:7001/

how do interpret this output?
Code:

# netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address              Foreign Address            State      PID/Program name
tcp        0      0 0.0.0.0:2049                0.0.0.0:*                  LISTEN      -
tcp        0      0 0.0.0.0:5666                0.0.0.0:*                  LISTEN      1270/xinetd
tcp        0      0 0.0.0.0:911                0.0.0.0:*                  LISTEN      30835/rpc.rquotad
tcp        0      0 0.0.0.0:111                0.0.0.0:*                  LISTEN      5492/portmap
tcp        0      0 0.0.0.0:48240              0.0.0.0:*                  LISTEN      -
tcp        0      0 127.0.0.1:631              0.0.0.0:*                  LISTEN      16428/cupsd
tcp        0      0 0.0.0.0:1020                0.0.0.0:*                  LISTEN      5502/rpc.statd
tcp        0      0 0.0.0.0:927                0.0.0.0:*                  LISTEN      30852/rpc.mountd
tcp        0      0 :::22                      :::*                        LISTEN      5694/sshd

and what do you mean with
Quote:

wlst

brownie_cookie 05-11-2011 07:45 AM

this is what i have

script:
Code:

#!/bin/sh

# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="/root/Oracle/Middleware/wlserver_10.3"

# Set JAVA_HOME to java virtual machine you want to run on server side.
JAVA_HOME="/usr/java/default/"

CLASSPATH="${WL_HOME}/server/lib/weblogic.jar"
export CLASSPATH


SERVICE="JVMRuntime"
FRASE="JVM VAP"
PORT=7001

java weblogic.Admin -url http://localhost:$PORT -username user -password pass

this is my output:
Code:

# ./file.sh

weblogic.Admin is a command-line utility for managing WebLogic Server. Try:

        weblogic.Admin help LIFECYCLE  Starting, stopping, discovering servers

        weblogic.Admin help INFO        Retrieving info about WebLogic Server

        weblogic.Admin help JDBC        Working with JDBC connection pools

        weblogic.Admin help MBEAN      Working with WebLogic Server MBeans

        weblogic.Admin help CLUSTER    Working with clusters

        weblogic.Admin help ADMINCONFIG Managing Admin configuration

        weblogic.Admin help ALL        Help for all commands

Usage: java [<SSL trust options>] weblogic.Admin
        [ [-url | -adminurl] [<protocol>://]<listen-address>:<port>]
        -username <username> [-password <password>]
        <COMMAND> <ARGUMENTS>

More info available at: http://e-docs.bea.com/wls/docsXX/admin_ref/cli.html

can someone explain what's happening :( ??

acid_kewpie 05-11-2011 07:46 AM

well nothing is listening on any weblogic ports, so I take it you didn't actually run netstat on the server itself??

as for wlst, just go google it. the internet is great.

Cna you clarify what you actually want as a solution to this thread? you're clearly confused about nagios and weblogic but what do you actually want to get out of this?

brownie_cookie 05-11-2011 07:57 AM

yes indeed, the netstat command was performed on the monitoring host (where nagios is installed on).
but the server where the weblogic is running on is a HP-UX server and the arguments doesn't supply to HP-UX.. so i tried it on the monitoring host
but anyways.. the wlst command will be searched on the internet after i post this :p

the main goal is that i can monitor the weblogic server with nagios. I know there are some plugins written and accessible on the exchange website, but i don't get this plugins to work. In my previous post , you see a part of the plugin which i edited to my needs, but still it doens't work (but maybe that's because i test this on the monitoring server... but the same here, because of the HP-UX server, some commands doesn't seem to work :( )

Kind regards

Brownie

brownie_cookie 05-11-2011 08:22 AM

i'm following this link
and now i'm stuck at point 4

Quote:

Start the administration server by entering the following command at the WLST prompt. If necessary, replace the sample argument values with those that match your domain environment:


startServer('SERVER_NAME', 'DOMAIN_NAME', 'SERVER_ADDRESS:SERVER_PORT', 'USERNAME', 'PASSWORD')
i need to fill in the arguments of the 'startServer' command, but how do i know in what domain my server is?

acid_kewpie 05-12-2011 03:11 AM

you need to liase with the weblogic admins. it is not professional or logical to not directly discuss requirements with the relevant people in your business, not least because if the people relevant aren't aware of the monitoring being attempted, they possibly don't want it anyway.

brownie_cookie 05-12-2011 03:15 AM

the people i work with asked me to write a script that checks the weblogic server, to see if it's accessible...
but i need to find out myself first, before i ask questions...
but i geuss nobody knows here the answer :)

thx anyways :)

acid_kewpie 05-12-2011 03:23 AM

Quote:

Originally Posted by brownie_cookie (Post 4354065)
the people i work with asked me to write a script that checks the weblogic server, to see if it's accessible...
but i need to find out myself first, before i ask questions...
but i geuss nobody knows here the answer :)

thx anyways :)

No that's not true. I'm very used to monitoring weblogic, but what you say there is probably more important than anything else so far. You HAVE spoken to them and they know what they have asked of you. From that point you should either 1) check tcp port availability and possible weblogic java jvm process access, along with standard OS stuff - disk space etc, or 2) discuss with them what their weblogic domains are, service accounts etc. In my experience they are NOT after in depth analysis of their app, and TBH it doesn't sound like you are maybe aware of what there is to monitor about it. Weblogic can be monitoring in thousands of different ways, and without you having this knowledge (well, moreover, the expectations to have it) then you should not believe it is your problem to achieve this goal.

I got "lumped" with weblogic as it was deemed "linux" as it ran on some redhat boxes. It's not linux, it's java and j2ee, and that is not what I do. I was bored though, and our systems sucked, so I worked out how to monitor weblogic message queues and the likes. But that was an extra, a bonus, and I wasn't expected to.

So rant over, just be aware of what should be expected. Being asked to do some "monitoring" is almost as bad as blaming "the network" for a fault. wtf does that mean?? don't read too much into a brief and only deliver what is actually wanted (unless you CAN provide more and want to get noticed)

brownie_cookie 05-12-2011 03:33 AM

i really have NO idea what a weblogic server do. I know i can surf to a website (the website of a weblogic server 8.1) and i can log on to that, and when i log on, i can see in what domain he is in.
I geuss that this server runs some kind of applications, and those are the one i need to monitor?!
Today or tomorrow , i have a meeting with the people who are guiding me, they give me first some time to search for myself, because when they give me the solution right away, i won't learn anything.

Quote:

1) check tcp port availability and possible weblogic java jvm process access, along with standard OS stuff - disk space etc
i don't want to be rude, but this says nothing to me. How can i check the tcp port availability and those weblogic java jvm process access??
I know a bit of Linux, but not everything, i'm still learning every single day
so if you can show me some commands which i can use to check those availabilities and access, maybe i'll can give you more information!!

P.S.: when i said nobody could help me here, wasn't meant on you personally, just in general (i haven't slept much the last couple of days, so i'm a little picky ;)) but i wasn't meant to be rude

brownie_cookie 05-12-2011 03:52 AM

Code:

java weblogic.Admin -url t3://localhost:$PORT -username user -password pass GET -pretty -type JVMRuntime >> /export/home/nagios/nagios/jvmvap.txt
This is what i'm using, and when i look in the file 'jvmvap.txt' i get this
Code:

Failed to connect to t3://localhost:7001: Destination unreachable; nested exception is:
        java.net.ConnectException: Connection refused; No available router to destination

can you pls explain what's happening? i geuss i can check something of the weblogic server with the first command, but i can't get this to work

acid_kewpie 05-12-2011 04:19 AM

Well tcp and process checks are nothing special, and also please note, not in the slightest bit specific to Linux. The same applies to ANY Server, Windows included. what I said should mean just as much to a Windows sysadmin as a Linux one.

acid_kewpie 05-12-2011 04:23 AM

Quote:

Originally Posted by brownie_cookie (Post 4354086)
Code:

java weblogic.Admin -url t3://localhost:$PORT -username user -password pass GET -pretty -type JVMRuntime >> /export/home/nagios/nagios/jvmvap.txt
This is what i'm using, and when i look in the file 'jvmvap.txt' i get this
Code:

Failed to connect to t3://localhost:7001: Destination unreachable; nested exception is:
        java.net.ConnectException: Connection refused; No available router to destination

can you pls explain what's happening? I guess I can check something of the weblogic server with the first command, but I can't get this to work

Don't run before you can walk, I *really* don't think you should be trying to go this deep into the environment form what I read. I would suggest that when you know for yourself what those errors mean, that's when it *may* be reasonable to try to do that sort of monitoring. I would guess there is actually nothing listening on 127.0.0.1:7001, but it could be other things - however I would expect that to be one of the significantly easier obstacles to overcome if you want to get into its guts.

Setup basic port and process monitoring, maybe a little http level interactions as a pretend user, and in your spare time play around and work out what else is possible.

brownie_cookie 05-12-2011 04:28 AM

i will first have a chat with the people here, and then i'll post back here.
I don't think this is getting me anywhere before i have more information.

Thanks anyways and keep this thread in your mind ;)
i'll talk to you soon


All times are GMT -5. The time now is 04:12 PM.