Ich habe einen Service, der eine Socket.IO Verbindung zum Server herstellen soll.
Der Server nutzt netty socket.io, der Android Client nkzawa socketio.
Leider bekomme ich derzeit immer eine Exception mit permission denied.
Die Internet permission hat der Service aber.
Java
package com.jukusoft.chatter.service;
import android.app.Service;
import android.content.Intent;
import android.os.*;
import android.util.Log;
import android.webkit.CookieManager;
import com.github.nkzawa.emitter.Emitter;
import com.github.nkzawa.socketio.client.IO;
import com.github.nkzawa.socketio.client.Manager;
import com.github.nkzawa.socketio.client.Socket;
import com.jukusoft.chatter.IChatService;
import com.jukusoft.chatter.ISocketListener;
import com.jukusoft.chatter.data.ChatSession;
import com.jukusoft.chatter.profile.ProfileManager;
import com.jukusoft.chatter.service.task.UpdateLoadBalancerListTask;
import com.jukusoft.chatter.service.task.listener.OnUpdateLoadBalancerListTaskFinishedListener;
import com.koushikdutta.async.http.AsyncHttpClient;
import com.koushikdutta.async.http.socketio.Acknowledge;
import com.koushikdutta.async.http.socketio.ConnectCallback;
import com.koushikdutta.async.http.socketio.EventCallback;
import com.koushikdutta.async.http.socketio.JSONCallback;
import com.koushikdutta.async.http.socketio.SocketIOClient;
import com.koushikdutta.async.http.socketio.StringCallback;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import io.socket.IOAcknowledge;
import io.socket.IOCallback;
import io.socket.SocketIO;
import io.socket.SocketIOException;
public class ChatService extends Service {
private ISocketListener socketListener = null;
private List<String> loadBalancerList = new ArrayList<String>();
private SOCKET_STATE socketState = SOCKET_STATE.CLOSED;
private int checkInterval = 1;
private boolean appActive = false;
private String loadBalancerUpdateURL = "http://192.168.2.110:8080/loadBalancer.txt";
private ChatSession chatSession = null;
private ProfileManager profileManager = null;
public enum SOCKET_STATE { OPEN, CLOSED };
private Socket mSocket = null;
public ChatService() {
//http://techtej.blogspot.com.es/2011/03/android-thread-constructspart-4.html
//http://www.vogella.com/tutorials/AndroidServices/article.html
//NullPointerException by getBaseContext()
//this.profileManager = new ProfileManager(getBaseContext());
/*if (this.profileManager.isNumberSaved()) {
String telephoneNumber = this.profileManager.getOwnNumber();
this.chatSession = new ChatSession(telephoneNumber);
}*/
}
@Override
public void onCreate() {
super.onCreate();
//android.os.Debug.waitForDebugger();
//http://developer.android.com/guide/components/intents-filters.html
Log.v("ChatService", "onCreate()");
//create chat session
Log.d("ChatService", "create service.");
String host = "http://37.228.134.96";
int port = 933;//use port number < 1024, 3301
//http://programmers.stackexchange.com/questions/262497/architecture-for-a-mobile-android-chat-application
IO.Options opts = new IO.Options();
//opts.port = 3301;
//opts.hostname = "http://37.228.134.96";
//opts.timeout = 30;
opts.forceNew = true;
//https://github.com/benkay/java-socket.io.client
try {
//ChatService.this.mSocket = IO.socket(host + ":" + port);
this.mSocket = IO.socket(host + ":" + port, opts);
mSocket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.d("ChatService", "socket connected.");
// emit anything you want here to the server
mSocket.emit("login", "");
//socket.disconnect();
}
// this is the emit from the server
}).on("someFunction", new Emitter.Listener() {
@Override
public void call(Object... args) {
// this argas[0] can have any type you send from the server
JSONArray obj = (JSONArray) args[0];
// runOnUiThread is needed if you want to change something in the UI thread
}
}).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.d("ChatService", "socket disconnected.");
}
}).on(Socket.EVENT_CONNECT_TIMEOUT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.v("ChatService", "socket.io connection timeout.");
}
}).on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.v("ChatService", "connection error.");
}
}).on(Socket.EVENT_ERROR, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.v("ChatService", "socket.io error.");
}
}).on(Socket.EVENT_RECONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.v("ChatService", "try to reconnect.");
}
}).on(Socket.EVENT_RECONNECTING, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.v("ChatService", "socket.io reconnecting.");
}
});
mSocket.on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.d("ChatService", "Connection error.");
((Exception)args[0]).printStackTrace();
}
});
mSocket.connect();
mSocket.open();
//http://java.dzone.com/articles/using-spdy-and-http
//https://github.com/koush/AndroidAsync
mSocket.emit("event", "event");
} catch (URISyntaxException e) {
e.printStackTrace();
} finally {
Log.v("ChatService", "socket.io connection created, connection state: " + mSocket.connected() + ".");
}
/*SocketIO socket = null;
try {
socket = new SocketIO("http://37.228.134.96:3001/");
socket.connect(new IOCallback() {
@Override
public void onMessage(JSONObject json, IOAcknowledge ack) {
try {
System.out.println("Server said:" + json.toString(2));
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onMessage(String data, IOAcknowledge ack) {
System.out.println("Server said: " + data);
}
@Override
public void onError(SocketIOException socketIOException) {
System.out.println("an Error occured");
socketIOException.printStackTrace();
}
@Override
public void onDisconnect() {
System.out.println("Connection terminated.");
}
@Override
public void onConnect() {
System.out.println("Connection established");
}
@Override
public void on(String event, IOAcknowledge ack, Object... args) {
System.out.println("Server triggered event '" + event + "'");
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}*/
// This line is cached until the connection is establisched.
//socket.send("Hello Server!");
//https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/securechat
//https://github.com/TooTallNate/Java-WebSocket
Runnable socketRunnable = new Runnable() {
@Override
public void run() {
//https://github.com/mrniko/netty-socketio
//https://github.com/Automattic/socket.io-client
//https://github.com/nkzawa/socket.io-client.java
//http://just-another-blog.net/programming/android-create-ssl-socket-over-ssl-socket-with-client-auth/
//http://nkzawa.tumblr.com/post/46850605422/connecting-to-a-socket-io-server-from-android
//https://github.com/fatshotty/socket.io-java-client
//socket.io-java-client
//http://nkzawa.tumblr.com/post/46850605422/connecting-to-a-socket-io-server-from-android
Log.v("ChatService", "Open socket.io connection.");
String host = "http://37.228.134.96";
int port = 3301;
String cookie = CookieManager.getInstance().getCookie(host);
//http://socket.io/blog/native-socket-io-and-android/#
//http://www.htmlxprs.com/post/6/creating-a-realtime-image-sharing-app-with-ionic-and-socketio-tutorial
try {
ChatService.this.mSocket = IO.socket(host + ":" + port);
mSocket.connect();
mSocket.emit("event", "event");
/*Manager manager = new Manager(new URI("http://" + host + ":" + port));
manager.open(new Manager.OpenCallback() {
@Override
public void call(Exception err) {
Log.v("ChatService", "openCallback() " + err.getLocalizedMessage() + ".");
}
});
manager.socket("socket.io").connect();*/
Log.v("ChatService", "connect to " + host + ":" + port + ".");
//https://github.com/nkzawa/socket.io-client.java/issues/16
//http://nkzawa.github.io/socket.io-client.java/apidocs/
//https://github.com/nkzawa/socket.io-client.java
//https://github.com/nkzawa/socket.io-android-chat/tree/master/app/src/main/java/com/github/nkzawa/socketio/androidchat
/*mSocket.io().reconnectionAttempts(5);
mSocket.io().open(new Manager.OpenCallback() {
@Override
public void call(Exception err) {
Log.v("ChatService", "openCallback() " + err.getLocalizedMessage() + ".");
}
});*/
Log.v("ChatService", "connect to socket.io server " + host + ":" + port + " connected: " + mSocket.connected() + ".");
} catch (URISyntaxException e) {
Log.v("ChatService", "Socket.IO URISyntaxException.");
if (ChatService.this.socketListener != null) {
try {
ChatService.this.socketListener.onConnectionFailed(host, port);
} catch (RemoteException e1) {
e1.printStackTrace();
}
}
e.printStackTrace();
}
}
};
Thread thread = new Thread(socketRunnable);
//thread.start();
Runnable socketIORunnable = new Runnable() {
@Override
public void run() {
//https://github.com/Gottox/socket.io-java-client
}
};
Thread socketIOThread = new Thread(socketIORunnable);
//socketIOThread.start();
//https://github.com/benkay/Java-WebSocket
//Gottox/socket.io-java-client
//stackoverflow.com/questions/27145320/android-how-to-use-gottox-socket-io-java-client-library-with-right-way
}
@Override
public IBinder onBind(Intent intent) {
Log.v("ChatService", "onBind()");
if (!this.mSocket.connected()) {
this.mSocket.connect();
if (this.mSocket.connected()) {
this.mSocket.emit("onConnected", "");
} else {
Log.v("ChatService", "Could not open socket io connection.");
}
}
return this.mBinder;
}
public void openConnection () {
//contact loadbalancer first
}
public void onEvent () {
//
}
private final IChatService.Stub mBinder = new IChatService.Stub() {
public int getPid(){
return android.os.Process.myPid();
}
@Override
public void registerSocketListener(ISocketListener listener) throws RemoteException {
ChatService.this.socketListener = listener;
}
@Override
public void removeSocketListener() throws RemoteException {
ChatService.this.socketListener = null;
}
@Override
public List<String> listLoadBalancerServer() throws RemoteException {
return ChatService.this.loadBalancerList;
}
@Override
public void setChatSession() throws RemoteException {
}
@Override
public int getSocketState() throws RemoteException {
if (ChatService.this.socketState == SOCKET_STATE.OPEN) {
return 1;
} else {
return 0;
}
}
@Override
public void setCheckInterval(int interval) throws RemoteException {
ChatService.this.checkInterval = interval;
}
@Override
public void setAppActive(boolean appState) throws RemoteException {
ChatService.this.appActive = appState;
}
@Override
public void updateLoadBalancerList() throws RemoteException {
UpdateLoadBalancerListTask task = new UpdateLoadBalancerListTask(getBaseContext());
task.setOnFinishedListener(new OnUpdateLoadBalancerListTaskFinishedListener() {
@Override
public void onFinished(List<String> list) {
ChatService.this.loadBalancerList = list;
}
});
task.execute(ChatService.this.loadBalancerUpdateURL);
}
@Override
public void auth(String telephoneNumber, String password) throws RemoteException {
//
}
};
}
Alles anzeigen
AndroidManifest.xml:
Code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jukusoft.chatter" >
<permissions>
<!-- own permission for get message content -->
<permission
android:name="com.jukusoft.chatter.permission.GET_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.jukusoft.chatter.permission.GET_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- using external storage for imageCache -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- for get telephone number -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</permissions>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".profile.FirstStartActivity"
android:label="@string/title_activity_first_start"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.jukusoft.chatter.MainActivity" />
</activity>
<provider
android:name=".contentprovider.ChatContentProvider"
android:authorities="com.jukusoft.chatter.contentprovider"
android:enabled="true"
android:exported="false" >
</provider>
<!-- service in its own process -->
<service
android:name=".service.ChatService"
android:enabled="true"
android:exported="true"><!-- android:process=":remote" process :my_process -->
<!-- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> -->
<permissions>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
</permissions>
</service>
<!-- broadcast receiver which is called on boot -->
<receiver
android:name=".broadcastreceiver.ChatBootReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
</intent-filter>
</receiver>
<activity
android:name=".ui.ChatLoginActivity"
android:label="@string/title_activity_chat_login"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.jukusoft.chatter.MainActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.RegistrationActivity"
android:label="@string/title_activity_registration"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.jukusoft.chatter.MainActivity" />
</activity>
</application>
</manifest>
Alles anzeigen
Ich bekomme derzeit immer folgende Fehlermeldungen:
Code
01-24 19:20:33.240 8287-8626/com.jukusoft.chatter V/ChatService﹕ socket.io reconnecting.
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter V/ChatService﹕ connection error.
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter D/ChatService﹕ Connection error.
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ com.github.nkzawa.engineio.client.EngineIOException: xhr poll error
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.Transport.onError(Transport.java:62)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:126)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.thread.EventThread$2.run(EventThread.java:75)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:623)
01-24 19:20:33.244 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.net.PlainSocketImpl.create(PlainSocketImpl.java:198)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.checkOpenAndCreate(Socket.java:687)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.setSoTimeout(Socket.java:541)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:147)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderFields(HttpURLConnectionImpl.java:169)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:202)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ ... 1 more
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ Caused by: android.system.ErrnoException: socket failed: EACCES (Permission denied)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at libcore.io.Posix.socket(Native Method)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:282)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:608)
01-24 19:20:33.245 8287-8628/com.jukusoft.chatter W/System.err﹕ ... 11 more
01-24 19:20:38.250 8287-8629/com.jukusoft.chatter V/ChatService﹕ socket.io reconnecting.
01-24 19:20:38.266 8287-8631/com.jukusoft.chatter V/ChatService﹕ connection error.
01-24 19:20:38.266 8287-8631/com.jukusoft.chatter D/ChatService﹕ Connection error.
01-24 19:20:38.266 8287-8631/com.jukusoft.chatter W/System.err﹕ com.github.nkzawa.engineio.client.EngineIOException: xhr poll error
01-24 19:20:38.266 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.Transport.onError(Transport.java:62)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:126)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.thread.EventThread$2.run(EventThread.java:75)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:623)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.net.PlainSocketImpl.create(PlainSocketImpl.java:198)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.checkOpenAndCreate(Socket.java:687)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.setSoTimeout(Socket.java:541)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:147)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
01-24 19:20:38.267 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
01-24 19:20:38.268 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
01-24 19:20:38.268 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderFields(HttpURLConnectionImpl.java:169)
01-24 19:20:38.268 8287-8631/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:202)
01-24 19:20:38.268 8287-8631/com.jukusoft.chatter W/System.err﹕ ... 1 more
01-24 19:20:38.268 8287-8631/com.jukusoft.chatter W/System.err﹕ Caused by: android.system.ErrnoException: socket failed: EACCES (Permission denied)
01-24 19:20:38.273 8287-8631/com.jukusoft.chatter W/System.err﹕ at libcore.io.Posix.socket(Native Method)
01-24 19:20:38.273 8287-8631/com.jukusoft.chatter W/System.err﹕ at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:282)
01-24 19:20:38.273 8287-8631/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:608)
01-24 19:20:38.273 8287-8631/com.jukusoft.chatter W/System.err﹕ ... 11 more
01-24 19:20:43.280 8287-8632/com.jukusoft.chatter V/ChatService﹕ socket.io reconnecting.
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter V/ChatService﹕ connection error.
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter D/ChatService﹕ Connection error.
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ com.github.nkzawa.engineio.client.EngineIOException: xhr poll error
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.Transport.onError(Transport.java:62)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:126)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.thread.EventThread$2.run(EventThread.java:75)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
01-24 19:20:43.284 8287-8634/com.jukusoft.chatter W/System.err﹕ Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:623)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.net.PlainSocketImpl.create(PlainSocketImpl.java:198)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.checkOpenAndCreate(Socket.java:687)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at java.net.Socket.setSoTimeout(Socket.java:541)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:147)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderFields(HttpURLConnectionImpl.java:169)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at com.github.nkzawa.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:202)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ ... 1 more
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ Caused by: android.system.ErrnoException: socket failed: EACCES (Permission denied)
01-24 19:20:43.285 8287-8634/com.jukusoft.chatter W/System.err﹕ at libcore.io.Posix.socket(Native Method)
01-24 19:20:43.286 8287-8634/com.jukusoft.chatter W/System.err﹕ at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:282)
01-24 19:20:43.286 8287-8634/com.jukusoft.chatter W/System.err﹕ at libcore.io.IoBridge.socket(IoBridge.java:608)
01-24 19:20:43.286 8287-8634/com.jukusoft.chatter W/System.err﹕ ... 11 more
Alles anzeigen
Die Zeile lässt vermuten, dass eine Permission fehlt:
Woran kann das liegen?