RummyDemo server connection error

0 votes
I am trying Rummydemo from the samples of Appwarp S2. i followed all the steps for server and then application but on running app on mobile and clicking on play game buttion i m getting connection failed5 error . can anybody help me how to solve this problem or guide me in right direction.

i have made room with the dashboard service of Appwarp and then created room also and put dat app key in file of rummydemo. i changed the hostname to m ip address,but still its not working

please help.

thanks in advance..
asked Jul 4, 2014 in AppWarpS2 by pramodkoted (10 points)
retagged Jul 4, 2014 by pramodkoted
5 means that your android device/emulator failed to establish a TCP connection with the server instance. So the zone/room is not the issue right now.

Can you confirm that
1) you have internet permission in your android manifest
2) the ip address is correct (can you telnet in to on port 12346)
1)Yes internet permission is there in manifest file.
2)Yes i am able to telnet in to on port 12346 (i checked using typing command in command prompt- telnet my ip 12346)
what else can be the problem?
please reply???
Those are usually the most common cases. I hope you haven't put the IP address as "localhost" or "" in the client-side code where you initialize.

Also can you check the server logs to see if there is anything suspicious regarding the connections.
no i have put my ip address as the host name.
Hmm so like this

WarpClient.initialize("APP KEY", "");

I am assuming you've put the arguments in the right order.

What about server logs? I am not sure what else the issue could be. At this stage it really is only establishing a TCP connection with the server.

Since you can telnet, it seems some issue with the client side only. If running on device - is the device on the same wifi network as the server?
till now i was trying to run it through my device but today i tried it with emulator on the same pc where server is running and it worked. but still not working with my device with the same configuration. and further while playing with emulators when the 2nd emulator tries to play its turn it gets crash. please see the through the both problems.
m getting this error on 2nd emulator turn..

07-07 22:02:24.208: D/onMoveCompleted(1085): Sender: puss Next: 1013813967 Data: {"cards":[42,44,25,0,21,30,31,45,38],"top":26}
07-07 22:02:24.394: D/AndroidRuntime(1085): Shutting down VM
07-07 22:02:24.398: W/dalvikvm(1085): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
07-07 22:02:24.464: E/AndroidRuntime(1085): FATAL EXCEPTION: main
07-07 22:02:24.464: E/AndroidRuntime(1085): java.lang.NullPointerException
07-07 22:02:24.464: E/AndroidRuntime(1085):     at
07-07 22:02:24.464: E/AndroidRuntime(1085):     at$18(
07-07 22:02:24.464: E/AndroidRuntime(1085):     at$
07-07 22:02:24.464: E/AndroidRuntime(1085):     at android.os.Handler.handleCallback(
07-07 22:02:24.464: E/AndroidRuntime(1085):     at android.os.Handler.dispatchMessage(
07-07 22:02:24.464: E/AndroidRuntime(1085):     at android.os.Looper.loop(
07-07 22:02:24.464: E/AndroidRuntime(1085):     at
07-07 22:02:24.464: E/AndroidRuntime(1085):     at java.lang.reflect.Method.invokeNative(Native Method)
07-07 22:02:24.464: E/AndroidRuntime(1085):     at java.lang.reflect.Method.invoke(
07-07 22:02:24.464: E/AndroidRuntime(1085):     at$
07-07 22:02:24.464: E/AndroidRuntime(1085):     at
07-07 22:02:24.464: E/AndroidRuntime(1085):     at dalvik.system.NativeStart.main(Native Method)
Since the issue is only on the device it most likely means that the device is not on the same private network as the server machine.
We'll investigate the issue with the sample however its meant primarily to illustrate how to integrate with the SDK - the sample app code itself is not really production quality so might have some crashes.
What is the scenario or game that you are trying to make?

1 Answer

0 votes
Yes, the server and client need to be on the same network. In production, your server will of course need to run on a public internet IP. While in testing, people usually test on a private network and hence both client and server need to be on the same private network.

We actually have a sample for quizup. The client side is done in windows phone though but you can see the approach.
answered Jul 8, 2014 by dhruvc (1,099 points)
client side approach is not given in the sample and further how to see windows phone  client side code of the sample. i downloaded it and checked but dont know how to use it. please help if u can. Thanks in advance.
You can follow the source code (in C#). To run you will need to have Visual Studio Express. However I just recommend you browse through the client and server code to understand the high level approach. Then you can start your own on Android.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on