cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect iOS app to SUP 2.1.3 through relay server

rehan_sayed
Explorer
0 Kudos

Hi all,

I have successfully configured Sybase Hosted Relay server in my SUP 2.1.3 Server but in iOS frontend, m encountering the below error when trying register my app to SUP 2.1.3 through Relay Server. 

onConnectionStatusChanged: status = 105, code = 571, message = Error: 571 Detail: Session failed Source: /Users/iotabuilder/svn/Pioneer/MOClients/iPhone/../Common/C/moClient.cpp 1024.

then

[65874:5d03] onHttpCommunicationError: errorCode = 404

While trying to register application.I am doing as follows:

   SUPApplication* app = [SUPApplication getInstance];

app.applicationIdentifier = @"MyApp";


        CallbackHandler *acb = (CallbackHandler *) [CallbackHandler getInstance];
        [acb retain];
        [app setApplicationCallback:acb];
       
       
        SUPConnectionProperties* props = app.connectionProperties;
        [props setServerName:@"relayserver.sybase.com"];
        [props setPortNumber:80];

        [props setNetworkProtocol:@"http"];
        [props setUrlSuffix:@""];
        [props setFarmId:@"Rehan.FarmMBS"];


        SUPLoginCredentials* login = [SUPLoginCredentials getInstance];


            login.username = @"rehan";
            login.password = nil;
            props.activationCode = @"123";
            props.securityConfiguration = @"admin";


        props.loginCredentials = login;
               
            [app registerApplication:800];

        if(![MyApp1DB databaseExists])
        {
            [MyApp1DB createDatabase];        

  
             [MyApp1DB generateEncryptionKey];
            [MyApp1DB closeConnection];


            SUPConnectionProfile *cp = [MyApp1DB getConnectionProfile];
            [SUPPOApprovalVault setString:@"encryptionkey" withValue:[cp getEncryptionKey]];
            [cp.syncProfile setDomainName:@"default"];
           
            [cp setAsyncReplay:NO];
           
            [cp setServerName:@"relayserver.sybase.com"];
            [cp setPortNumber:[portno intValue]];
            [cp setNetworkProtocol:@"http"];
            [cp setNetworkStreamParams:@"trusted_certificates=;compression=none;url_suffix=/ias_relay_server/client/rs_client.dll/Rehan.FarmRBS"];
           
            [cp setUser:@"rehan"];
            [cp setPassword:@"mypassword"];
           
           
            [cp enableTrace:NO];
            [cp.syncProfile enableTrace:YES];
           
           
           
           
        }

Please guide me where m doing wrong.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rehan,

did you have succes? I'm facing the same problems with exactly the same error message.

Best,

Sebastian

former_member184221
Contributor
0 Kudos

Try using Https on port instead, so change:

props setPortNumber:80

to

props setPortNumber:443

rehan_sayed
Explorer
0 Kudos

Hi David,

No success,still encountered the same error.

onConnectionStatusChanged: status = 105, code = 571, message = Error: 571 Detail: Session failed Source: /Users/iotabuilder/svn/Pioneer/MOClients/iPhone/../Common/C/moClient.cpp 1024.

former_member184221
Contributor
0 Kudos

Does it connect correctly with no Relay Server, i.e. directly to SUP server ?

Are you using the IIS version of relay server ?

rehan_sayed
Explorer
0 Kudos

Hi David,

Yes I tested my App without relay server,it was able to hit SUP and register the App.

FYI, I am using Sybase Hosted Relay Server.

Regards,

Rehan

former_member184221
Contributor
0 Kudos

Ahh, I tried Sybase Hosted relay Server once, never could get it to work with them. I found they were an older version (SQL Anywhere 11 rather than 12 based) and I concluded that's why they would not work. I also had a Sybase pre-sales con with me and they could not get it to work either.

Got my own Relay servers to work fine. If you are in a test environment you can always host the Relay Server and RSOE server on the SUP server (just to work it all out).