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.

Non-deterministic inability to connect to bloop at times

See original GitHub issue

I have a Scala script that I run regularly, and at times, it fails with:

Exception in thread "main" java.io.IOException: Can't connect to 127.0.0.1:49442
        at scala.build.bloop.BloopServer$.create$1(BloopServer.scala:89)
        at scala.build.bloop.BloopServer$.connect(BloopServer.scala:97)
        at scala.build.bloop.BloopServer$.bsp(BloopServer.scala:120) 
        at scala.build.bloop.BloopServer$.buildServer(BloopServer.scala:138)
        at scala.build.bloop.BloopServer$.withBuildServer(BloopServer.scala:203)
        at scala.build.Build$.build(Build.scala:190)
        at scala.build.Build$.build(Build.scala:207)        
        at scala.cli.commands.Run$.run(Run.scala:52)                            
        at scala.cli.commands.DefaultBase.run(DefaultBase.scala:25)
        at scala.cli.commands.DefaultBase.run(DefaultBase.scala:5)
        at caseapp.core.app.CaseApp.main(CaseApp.scala:150)
        at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:112)
        at scala.cli.ScalaCli$.main(ScalaCli.scala:61)
        at scala.cli.ScalaCli.main(ScalaCli.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_net_ConnectException_2_0002e_0003cinit_0003e_00028Ljava_lang_String_2_00029V(JNIJavaCallWrappers.java:0)
        at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:609)
        at java.net.Socket.connect(Socket.java:558)
        at java.net.Socket.<init>(Socket.java:454)
        at java.net.Socket.<init>(Socket.java:231)
        at scala.build.blooprifle.internal.Operations$$anon$2.openSocket(Operations.scala:205)
        at scala.build.blooprifle.BloopRifle$$anon$2.openSocket(BloopRifle.scala:118)
        at scala.build.bloop.BloopServer$.create$1(BloopServer.scala:81)
        ... 13 more

I haven’t found what causes the problem, nor did I find how to fix it…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
romanowskicommented, Oct 25, 2021

@anatoliykmetyuk I am closing the issue now since it was using quite an ancient version of Scala CLI. In case you see similar problems with current versions, please open another issue.

0reactions
alexarchambaultcommented, Oct 7, 2021

I’m not sure what causes the issue @anatoliykmetyuk is seeing.

But many things changed since 76d17af. We now default to domain sockets for the BSP connection in particular. And we also restart Bloop if its version is too old.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Computability and Complexity
Computability and Complexity. A mathematical problem is computable if it can be solved in principle by a computing device.
Read more >
Introduction to Artificial Intelligence - HKN
Let's formulate the problem as a search problem. (a) [8 pts] Suppose you use A* search with heuristics to solve the search problem....
Read more >
Implementation guide for the ISO Transport Protocol RFC 1008
Implementation guide for the ISO Transport Protocol RFC 1008 · 1 Window timer. The window timer is used for transport connection control as...
Read more >
Turing machine - Wikipedia
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to...
Read more >
EMANE: otamanager.cc Source File - Adjacent Link
6 * Redistribution and use in source and binary forms, with or without ... 336 ERROR_LEVEL,"OTAManager::open: Unable to set Real Time Priority");.
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