Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] ZClient : problem with connection to the server

  1. #1
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    3

    Default [SOLVED] ZClient : problem with connection to the server

    I need to use SOAP API in Zimbra. I'm using the ZClient example, but I have an error when trying to authenticate.

    Code:
        public static void main(String argv[]) {
            CliUtil.toolSetup();
    
            String serverURL = "http://zimbra.server.com:7070" + AdminConstants.ADMIN_SERVICE_URI;
            System.out.println(serverURL);
            String userName = "user";
            String password = "password";
    
            try {
                /* do a ping */
                LmcPingRequest pr = new LmcPingRequest();
                LmcPingResponse pResp = (LmcPingResponse) pr.invoke(serverURL);
                System.out.println("---------------------------OK------------------------------");
    
                /* auth first */
                System.out.println("========= AUTHENTICATE ===========");
                LmcAuthRequest auth = new LmcAuthRequest();
                auth.setUsername(userName);
                auth.setPassword(password);
                LmcAuthResponse authResp = (LmcAuthResponse) auth.invoke(serverURL);
                LmcSession session = authResp.getSession();
    Code:
    java.net.ConnectException: Connection refused: connect
    	at java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.net.PlainSocketImpl.doConnect(Unknown Source)
    	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    	at java.net.PlainSocketImpl.connect(Unknown Source)
    	at java.net.SocksSocketImpl.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    I use Zimbra and CAS, and I have and zm_auth_token. How to resolve this please ?
    thnx

  2. #2
    yutaka is offline Project Contributor
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    5

    Default

    At first, please chcek if "serverURL" is correct one or not.

    Usually, the protocol and the port used for admin interface is https and 7071.

    You can check that with the request sent from Admin UI using firefox and
    firebug.

  3. #3
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    3

    Default

    Quote Originally Posted by yutaka View Post
    At first, please chcek if "serverURL" is correct one or not.

    Usually, the protocol and the port used for admin interface is https and 7071.

    You can check that with the request sent from Admin UI using firefox and
    firebug.
    Thnx for your response.

    The URL is the good one, I have a simple user that will search on the Zimbra server using SOAP, he is connected via CAS and have a zm_auth_token.
    The server always refuse connection.

    And when I use 7071, this is the error :

    Code:
    http://zimbra.server.com:7071/service/soap/admin/
    [] INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server zimbra.server.com failed to respond
    [] INFO: Retrying request
    org.apache.commons.httpclient.NoHttpResponseException: The server zimbra.server.com failed to respond
    	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
    	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
    	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)

  4. #4
    yutaka is offline Project Contributor
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    5

    Default

    How about https?
    Still not working?

    And zimbra.server.com is ZimbraStore server, ritght?

  5. #5
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    3

    Default

    Quote Originally Posted by yutaka View Post
    How about https?
    Still not working?
    We don't use HTTPS, and when I use it, it gives me a certificate error...

    Is there any manner to pass the authToken in the url like in REST ???
    Because in REST, when I do this :

    Code:
    http://zimbra.server.com/home/taichimaro/calendar?fmt=xml&auth=qp&zauthtoken=0_07ab6d5dad7bc93d61562eca1c2889582fb7e8ca_69643d33363a61323831353331382d336436362d343766632d386662392d3133613638633661323165393b6578703d31333a313330383733353237303530353b747970653d363a7a696d6272613b
    It works... but with SOAP I don't know what is the problem

  6. #6
    yutaka is offline Project Contributor
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    5

    Default

    mmmm,

    Could you give us Admini UI url you can access from browser?
    And Could you check the requested url when you chose some object(maybe account) in Admin UI?(Maybe you better use firebug to check it.)

  7. #7
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    3

    Default

    Quote Originally Posted by yutaka View Post
    mmmm,

    Could you give us Admini UI url you can access from browser?
    And Could you check the requested url when you chose some object(maybe account) in Admin UI?(Maybe you better use firebug to check it.)
    What do you mean by Admin UI ???

  8. #8
    yutaka is offline Project Contributor
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    5

    Default

    UI for administrator. Somthing like this;
    Admin UI: Zimbra screenshot

  9. #9
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    3

    Default

    Quote Originally Posted by yutaka View Post
    UI for administrator. Somthing like this;
    Admin UI: Zimbra screenshot
    I don't have access to this UI, I have access to a simple account...
    Marouane

  10. #10
    yutaka is offline Project Contributor
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    5

    Default

    You install all zimbra component such as ZimbraStore and ZimbraProxy in one server, right?

    Then you are supposed to be able to get access to "https://zimbra.server.com:7071/" or "https://zimbra.server.com:7071/zimbraAdmin" from browser.

    It does not work for you?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Unable to establish a secure connection to the server
    By lytledd in forum Zimbra Connector for Outlook
    Replies: 11
    Last Post: 11-11-2011, 10:40 AM
  2. Moving from FOSS to NE server - mysql problem
    By zzzzsg in forum Administrators
    Replies: 5
    Last Post: 03-18-2008, 03:11 PM
  3. My Zimbra server down ... please help :)
    By frankb in forum Administrators
    Replies: 2
    Last Post: 12-12-2007, 11:29 AM
  4. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 11:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •