Highlighted
a_dev
1 Copper

Unable to generate login cookie/ticket

Hi,

I am using gsoap to connect to VNX server [EMC celerra]. I can connect to the server. Though the request to generate login cookie/ticket returns with empry response. I am using gsoap to comunicate with EMC celerra. gsoap returns response code of 0. Both http cookie and the response are empty.

Can someone knowledgable in this are please shed light on this ?

This is the request that my client sends to real vnx server :

-----------------------------------

2012/11/06 20:52 Notice: POST https://<IP ADDRESS of control station/vnx server>/Login HTTP/1.1

Content-Type: application/x-www-form-urlencoded

Host: <IP ADDRESS of controlstation/vnx server>

Content-Length: 43

user=nasadmin&password=nasadmin&Login=Login

----------------------------------

Thanks a ton in advance !

--a_dev

0 Kudos
3 Replies
Rainer_EMC
5 Rhenium

Re: Unable to generate login cookie/ticket

Hi,

Can you provide a bit more background on what you want to do ?

Did you enable and start the XML API server ?

See the “XMP API Programmers Guide” in the section “Configuring and starting the XML API Server on the Control Station”

It also lists the various log files and debug options

There is also Java sample code available in the EDN section – or just use wget to troubleshoot

0 Kudos
a_dev
1 Copper

Re: Unable to generate login cookie/ticket

Thanks for your prompt response !

I am trying to write a client that will monitor and manage the vnx server remotely by calling to xml api server. To work with the XML API, the client application must authenticate itself with the Celerra Control Station by using a special login request. The response from the login script carries an HTTP cookie called Ticket in one of the HTTP headers. Each subsequent HTTP request from the user should send this cookie back to the HTTP server. This is what I am trying to do hence my client first calls to recevie cookie/ticket.

My client does not receive the HTTP cookie, hence, it cannot proceed further with subsequent requests that require cookie to  be included within each subsequent request to simulate the valid session.

I did check the guide section on configuring and starting the XML API server.  This line is uncommented in nas_mcd.cfg file :

daemon "XML API Server"-

executable "/nas/sbin/start_xml_api_server" optional yes

canexit yes

autorestart yes

ioaccess no

My client seems to connect to the vnx server to establish the connection on default port 443. The next call is to recevie the ticket. This call does not return any http response body or http cookie/ticket. The outgoing call looks as folowing :

-----------------------------------

2012/11/06 20:52 Notice: POST https://<IP ADDRESS of control station/vnx server>/Login HTTP/1.1

Content-Type: application/x-www-form-urlencoded

Host: <IP ADDRESS of controlstation/vnx server>

Content-Length: 43

user=nasadmin&password=nasadmin&Login=Login

----------------------------------

Can you also let me know how I verify if the xml api server is running ? as well as how do I know if the incoming client request is logged somewhere ? I do see some attributes for debug though tye seem to be specific to EMC systems only.

0 Kudos
Rainer_EMC
5 Rhenium

Re: Unable to generate login cookie/ticket

Yes, I’m familiar with XML API

I think you should get the cookie right as a response of the login request

Try http – if you use https on 443 you also need to use SSL

Once you are successfully logged in you will see XML request / responses in /nas/log/cel_api.log

First you need to get the login right though.

Check /nas/http/access_log for errors

I’m not a programmer myself and I don’t know gsoap – I did see several code pieces successfully using the XML API from Java, C++ or sh for different customers.

I did see one case in C++ where the login was working with http but not https – it turned out the customer was mixing POST and GET, which somehow didn’t work well with SSL.

They were getting a 403 error on the login. Once they changed their login code to just use POST it worked fine.

0 Kudos