on 09-25-2013 12:10 PM
Hi all.
Im now developing an android application connect with SUP server 2.2 through relay server (My SUP server is on AWS cloud). The problem here is I could connect direct to SUP without using relay server but when I use relay I got this exception:
error 558 message 'could not connect to server. verify relay server url template'.
I were searched and there are suggest about relay URL but every thing with relay is fine, I tested with my iOs device and it could connect with SUP using relay server.
Please any one here were done using relay server and SUP 2.2 can suggest me what happen...
Many thanks.
Thank you all for your suggestion. I were solve this issue by change to use Sybase Hosted Relay server and it work fine. Maybe our relay server have some issue with install or policy (I dont know yet). Anyway, thank you very much .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Quynh,
I think the problem is because relay server is not installed/configured on default path which client generally connects to.
In this case, you should set the relay server URL suffix through API in your application to be able to connect to relay server correctly.
default relay server URL suffix from client would look like "/ias_relay_server/client/rs_client.dll" for Windows IIS based relay.
Regards,
Abhishek Joshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Abhishek Joshi.
Sorry for a late reply. Could you tell me more about default install path of relay server cause im not a person who install relay server.
When I set url suffix before register app, I still got error 558 but message now is:
Error 558: "http://<my relay URL>:80/ias_relay_server/client/rs_client.dll".
Thanks.
Hi Quynh,
Could you please let me know you relay server is installed on Windows + IIS or Linux + Apache?
If it's on Windows + IIS then please go to IIS and check your relay server website (it could under Default Website as well). Check the path to client folder. Default path of rs_client.dll is \ias_relay_server\client\rs_client.dll. You can also try to browse your rs_client.dll i.e. http://<relay>:<port>\ias_relay_server\client\rs_client.dll) in your browser and it will display you relay server information.
Regards,
Abhishek Joshi
Hi Quynh,
In SUP-ODP case. Below is the code snippet for registration.
try {
/* STEP1:Initialize the App */
LiteUserManager.initInstance(getApplicationContext(), "FirstAPP");
/* STEP2:Provide SUP connection Settings and Register the User */
LiteUserManager usrMngr = LiteUserManager.getInstance();
// usrMngr.setConnectionProfile(Relay_Server_Host, Port, FormID/companyID);
if (!usrMngr.isRegistered()) {
usrMngr.setConnectionProfile("relayserver.sybase.com", 80, "Company1");
// usrMngr.registerUser(userName, actCode);
usrMngr.registerUser("APPUSER", "123");
}
} catch (MessagingClientExceptione) {
e.printStackTrace();
}
Also the relay server configuration step we follow is as below.
Step1---->Adding relay server details.
Select the first parent node in the left pane of SCC. Ex: Localhost@Localhost(Running).
Click on Relay Serveru Tab.
Enter Relay server Host. Ex: 10.77.188.99 OR relayserver.sybase.com(if you are using
Sybase Hosted relay server.
Enter HTTP port. Ex: 80
Enter HTTPS port Ex: 443
Click Next and Enter the FarmID.
Choose Type as Messaging.
Enter Description and click to add the farm to the table.
Select the above added Farm from Table.
Enter the Server NodeID and Token and click on to add.
*In case of Sybase hosted relay server, Token is automatically generated when you create a new Farm.
Step2--->Creating outbound enabler
Expand the node on the left side pane.
Select Server Configuration.
Click on the Outbound Enabler Tab.
Click on new to add a new configuration.
In the wizard, choose Farm Type as Messaging. Choose the relay server host, port ,Farm and Node ID configured above. Save the changes.
Select the outbound enabler and Start.
The Status should turn to Running.
Thanks for your detail.
Below is my coding (none ODP):
/* Set Application instance */
Application app = Application.getInstance();
PoapprovalDB.getSynchronizationProfile().setServerName("<relayserver>");
/* Set Application connection properties */
ConnectionProperties connProps = app.getConnectionProperties();
LoginCredentials loginCredentials = new LoginCredentials("<sup_user>", "sup_password");
connProps.setServerName("<relayserver>");
connProps.setPortNumber(80);
connProps.setFarmId("1");
connProps.setUrlSuffix("/ias_relay_server/client/rs_client.dll/");
connProps.setLoginCredentials(loginCredentials);
if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
try {
app.registerApplication(CNS_TIMEOUT);
} catch (Exception e) {
_msg = e.getMessage();
}
} else {
app.startConnection(CNS_TIMEOUT);
}
PoapprovalDB.setApplication(app);
ConnectionProfile profile = PoapprovalDB.getSynchronizationProfile();
profile.setServerName("<relayserver>");
profile.setPortNumber(80);
profile.setNetworkProtocol("http");
profile.setAsyncReplay(true);
profile.setDomainName("default");
profile.setNetworkStreamParams("/ias_relay_server/client/rs_client.dll/0");
profile.save();
I think it same process with yours. About relayserver, We are follow like yours too and server run good (status on SCC running too).
My coding were fine when I using relay and SUP 2.1.3...I dont know if there are some thing different between 2.13 and 2.2 version .
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.