w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android ksoap connection timed out when using more than one device on same wireless network :(
Turns out ksoap2 works well, and my code works well. After tracing ksoap call method, and sniffing html traffic I found out that, sometimes, server doesn't respond on my requests. This happens because server configuration was changed and now, when there are a lot of requests from the same IP address, server treats some of them as retransmission and ignores them. This problem has to be solved on server side.

Categories : Android

Connection reset by peer Exception in Soap Webservice calling
Check out following links may be one of them solves your problem link1 link2 link3 These links consist of some solution at client side and some on server side and also they provide information why its happening. Let me know if this helps you.

Categories : Android

Exception Connection refused while connecting Android device to PC
You are trying to access http://localhost:8080/project-server/rest/?value=test, but localhost refers to the loopback address 127.0.0.1, so your request is sent to your Android device itself, not to your pc. Change localhost with the ip address of your pc.

Categories : Java

failed (104: Connection reset by peer)
The above nginx error indicate that issue is related to the fastcgi(php-fpm). After enabling the "catch_workers_output" on /etc/php5/fpm/pool.d/www.conf Got the relevant error on php5-fpm.log. Now understand that issue is related to AMQP module. [21-Aug-2013 23:32:57] WARNING: [pool www] child 16091 said into stderr: "php-fpm: pool www: symbol lookup error: /usr/lib/php5/20090626/amqp.so: undefined symbol: amqp_open_socket" Issue has been fixed afterrecompiled and install amqp module

Categories : PHP

MongoDB connection reset by peer
Not sure if this is an answer or even makes sense, but I added one more loop in my insert sequence, and that corrected the problem. It seems that the original object I thought I was inserting was actually a list of documents instead of document-level, and this was implicitly batch-inserted---when I thought I was actually inserting one document at a time, I thought I was already looping at the document level. It appears that over the course of the batch insert, the connection closed.

Categories : Json

C Sockets recv: connection reset by peer
Since you didn't post full code, I am going to take a stab at it and make an assumption: You populate the format string of "GET %s HOST:%s " with restOfURL and baseServer However, during the time of the sprintf call restOfURL isn't initilized so you're pushing garbage data into the first %s Either post more of your code or make sure you initialize resOfURL

Categories : C

wifi-direct end connection to peer on Android?
this is the method I am using to disconnect from peer. I noticed from logs that the android built in app also uses the same method to disconnect the peers. public static void disconnect() { if (mManager != null && mChannel != null) { mManager.requestGroupInfo(mChannel, new GroupInfoListener() { @Override public void onGroupInfoAvailable(WifiP2pGroup group) { if (group != null && mManager != null && mChannel != null && group.isGroupOwner()) { mManager.removeGroup(mChannel, new ActionListener() { @Override public void onSuccess() { Log.d(TAG, "removeGroup onSuccess -");

Categories : Android

php5-fpm + nginx + google bot = connection reset by peer
If you look a the error message, it says while reading response header from upstream Which means that the issue is not that google is terminating the request, but rather that nginx's upstream, which happens to be php-fpm, is terminating the request. Usually, this is caused by an error the the php code being ran. Given that we don't have the code, here are some general troubleshooting steps: In php-fpm's configuration, increase the values of request_terminate_timeout, max_input_time and max_execution_time. Activate error logging in the php.ini or pool .conf configuration files (but not "display_error", if it's a production website). Try running a debugger on the running code (xdebug is very useful) to step through the code and you'll stumble upon most issues.

Categories : Nginx

Connection Reset by Peer with Python module urllib
If you don't know the exact problem, you can catch all exceptions as so: try: urllib.request.urlretrieve(myUrl['link'],str(count)+'.jpg') except URLError as e: print(e.reason) except KeyboardInterrupt as ki: raise ki except: print("Unknown Error")

Categories : Python

fatal: read error: Connection reset by peer
For the first issue vijay13@ubuntu:~$ git clone git://anongit.kde.org/plasma-mediacenter Cloning into 'plasma-mediacenter'... fatal: read error: Connection reset by peer Here you are trying to check out a code by using the above command. I even encounter this error : Connection reset by peer when try to check out a code. It is a problem with your internet connection. Check your internet connection and try again. It helped me.

Categories : GIT

Random PHP FastCGI / Connection reset by peer / incomplete headers
This issue is generally not just Host specific, it is developer related as well, depending on the configuration. However some hosts are rather strict with FastCGI and will limit your capabilities. It is generally easier to run without using FastCGI and just use mod_php unless you have specific need to use FastCGI in your application. We would need to see your fcgi wrapper (what's in /dev/shm/blackmou-php.fcgi) or .htaccess for FastCGI spawning, to better assist you without knowing which files and the code that is on those files the issue occurs with. Also do your hosts use Apache, LightHttpd, or Nginx (or combination)? At that point I strongly suggest updating to use PHP 5.3.9+ As this can be caused by any number of issues, FastCGI effectively prevents your site/scripts from being attack

Categories : PHP

Does a TCP peer reset the connection after exhaust the send retry counter?
In the absence of an ACK for the entire send window, the sender assumes that that the peer has gone away and silently cleans up the connection (no FINs or RSTs sent at this stage) after retries. If the peer was actually alive and sends a packet on the old connection, the sender will then send a RST.

Categories : Windows

HTTPS Connection with Android
If your server has a certificate signed by a certificate authority like verisign, you shouldn't do any additional stuff when making a request. Apart putting an s to https of your url, of course. EDIT : CredentialsProvider credProvider = new BasicCredentialsProvider(); credProvider.setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials("username", "password")); DefaultHttpClient http = new DefaultHttpClient(); http.setCredentialsProvider(credProvider);

Categories : Android

creating https connection in android
public String SendHttpPost(String URL, JSONObject jsonObjSend) throws ClientProtocolException, IOException { DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httpPostRequest = new HttpPost(URL); // Set HTTP parameters /*StringEntity se; se = new StringEntity(jsonObjSend.toString());*/ jsonObjSend.length(); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(jsonObjSend.length()); nameValuePairs.add(new BasicNameValuePair("data", jsonObjSend.toString())); // Log.i("jsonObjSend.toString()","jsonObjSend.toString()"+jsonObjSend.toString()); Log.i("HTTPPOST","URL: "+URL); Log.i("HTTPPOST","Request: "+jsonObjSend.toStr

Categories : Android

Android socket behaves strangely after Wi-Fi connection is reset
Welcome to the Android WiFi socket hell. I usually recognize that the underlying connection have been interrupted by catching th exception and searching into the exception message for the text "broken pipe": if (socketException.getMessage().toLowerCase().contains("broken pipe")) { forceReconnection(); } so forceReconnection() clear the in/out buffer: protected void disposeIO() { // shoutdown socket IO try { socket.shutdownInput(); } catch (Exception e) { } try { socket.shutdownOutput(); } catch (Exception e) { } try { this.inputReader.close(); this.inputReader = null; } catch (Exception e) { } // close out stream try { outputStream.close(); outputStream = null; } catch (Exception

Categories : Android

How do you create a peer to peer connection without port forwarding or a centeralized server?
It is possible. I see at least 2 parts to your question. (It is not going to be HTTP packet. It is a lot more complex then that.) First off, I believe you might be talking about a concept called decentralized P2P network. The main idea idea behind decentralized peer-to-peer network is the fact that nodes conjoint in such a network will not require central server or group of servers. As you might already know, most common centralized peer-to-peer networks require such centralized system to exchange and maintain interconnectivity among nodes. Basic concept is such, as new node will connect to one of the main servers to retrieve information about other nodes on the network to maintain its connectivity and availability. Central system gets maintained through servers constantly synchronizing

Categories : Misc

Android SDK Manager won't update: connection to https://dl-ssl.google.com refused
Use the ControlPanel applet in the java bin directory, (/usr/lib/jvm/jdk1.7.0/bin/ControlPanel) (change for your java version). In the Java Control Panel [General] TAB, Select the [Network Settings] button, Change the proxy settings from [Use browser settings] to [Direct connection]. (There are proxy settings in the Browser, Eclipse and the SDK which are all blank and only this java setting worked). Next in Android SDK tools dir, open the android shell script and towards the end of the file, find the line with: exec "$java_cmd" and below this, insert the line -Djava.net.preferIPv4Stack=true I have found that these 2 steps has fixed this for me using both ubuntu 12.04 64bit, java 1.7.0_21-b11 and ubuntu 12.04 32 bit, java 1.6.0_45.

Categories : Android

How to do network tracking or debugging WebRTC peer-to-peer connection
If you're using Chrome, you can navigate to chrome://webrtc-internals. This will show you the offer, answer, ICE states, and statistics about the connection (once it has been established). For more in-depth debugging, you can see logs of all the STUN pings between candidates by starting Chrome with the following flags: --enable-logging --v=4 The logs will be in the chrome_debug.log file in your user data directory: http://dev.chromium.org/user-experience/user-data-directory

Categories : Misc

How do you set up a peer-to-peer connection for an online game built for the web?
Cube Slam uses the Channel API for messaging/signaling, along with Ajax. The HTML5 Rocks WebRTC article describes how this is done for the apprtc.appspot.com video chat app. Another alternative, as you suggest, is to use something like Socket.IO. I built a codelab that gives step by step instructions on how to do that: bitbucket.org/webrtc/codelab.

Categories : Javascript

Peer-Peer communication using wi-fi in android
I haven't done this so I can't provide code, but the answer is to use wifi- direct. http://developer.android.com/guide/topics/connectivity/wifip2p.html. That allows you to discover devices on wifi with you, then send data to them via normal sockets. There is a wifi-direct sample app with the SDK.

Categories : Android

Android/iOS Peer-To-Peer architecture
Open Garden is developing this sort of technology and implement it in their app, Firechat. Testing the app, we found that Android-to-Android connections worked only over Bluetooth, iPhone-to-iPhone worked with bluetooth or wifi, and Android-to-iPhone only works if the phones are connected to the same network. Here's a link to their sdk which should be out soonish: https://opengarden.com/sdk

Categories : Android

Connection to HID USB device (keyboard and mouse) in android
Have you looked at Android Open Access Protocol yet? In the section titled HID Support: The AOA 2.0 protocol adds four new USB control requests to allow the accessory to act as one or more HID input devices to the Android device. Since HID support is done entirely through control requests on endpoint zero, no new USB interface is needed to provide this support. HTH.

Categories : Java

how to set up a bluetooth connection between windows pc and android device
Visit these links. Hope these help http://www.forward.com.au/pfod/serialBluetoothConnections/index.html http://blackmarketserver.com/blog/2010/11/23/bluetooth-file-transfer-between-android-2-2-and-windows-7 It is a possible duplicate of this question. Please have a look access of files on windows pc from android device, bluetooth?

Categories : Android

Http Connection Refused on Android Device
Is that IP address accessible to outside world? Just a guess: I think the IP address, you were using might have been reserved. It worked in emulator cause you were still in the network (probably in your office). As you came outside the network with your real device it didn't work.

Categories : Android

Problems with connection between PC and Android device - SocketException
Based on the comments, there are two things you should pay attention. First, you are contacting a device in your local network from your local network using the public address. I'm not sure that all of the routers will be able to do this properly, but nevertheless you need to forward the 8867 port if you want public access. Try it, it may help. Search your router here and you will find an explanation how to do that: http://portforward.com/ The phone should certainly be available when accessing the phone from outside the network after forwarding. Of course, your phone should always have the same local address. Reserve it in the router settings or set it manually on the phone. For testing purposes, try to use the phones local IP address from your PC.

Categories : C#

Android KSOAP with .Net Web Service
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); HttpTransportSE ht = new HttpTransportSE(URL); ht.call(SOAP_ACTION, envelope); final SoapPrimitive response = (SoapPrimitive)envelope.getResponse(); final String str = response.toString(); use this for your reference. Hope this will help you.

Categories : C#

SQL through a ksoap WebService in android
If you have get an error for out of Memory issue then this will help you. public Bitmap getResizedBitmap(Bitmap bm, int newHeight, int newWidth) { int width = bm.getWidth(); int height = bm.getHeight(); float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // CREATE A MATRIX FOR THE MANIPULATION Matrix matrix = new Matrix(); // RESIZE THE BIT MAP matrix.postScale(scaleWidth, scaleHeight); // "RECREATE" THE NEW BITMAP Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); return resizedBitmap; }

Categories : Android

Best practice for handling one tcp connection on a android device with many activities
I was working on this topic recently, having pretty much the same use case as you, with one difference: I implemented multiple concurrent TCP socket connections, which was a lot of work, but in the end it worked like a charm. In my opinion, AsyncTask are no valid option. They can have advantages, if you want to transfer fix-sized data collections like Image Folders or big files, while keeping the user up-to-date with the current progress. For a flexible communication it is easier to work with Threads. The proper way to make "ConnectionThreads" reusable for multiple activities is a "ConnectionService". Your activites can subscribe to this service and ask it to open a connection to the server. Once connected, the service keeps the connection, even if the activity is paused/destroyed.

Categories : Android

arduino & android device connection error because of Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.bluetarduino" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /> <!--Add your permissions here--> <uses-permission android:name=”android.permission.BLUETOOTH” /> <uses-permission android:name=”android.permission.BLUETOOTH_ADMIN” /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.bluetarduino.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name=

Categories : Android

ksoap(web services) example in android using SoapPrimitive
Why are you using a SoapPrimitive? First of all, check if your response is an Error. Otherwise, get de responsebody from the response object by calling response.bodyIn: SoapObject response = null; if (envelope.bodyIn instanceof SoapObject) { // SoapObject = SUCCESS response = (SoapObject) envelope.bodyIn; } else if (envelope.bodyIn instanceof SoapFault) { // SoapFault = // FAILURE SoapFault soapFault = (SoapFault) envelope.bodyIn; throw new Exception(soapFault.getMessage()); } Then, you can get properties from your response by calling response.getProperty("responsecode") for example. Also, put the debug value of your HttpTransportSE on true while debugging: transportSE.debug = true;

Categories : Android

call webservice in android with ksoap
1. change url to private static final String URL = "http://localhost:60977/Service1.svc"; and also check getting java.io.IOException: HTTP request failed, HTTP status: 404 in ksoap2 while passing xml data to soap1.2 android and unable to get Response from HttpResponse when passing soap object (soap1.2) android?

Categories : Android

android ksoap and object in return
change your line: SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse(); to SoapObject response=(SoapObject)envelope.bodyIn;

Categories : Android

how to Call ksoap web service from android?
try Following Samples. ksoap-android-web-service-tutorial android-calling-a-web-service-using-ksoap2-passing-values-to-a-web-service Hope this will solve your problem I use the following method to call ksoap web-servie public String getServiceResponse(String nameSpace, String methodName, String soapAction, String Url, List<PropertyInfo> mPropertyInfo) { String mResponse = ""; SoapObject request = new SoapObject(nameSpace, methodName); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); if (mPropertyInfo != null) { for (PropertyInfo propertyInfo : mPropertyInfo) { request.addProperty(propertyInfo); } } envelope.dotNet = true; envelope.setOutputSoapObject(request);

Categories : Android

Android:unable to get data from webservice using kSoap
You should do network realted operation on a thread. You can use a thread or AsyncTask. Move your loginAction() inside a thread or inside doInbackground of AsyncTask. Remember not to update ui from the back ground thread. new TheTask().execute(); AsyncTask public class TheTask extends AsyncTask <Void,Void,Void> { @Override protected void onPreExecute() { super.onPreExecute(); // display a dialog } @Override protected Void doInBackground(Void... params) { // your login authentcation // remove updation of textview. // do not update ui here return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); // dismiss the dialog

Categories : Android

IBM Worklight 6.0 - Socket Exception connection reset
According to the exception, the root cause is that the connection was reset. There are several reasons why this could happen, one being network packets being lost or similar lower level connectivity issues; another possible reason could be that SharePoint is timing out the socket to free resources. The best way to troubleshoot this kind of problems IMO is by sniffing into the network connection using tools like WireShark or Fiddler Please have a look at the top-voted answer and comments to this question for more insights into the problem.

Categories : Sockets

IBM Worklight - exception when trying to open application in Android device
In addition to what I have mentioned in my comment to your question, the most common cause to this is using Worklight 5.0.5/6.x in conjunction with ADT v22. To fix the issue, follow these steps: Right-click on your generated Android project and choose "properties". From the left pane, choose "Java Build Path' Tick the "Android Private Libraries" checkbox Refresh the project / re-build the app As for changing the name of the application, see instructions in this SO question: IBM Worklight - how to rename an application and change its icon, splash image

Categories : Android

Android: ksoap, "UnknownHostException:host is unresolved" depending on API
UnknownHostException:host is unresolved Make sure you have added permission in your AndroidManifest.xml like this <uses-permission android:name="android.permission.INTERNET" /> and also Make sure its added inside <manifest> tag not inside any other tags like <application> etc PS. Also Make sure for following permissions <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />

Categories : Java

Exception loading pocketsphinx_jni while running PocketSphinxDemo on Android device
When I go to the pocketsphinx_jni folder, located in /PocketSphinxAndroidDemo/obj/local/armeabi/objs-debug, it appears to be empty. System.loadLibrary doesn't load a folder, it loads a library. libpocketsphinx_jni.so is a library built with ndk-build during the build process. objs-debug/pocketsphinx_jni is a temporary folder used to build this library, its supposed to contain temporary files. The library itself must be located in Demo/libs/armeabi/ libpocketsphinx_jni.so Is there anything that should be in this folder? In this particular folder you should have files like pocketsphinx_wrap.o.d. Those files are created with ndk-build. What is causing this error? You didn't run ndk-build or there were errors during ndk-build and you ignored them.

Categories : Android

Ksoap android with security header and complex data types example
Check this link: http://seesharpgears.blogspot.in/2010/10/ksoap-android-web-service-tutorial-with.html http://piergiu.wordpress.com/2010/09/13/experiencing-with-ksoap-2-and-complex-objects/ Hope this will sove your problem

Categories : Android

JAVA web service receiving null parameters from Android Ksoap
Your method's first argument's type is String array, not only String. Instead of StringArraySerializer, please try adding strings manually. You should see this page for this: Adding an array of complex objects to the request.

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.