XX-net/XX-Net · critical
x-tunnel login_session fail, session not start
Error message
x-tunnel login_session fail, session not start
What it means
proxy_session.start() initializes transfer state and then calls login_session() to authenticate with the x-tunnel server; when login fails (bad credentials, unreachable server, or API error) start() logs this warning and returns False, so the session never sets running=True and no worker threads are spawned.
Source
Thrown at code/default/x_tunnel/local/proxy_session.py:149
self.traffic_upload = 0
self.traffic_download = 0
self.last_traffic_upload = 0
self.last_traffic_download = 0
self.last_traffic_reset_time = time.time()
# sn => (payload, send_time)
# sn => ack
self.wait_ack_send_list = dict()
self.ack_send_continue_sn = 0
self.received_sn = []
self.receive_next_sn = 1
self.target_on_roads = 0
self.server_time_offset = 0
self.server_time_deviation = 9999
if not self.login_session():
xlog.warn("x-tunnel login_session fail, session not start")
return False
self.running = True
for i in range(0, g.config.concurent_thread_num):
if i in self.round_trip_thread:
continue
self.round_trip_thread[i] = threading.Thread(target=self.normal_round_trip_worker, args=(i,),
name="roundtrip_%d" % i)
self.round_trip_thread[i].start()
self.connection_pipe.start()
xlog.info("session started.")
return True
def timeout_checker(self):
while self.running:View on GitHub (pinned to cfa5bc17b6)
Solutions
- Verify login_username/login_password in your x-tunnel config are correct and the account is active with remaining quota.
- Check network/DNS access to the x-tunnel API server and retry after transient outages.
- Inspect preceding log lines for the specific login_session failure reason (HTTP status, API error message).
- If credentials were rotated, update config and restart the tunnel.
Defensive patterns
Strategy: fallback
Validate before calling
ok = session.start()
if not ok:
# fall back to direct connection or another proxy
switch_to_direct() Type guard
def can_start(session) -> bool:
return bool(session.login_session()) if hasattr(session, 'login_session') else True Prevention
- Verify credentials and account quota before starting the session.
- Fail over to a direct/alternate route when start() returns False.
- Alert on repeated login failures rather than silently retrying forever.
When it happens
Trigger: Calling start() with an incorrect login_username/login_password, an expired/invalid account, or when the control API server is unreachable, causing login_session() to return False.
Common situations: Wrong or expired x-tunnel credentials in config; account out of quota; server-side migration/URL change; DNS or firewall blocking the API endpoint; system clock skew breaking auth.
Related errors
- login session fail, status:%r
- login_session time:%d fail, res:%d msg:%s
- login session server is down, try get new server.
- login_session %s json error:%r
- APPID_manager, set_appid_not_exist %s
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/34e5f320952d233d.
Report an issue: GitHub.