cancel
Showing results for 
Search instead for 
Did you mean: 

Connect SUP server issues

DoanManhQuynh
Active Contributor
0 Kudos

Hi every one.

i have 1 project need to deploy to 2 difference SUP server (A & B). Every thing work fine with server A (is my unwired server) but when i try to connect to server B i got exception: Error: 1101  Message='monet:DeviceManagement.dll:DeviceManagement:AddDeviceRegistration'. bellow is full mocaLog:

23T143255, T1, CMessagingClient: setConnectionProperties - server configuration changes detected!

23T143255, T1, Disconnected client connection

23T143255, T1, MessagingClientLib: ShutdownClient.

23T143256, T1, MessagingClientException thrown.  Error: 14802  Message='Connection not configured.'

23T143256, T2, ThreadID = 4223955306 maps to short thread id T2

23T143256, T2, Connect--Fixedup URL: /tm/?cid=0

23T143256, T2,           ParseTMPublicHeader succeeded

23T143256, T2, Connected client connection

23T143258, T2,           ParseTMPublicHeader succeeded

23T143258, T2, MclServerRmiCalls.AddDeviceRegistration failed.  Ex: Sybase.MessagingClientLib.MessagingClientException: Error: 14814 Message: 'MMS Authentication Failed'

   at MclServerRmiCalls.MclServerRmiCalls.AddDeviceRegistration(String sServerName, Int32 iPort, String sFarmId, String sUserName, String sSUPPassword, Boolean bIsWorkflowclient, MORequestOptions requestOptions)

   at MclServerRmiCalls.MclServerRmiCalls.AddDeviceRegistration(String sSUPPassword, Boolean bIsWorkflowclient, Int32 iTimeout)

   at Sybase.Mobile.Application.RegisterRun()

23T143258, T2, execute:  refreshing stale ServerVersionInfo

23T143258, T2, Connect--Fixedup URL: /tm/?cid=0

23T143258, T2, Connected client connection

23T143258, T2, Disconnected client connection

23T143258, T2, got ServerVersionInfo: ,11

23T143258, T2, 516, 0 Error sending request to server

23T143258, T2,           ParseTMPublicHeader succeeded

23T143258, T2, CmoObject::Execute: CancelRequest: Error: 1101

23T143258, T2, CmoConnection::CancelRequest(): TLCancelRequest

23T143258, T2, MessagingClientException thrown.  Error: 1101  Message='monet:DeviceManagement.dll:DeviceManagement:AddDeviceRegistration'

23T143259, T2, MclServerRmiCalls.AddDeviceRegistration failed.  Ex: Sybase.MessagingClientLib.MessagingClientException: Error: 1101 Message: 'monet:DeviceManagement.dll:DeviceManagement:AddDeviceRegistration'

   at Sybase.MessagingClientLib.MessagingClient.ThrowOnReturn(Int32 iReturnValue)

   at Sybase.MessagingClientLib.MessagingClientMoObject.Execute(MORequestOptions oRO, String sObjectName, String sMethodName)

   at MclServerRmiCalls.MclServerRmiCalls.AddDeviceRegistration(String sServerName, Int32 iPort, String sFarmId, String sUserName, String sSUPPassword, Boolean bIsWorkflowclient, MORequestOptions requestOptions)

   at MclServerRmiCalls.MclServerRmiCalls.AddDeviceRegistration(String sSUPPassword, Boolean bIsWorkflowclient, Int32 iTimeout)

   at Sybase.Mobile.Application.RegisterRun()

Please any one know about this issue tell me how to fix it rr if you have another solution to deploy project to multi server .

Thanks and best regard.

Accepted Solutions (0)

Answers (3)

Answers (3)

DoanManhQuynh
Active Contributor
0 Kudos

Hi all.

after various check i found something very exciting. I will explain more detail my steps:

1. Create a mobile application project (MyPrj) with backend is SAP.

2. Generate code for .net 3.5 CF (I do not define target SUP server here).

3. Create a mobile deployment package for MyPrj (MyPkg),where i define:

     a. MBO in use

     b. Datasource in this package

     c. Assign application

     d. Package name

then build this package (in full mode).(without define target SUP server too).

4. Now i login to SCC of server A & server B:

  1. In the left navigation pane, expand the Domains folder.
  2. Choose a domain name, then select Packages.
  3. In the right administration pane, click the General tab.
  4. Click Deploy.
  5. Choise MyPkg to deploy

5. Build my mobile app (MyApp) and use code generate from workspace as core part, all I change is host ip address, username and password login to SUP.I were install SUP server on my PC (server A) ,which one I install workspace and generate this project too, and another one on another PC (server B).

6. Test (each case I test with "cleared" simulator:

     a. Register to server B with username, pass, host of server B => fail because of MMS      Authentication Failed

     b. Register to server A with username,pass,host of server A => success.

     c. Register to server A success then change info to server B (user,pass,host): got mobilink error:      "the sychronization failed because Mobilink returned authentication status '4' with value 4000...". I      think maybe data sync with server A were saved in device then this error come.

     d. Now I change a little: my host ip address still B's ip but I change user and pass = A's info. Register again and...it connect success to server A!!!

Then now I think probably when i install SUP server on my PC,something were "register" to my workspace too then my project always have target to my SUP server if i dont define target server for my deployment package? I still confuse....

In another hand, If I deploy package to server A with template were created in workspace then use package were generated to deploy to server B, the same result I get. (note that because the connect to B server were very slow then I cant deploy direct to this server from workspace).

I hope that some one can tell me what are happen

Thanks and best regards.

bob_gallo58
Participant
0 Kudos

So for the late reply,  Do you have access to the server logs with Debug on for MMS and Security.

That will help.  The logs are usually the key to trouble shooting issue on SUP.

DoanManhQuynh
Active Contributor
0 Kudos

Hi Bob.

Because my device were not register on SCC so I cant turn on trace or maybe I dont know how to turn it on ( im a newbie ).Other hand, when I uninstall unwired server on my PC, "MMS Authentication Failed" were disspear and I got new errors: Error: 515  Message='Error retrieving public key from server' and throw exception: Error: 550  Message='Session failed'. I have no ideal about what happening....Do you know about these errors?

Thanks and best regards.

bob_gallo58
Participant
0 Kudos

I think the 550 Error is do to the 515 error.

Since the Message base connection is encrypted it requires the exchange of a Public key.

You say you can connet to one server and not the other correct?

I have seen this issue when there a network connection issues?

can you compare both sever secuirty settings?

bob_gallo58
Participant
0 Kudos

Feature research shows:

This error signifies that there is a connectivity problem to the server. For a newly installed client, the very first operation requiring connection is retrieving keys from the server. So, this error ( public key error ) means that the client was not able to connect to the server even once. Needs to be investigated simply as a connectivity issue.

There is an easy way to test. Copy that information and build a URL to try from your desktop browser and then from your phone browser. "

DoanManhQuynh
Active Contributor
0 Kudos

Thanks for your help Bob.

I do think about connection problem too so today I were install a new unwired server on 1 computer in same LAN with mine,these error still come . I think tomorrow, i need more test to find out what happen, try a new PC with new visual studio and build one new project ....But, what do you mean when you said:

There is an easy way to test. Copy that information and build a URL to try from your desktop browser and then from your phone browser. "

i need to copy what?

Thanks and best regards.

bob_gallo58
Participant
0 Kudos

Sorry should have went into more detail. use the same connection info your app is using to see if you can hit the server via a Browser on the device or simulator

DoanManhQuynh
Active Contributor
0 Kudos

Thank you very much Bob, your advice is helpful. The reason is my simulator could not connect to internet so it can not retrives public key too..a stupid mistake ...With the first question, might be it because of unwired server and sybase workspace were install in same PC then MMS Authentication use the same user,pass for package which not define target server, I do think so...

bob_gallo58
Participant
0 Kudos

Well I would only be Guessing,  can you get access to the server log and turn Debug on for MMS and Security.  The Log should give use more info to figure out the issue.

DoanManhQuynh
Active Contributor
0 Kudos

Oke I were check on serverside,nothing difference except 1 thing in the screenshot bellow:

I dont know what wrong...

bob_gallo58
Participant
0 Kudos

What issue are we trying to trouble shooting  here I see this error in your MOCA log:

23T143258, T2, MclServerRmiCalls.AddDeviceRegistration failed.  Ex: Sybase.MessagingClientLib.MessagingClientException: Error: 14814 Message: 'MMS Authentication Failed'

Which tells me that you user ID was not validated on the SUP Server.

The Device could not connect to the  Mobile Middleware Services (MMS) Layer which is the Java container that SUP runs under.

Does you server log show anything?  if you need more info you can turn Security and MMS Tracing to Debug, and that should give you more info....

DoanManhQuynh
Active Contributor
0 Kudos

Thanks Bob.

I said that i have to deploy project to 2nd server by log on SCC and deploy from there then user ID or password can not be wrong cause I use the same user ID in my program. I still dont know exactly what im missing here.

bob_gallo58
Participant
0 Kudos

That is why  I think you need to look a the Server log to get more info.

Also I don't recall seeing the SUP version you are using???

DoanManhQuynh
Active Contributor
0 Kudos

Im using SUP version 2.1.3 SP1 build 358

bob_gallo58
Participant
0 Kudos

OK, do you have access to the server log?

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Is your 2nd server up and running?

Regards,

Jitendra

DoanManhQuynh
Active Contributor
0 Kudos

yes, 2nd server is work fine but with 2nd server i have to access with VPN. Because of the connection very slow then I can not deploy my project direct to this server using sybase workspace so I deployed it to my unwired server then use the generate "default_package.jar" file to deploy to 2nd server.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

i just tried it and i was able to deploy an existing package(already had deployed to SUP server 1) to 2nd SUP server successfully through Sybase control center SCC of 2nd server.

can you make sure you are opening SCC for server 2 and trying to deploy from there. if possible, can you put snapshots of your step. would be helpful to chase the prblm.

Regards,

Jitendra

DoanManhQuynh
Active Contributor
0 Kudos

Thanks Jitendra.

My problem not with deploy to multi server. it's 2nd time i try to deploy project to multi server and the first time work well with iOs application.My issue is event i deploy successfully to 2nd server, in my coding i do like below:

            //Set application details

            Sybase.Mobile.Application app = Sybase.Mobile.Application.GetInstance();

            app.ApplicationIdentifier = MyApp;

            MyProgDB.SetApplication(app);

            if (!string.IsNullOrEmpty(Host))

            {

                 MyProgDB.GetSynchronizationProfile().ServerName = Host; // 1st server

            }

            else

            {

                 MyProgDB.GetSynchronizationProfile().ServerName = HOST; //2nd server

            }

            //Set authentication credentials

            ConnectionProperties connProps = app.ConnectionProperties;

            LoginCredentials loginCredentials;

            if (!string.IsNullOrEmpty(Uname) && !string.IsNullOrEmpty(Pwd))

            {

                loginCredentials = new LoginCredentials(Uname, Pwd);                         //1st server

            }

            else

            {

                loginCredentials = new LoginCredentials(USERNAME, PASSWORD);     //2nd server

            }

            connProps.LoginCredentials = loginCredentials;

            if (!string.IsNullOrEmpty(Host))

            {

                connProps.ServerName = Host;                         //1st server

            }

            else

            {

                connProps.ServerName = HOST;                       //2nd server 

            }

            connProps.PortNumber = PORT;                          //same port

           

            //Register connection

            if (app.RegistrationStatus != RegistrationStatus.REGISTERED)

            {

                app.RegisterApplication(TIMEOUT);

            }

            else

            {

                app.StartConnection(TIMEOUT);

            }

             MyProgDB.EnableChangeLog();

then if I put 1st server's detail (my unwired server), my application run perfect but when I put 2nd server's detail i got exception like i told at the first post.