RE: WinRM and openPegasus

"Pierre Pacchioni" <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <005001cd39ef$501828e0$f0487aa0$@com>
Hello,

 

I recompiled with the PEGASUS_ENABLE_PROTOCOL_WSMAN=true flag.

 

Then I tried a simple request:

 

E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\bin>wbemexec.exe -h
localhost -p 5988
E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\test\wetest\wsman\Get\Get
_Success01.xml

HTTP/1.1 500 Internal Server Error

Content-Type: application/soap+xml;charset=UTF-8

content-length: 0000001572

SOAPAction: http://schemas.xmlsoap.org/ws/2004/08/addressing/fault

 

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xml="http:/

/www.w3.org/XML/1998/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsman="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:wsmb="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd"
xmlns:wsa="http://schemas.xmlsoap.org/ws/20

04/08/addressing" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer"
xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wse=

"http://schemas.xmlsoap.org/ws/2004/08/eventing"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"

xmlns:wscim="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2">

<SOAP-ENV:Header>

<wsa:To>

http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous

</wsa:To>

<wsa:Action>

http://schemas.xmlsoap.org/ws/2004/08/addressing/fault

</wsa:Action>

<wsa:MessageID>

uuid:00000000-0000-0000-0000-000000000000

</wsa:MessageID>

<wsa:RelatesTo>

uuid:00000000-0000-0000-0004-000000000001

</wsa:RelatesTo>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<SOAP-ENV:Code>

<SOAP-ENV:Value>

SOAP-ENV:Sender

</SOAP-ENV:Value>

<SOAP-ENV:Subcode>

<SOAP-ENV:Value>

wsa:DestinationUnreachable

</SOAP-ENV:Value>

</SOAP-ENV:Subcode>

</SOAP-ENV:Code>

<SOAP-ENV:Reason>

<SOAP-ENV:Text xml:lang="en-US">

CIM_ERR_INVALID_NAMESPACE: test/static

</SOAP-ENV:Text>

</SOAP-ENV:Reason>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

I need to read a bit more the documentation.

I also tried to connect WinRS with 

 

E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\bin>wbemexec.exe -h
localhost -p 5985
E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\test\wetest\wsman\Get\Get
_Success01.xml

HTTP/1.1 401

Server: Microsoft-HTTPAPI/1.0

WWW-Authenticate: Negotiate

WWW-Authenticate: Kerberos

Date: Thu, 24 May 2012 20:51:33 GMT

Connection: close

Content-Length: 0

 

Anyway I'll continue in the coming days to try to sort this out,

Thanks again

Pierre.

 

From: Deshpande, Rohini (STSD) [mailto:[email protected]] 
Sent: Thursday, May 24, 2012 8:08 PM
To: Pierre Pacchioni; [email protected]
Subject: RE: WinRM and openPegasus

 

Hi Pierre,

 

Have you build Open Pegasus with PEGASUS_ENABLE_PROTOCOL_WSMAN=true? Only
then will Open Pegasus(OP) support WSMAN protocol.

 

Cimcli is not a wsman client (it is a CIM-XML client). You can try using
OP's wbemexec command with a wsman xml request. You can see some example
xmls in "pegasus/test/wetest/wsman/Enumerate" or
"pegasus/test/wettest/wsman/Get".

 

If you want a wsman client with Open Pegasus try openwsman client. You need
to configure OP as the server. But I think using wbemexec will suffice for
testing.

 

I've not tried a get operation from winrm to OP. From whatever understanding
I have "winrm get winrm/config -machine:localhost:5988" will not work as
winrm/config is the resource URI, which OP does not understand. See some
xmls under "pegasus/test/wettest/wsman/Get". 

 

You might want to first try a simple wsman request to OP using wbemexec and
confirm OP is built with WSMAN.  You can then try the same request (simplest
may be id) with winrm. You can also try setting Trusted Host, so that
authentication errors do not occur (we tried between a windows and Linux
system, but it might help in your case too).

 

Traces are in pegasus/build/trace directory.

 

Regards,

Rohini

 

From: Pierre Pacchioni [mailto:[email protected]] 
Sent: Thursday, May 24, 2012 9:06 PM
To: [email protected]
Subject: WinRM and openPegasus

 

Hello,

 

I've been trying to connect a Pegasus server running on Windows with WinRM
(on the same machine).

 

The openPegasus version is the 2.11.1

 

E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\bin>cimserver.exe

Logs Directory = E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1/./logs

CIM Server 2.11.1

Listening on HTTP port 5988.

Started.

 

I can connect the server using the OpenPegasus client (cimcli.exe) without
any problem.

But I systematically received the bad request status 400 when I tried to
connect winRM with openPegasus server:

E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\bin>winrm get
winrm/config -machine:localhost:5988

WSManFault

    Message = The WinRM client received an HTTP bad request status (400),
but the remote service did not include any other information about the cause
of the failure.

Error number:  -2144108175 0x80338171

The WinRM client received an HTTP bad request status (400), but the remote
service did not include any other information about the cause of the
failure.

 

Interesting enough I received the same error when I tried to connect
cimcli.exe with WinRM:

E:\workspace\DCNS\DORIS\openPegasus\pegasus-2.11.1\bin>cimcli niall -n
root/cimv2 -l localhost:5985

cimcli Pegasus Exception: HTTP Error (400 Bad Request).. Cmd = niall Object
=

 

So the question is shouldn't WinRM and OpenPegasus be compatible? And if so
how does it work?

I retrieved an old post on exactly the same subject:

http://osdir.com/ml/network.open-pegasus.general/2007-08/msg00028.html

But today OpenPegasus and WinRM (should) support WS-Management.

 

I have another question on the traceLevel. Using cimconfig I changed the
traceLevel to 5 (the max) but I was not able to retrieve/check where the
trace are written?

 

Thanks for your help,

Pierre.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.