question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Development Client unable to connect to server

See original GitHub issue

Hi, I’m keen on helping to develop cards but I am unable to test my implementation due to my xmage client constantly timing out when trying to connect to local development server.

Other information: OS: Win 10 IDE: Intellij IDEA Ultimate Java Version: 1.8

Client output
INFO  2022-04-18 14:02:28,763 Connect: connecting to server 127.0.0.1:17171                                              =>[SwingWorker-pool-6-thread-9] SessionImpl$5.work 
WARN  2022-04-18 14:02:58,766 Cannot connect                                                                             =>[SwingWorker-pool-6-thread-8] SessionImpl.handleCannotConnectException 
org.jboss.remoting.CannotConnectException: Error setting up client lease upon performing connect.
  at org.jboss.remoting.Client.connect(Client.java:1928)
  at org.jboss.remoting.Client.connect(Client.java:737)
  at mage.remote.SessionImpl$5.work(SessionImpl.java:429)
  at mage.remote.SessionImpl$RemotingTask$1.doInBackground(SessionImpl.java:95)
  at mage.remote.SessionImpl$RemotingTask$1.doInBackground(SessionImpl.java:91)
  at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at javax.swing.SwingWorker.run(SwingWorker.java:334)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.Exception: Error setting up client lease
  at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:563)
  at org.jboss.remoting.Client.setupClientLease(Client.java:2070)
  at org.jboss.remoting.Client.connect(Client.java:1924)
  ... 10 more
Caused by: org.jboss.remoting.InvocationFailureException: Socket timed out.  Waited 30000 milliseconds for response while calling on InvokerLocator [bisocket://127.0.0.1:17171/?onewayThreadPool=mage.remote.CustomThreadPool&serializationtype=jboss]; nested exception is: 
  java.net.SocketTimeoutException: Read timed out
  at org.jboss.remoting.transport.socket.SocketClientInvoker.handleException(SocketClientInvoker.java:137)
  at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.handleOtherException(MicroSocketClientInvoker.java:1104)
  at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:966)
  at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:470)
  at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:169)
  at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:529)
  ... 12 more
Caused by: java.net.SocketTimeoutException: Read timed out
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
  at java.net.SocketInputStream.read(SocketInputStream.java:171)
  at java.net.SocketInputStream.read(SocketInputStream.java:141)
  at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
  at java.io.FilterInputStream.read(FilterInputStream.java:83)
  at org.jboss.serial.io.JBossObjectInputStream.read(JBossObjectInputStream.java:193)
  at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.readVersion(MicroSocketClientInvoker.java:1366)
  at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:920)
  ... 15 more
INFO  2022-04-18 14:02:58,769 Disconnecting DONE                                                                         =>[SwingWorker-pool-6-thread-8] SessionImpl.disconnect 
INFO  2022-04-18 14:02:58,769 Disconnected from user mode                                                                =>[SwingWorker-pool-6-thread-8] MageFrame.disconnected 

Process finished with exit code 0
Server output ``` INFO 2022-04-18 13:59:53,920 Starting MAGE server version 1.4.50-V2 (build: runtime) =>[main] Main.main INFO 2022-04-18 13:59:53,923 Logging level: INFO =>[main] Main.main INFO 2022-04-18 13:59:53,923 Default charset: UTF-8 =>[main] Main.main INFO 2022-04-18 13:59:53,925 Reading configuration from path=config\config.xml =>[main] Main.main INFO 2022-04-18 13:59:54,014 Loading database... =>[main] RepositoryUtil.bootstrapLocalDb INFO 2022-04-18 13:59:54,517 Done. =>[main] Main.main INFO 2022-04-18 13:59:54,517 Loading extension packages... =>[main] Main.main INFO 2022-04-18 13:59:54,517 Done. =>[main] Main.main INFO 2022-04-18 13:59:54,517 Loading cards... =>[main] Main.main INFO 2022-04-18 13:59:54,548 Done. =>[main] Main.main INFO 2022-04-18 13:59:54,548 Updating user stats DB... =>[main] Main.main INFO 2022-04-18 13:59:54,751 Done. =>[main] Main.main INFO 2022-04-18 13:59:54,919 Config - max seconds idle: 300 =>[main] Main.main INFO 2022-04-18 13:59:54,919 Config - max game threads: 10 =>[main] Main.main INFO 2022-04-18 13:59:54,919 Config - max AI opponents: 15 =>[main] Main.main INFO 2022-04-18 13:59:54,919 Config - min usr name le.: 3 =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - max usr name le.: 14 =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - min pswrd length: 8 =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - max pswrd length: 100 =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - inv.usr name pat: [^a-z0-9_] =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - save game active: false =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - backlog size : 200 =>[main] Main.main INFO 2022-04-18 13:59:54,920 Config - lease period : 5000 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - sock wrt timeout: 10000 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - max pool size : 300 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - num accp.threads: 2 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - second.bind port: 17179 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - auth. activated : false =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mailgun api key : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mailgun domain : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mail smtp Host : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mail smtpPort : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mail user : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mail passw. len.: 0 =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - mail from addre.: =>[main] Main.main INFO 2022-04-18 13:59:54,921 Config - google account : =>[main] Main.main INFO 2022-04-18 13:59:54,921 Loaded game types: 16, tourneys: 17, players: 4, cubes: 48, decks: 51 =>[main] Main.main INFO 2022-04-18 14:00:01,111 Started MAGE server - listening on 0.0.0.0:17171/?serializationtype=jboss&maxPoolSize=300 =>[main] Main.main
</details>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
woshikiecommented, Apr 18, 2022

See #8784

Connection seems to work after applying patch from #8627

0reactions
woshikiecommented, Apr 18, 2022

I am using the Java 8 that is recommended in the wiki https://github.com/magefree/mage/wiki/Setting-up-your-Development-Environment#java

> java -version
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot connect the computer to the server" error message ...
Cannot connect the computer to the server because either another software installation is in progress or, the computer has a restart pending.
Read more >
Cannot connect to database in client server mode on the ...
Open a PROENV console and run: showcfg to confirm. ... 2. Use -H localhost for client connection. ie., use "-db dbname -H localhost...
Read more >
Custom development client cannot connect to locally hosted ...
I am trying to get my android and ios simulator dev client to connect to a server where I host my updates. I...
Read more >
Oracle 12c Client Unable to connect Server
Hi, Client is unable to connect Server. 1. Installed Server with Oracle 12c - Its working fine . 2. Installed Oracle 12c Client...
Read more >
'Unable to connect to server' error when starting client
When starting the PaperCut User Client, I get an 'Unable to connect to server' error. Unable to connect to the server: unable to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found