I have followed the tutorial of bluemix that is called bluelist. See here: http://www.ibm.com/developerworks/library/mo-android-mobiledata-app/#N1021F
I have installed all required libs and i have installed everything in the bluemix side.
I get error IBMBLUEMIX-0554E: timeout expired before connection could be established.
any solutions?
This could be caused by a couple issues.
You could be attempting to access an internal test zone (AKA stage1) without being in the internal network. Make sure there is not stage1 present in your app route.
Your phone/emulator may not be connected to a network properly. Please be sure that your test device is connected to the internet via data service or local connection. You can try running a speed test on that device if in doubt. Some custom created emulators can also have issues of their own. Try using a physical device if possible.
You may be on a network using a proxy server. I have heard of timeout issues when using a proxy. You may need to use a network that does not utilize a proxy.
This issue comes intermittently some times due to network/connectivity issue.Also you need to Verify that your applicationId, applicationSecret, and applicationRoute are correct.You can go to the Overview of your Mobile Cloud Service application on ACE to find your applicationId and Route. The applicationSecret is on the MAS portion of the ACE UI for your application.
Similar issue was reported already:
https://developer.ibm.com/answers/questions/26821/getting-time-out-error-while-conencting-to-mobile-cloud-bluemix-application.html
Related
Hello there long time reader of Stack Overflow but first time poster,
I am a bit new to android development but we decided to build a Xamarin.Forms app which consumes our ASP.NET REST service. When running the app on an emulator on my computer, connected via ethernet, I am able to connect to the service. However, when running on a tablet or phone that is connected on our work wifi, the connection just hangs and times out.
Interesting enough, when the device is switched to mobile data it can connect to the endpoints again, and iPhones can connect to the endpoints on mobile data or wifi.
I'm curious what I'm missing here. Please let me know what you think or additional information I should include.
While this thread has been opened for some time, we have found our problem resolved: it was a mixture of our network support changing some settings on our routers (though I can unfortunately not remember what settings) and also our tablets do a system update.
I am not sure which of these factors was the cause of our success now but the issue is done. I just wanted to post this in case anyone else ran into something similar.
Here is the deal... I have created a web service (asmx) which is running a long time consuming procedure in a class and returns the result. The web service is served in my local windows 10 IIS connected to the router with port forwarding. The android device connected to the same router (as the iis) accesses the web service in IIS with the outside IP (my router's IP on the internet - for checking purposes). I noticed that the first device accessing the service is served ok but the second delays big time to be served. Checking the net I found that there is a restriction in serving devices from the same IP. I disconnected one of the devices from the WLAN and everything worked as a charm. Both devices were served in the same time. How can I overcome this problem?
Thanks in advance
Searching the Internet I discovered (there are huge chances that I may be wrong) that this might have to do with the default behavior of DotNet framework which locks the session to the first in first served device:
ASP.NET application to serve multiple requests from a single process
and
Android http connection - multiple devices cannot connect the same server
I suppose that my IIS assumes that the attempt to hit the web service from the second device is another attempt by the same device. I also suppose that it assumes the device to be the same device since it is the same application with the same internal environment hitting the web service and it can't tell that they are two different devices. I tried to reproduce this error and check if I am right by hitting the IP reporting page in IIS from two different tabs of the Mozzila Developer edition browser but it works ok (so I am not sure if it is a session issue). I also found a report that the issue is present only in android devices but it was not clear enough if the server was IIS... The solution mentioned was "incorrect flag on the tcp kernel settings - Reuse connection". Does it tell anything to anyone of you?
If the session lock is indeed the problem is there a solution to make IIS distinguish that there are two devices indeed? Is there a setting in IIS that would change this default behavior of DotNet?
I am sure there is a solution (if indeed the issue is session lock) because I uploaded my code to an on-line server and it works perfect when hitting it from two Android devices. So either it is not a session lock issue or there is a setting that it changes this behavior of DotNet in IIS... Is anyone aware of such a setting?
I can proxy almost every application but there are some that won't even make a connection when either the system proxy is set via Wlan -> Modify network config or using the Global Proxy setting from ProxyDroid.
I guess these applications are somehow monitoring that a proxy is used even with ProxyDriod on a rooted phone. The applications work as normal when the proxy is turned off. When turned on the applications are not making a single request, they just return an error code. The error code is identical as if Wifi and Celluar data is turned off.
Sample of applications affected:
BankId
Handelsbanken Privat
Facebook - does not throw an error but no requests are shown. If functions like search are used an error is thrown
Mobile used for proxying:
Samsung Galaxy Note 4 SM-N910F
Android 6.0.1
Rooted using CF-Auto-Root
Burp is used as a proxy listener and has been set up using these guides and normal HTTPS sites works without a warning.
https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp
https://support.portswigger.net/customer/portal/articles/1841102-Mobile%20Set-up_Android%20Device%20-%20Installing%20CA%20Certificate.html
What is the most probable way that these applications check if a proxy is used? Has anyone else experienced this and managed to bypass proxy evasion from an Android App?
It seems the applications does not check for a proxy but rather they check the certificate using SSL pinning, which is really great except for my purpose.
More about certificate pinning.
Here is what I did to get it working:
Install CWM custom recovery. I used this guide for this:
http://www.droidopinions.com/install-cwm-custom-recovery-galaxy-note-4-models/
I then followed this guide to install the Xposed framework:
https://devs-lab.com/download-install-xposed-for-samsung-devices.html
Then I installed JustTrustMe from Github:
https://github.com/Fuzion24/JustTrustMe
After enabeling the module and restarting the phone I could proxy every application without trouble.
Here is a great guide for proxying Android applications:
https://secvibe.com/android-appsec-27855dca8531#.ta66ox3di
Note:
I also tried installing Cydia Substrate from Android Play Store and then install the apk for Android TrustKiller. However this did not work for me. From Cydia Substrate I got the error
"Something about your device made it impossible for substrate to
perform its internal safety check; can you please contact saurik via
e-mail?"
Also Android TrustKiller has not been updated for three years.
I have an Android app which is continuously downloading JSON files with status updates, and if needed it downloads corresponding zip files. What the application exactly does is irrelevant.
The problem is that if i have 2 devices running in the same LAN with the app installed, one app blocks HTTP request of the other one. So one app is running fine, the other one is constantly running into timeouts for exactly the same request (only the token in the GET parameter differs).
When i turn of the "working" device, the block is released - and the other device is running fine, without timeouts.
Myself i think it is an routing issue.
Does anybody know how to prevent this?
In my app i connect through Volley. I am using a singleton for the connection pool - build by the documentation you can find on https://developer.android.com/training/volley/requestqueue.html
This is not likely a client issue (your Android app). You should check your server implementation first.
Singleton or transient RequestQueue in Android app doesn't matter. Because number of concurrent GET requests to server depends on number of devices you have.
There seems to be an issue with android devices and timestamps that are used for the connection. I found the solution to the problem.
Search the solution in the TCP protocol / settings.
i have developed an android application in android sdk 2.2 . This app is having tomcat server connectivity as well as mysql database connectivity. this app is running fine on emulator.
but for deploying this app on android device do i need to configure any settting??
Not particularly, if you have it working in an emulator. But why ask this on StackOverflow? Just go out and try it on a device. Also be aware that client network connectivity is frequently slow, error-prone and sometimes nonexistent, so make sure you're handling network issues gracefully.
EDIT: The comment below would indicate this is actually a duplicate of Access dev machine localhost via usb, although the original wording is pretty unclear.