ERROR: transport error 202: bind failed: Cannot assign requested address
Answered
Hi all
When I am trying to use sbt shell
in intelliJ it appears the following error message:
Do I miss any settings?
As you can see below, the port does not appear anywhere.
netstat -planet
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:41351 0.0.0.0:* LISTEN 1000 353424 573/java
tcp 0 0 127.0.0.1:63342 0.0.0.0:* LISTEN 1000 355674 573/java
tcp 0 0 0.0.0.0:33295 0.0.0.0:* LISTEN 1000 354289 573/java
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 101 16065 -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 34359 -
tcp 0 0 127.0.0.1:6942 0.0.0.0:* LISTEN 1000 354471 573/java
tcp 0 0 10.0.2.15:42510 151.101.193.69:443 ESTABLISHED 1000 305742 5102/chromium-brows
tcp 0 0 10.0.2.15:44344 104.66.167.140:443 ESTABLISHED 1000 345081 5102/chromium-brows
tcp 0 0 10.0.2.15:37646 198.252.206.25:443 ESTABLISHED 1000 353330 5102/chromium-brows
tcp 0 0 10.0.2.15:41480 104.16.29.34:443 ESTABLISHED 1000 349198 5102/chromium-brows
tcp 564 0 10.0.2.15:43148 172.217.168.42:443 ESTABLISHED 1000 377410 5102/chromium-brows
tcp 0 0 10.0.2.15:59768 54.246.222.93:443 ESTABLISHED 1000 368480 5102/chromium-brows
tcp 0 0 10.0.2.15:40474 216.58.215.226:443 ESTABLISHED 1000 327204 5102/chromium-brows
tcp 0 0 10.0.2.15:37728 198.252.206.25:443 ESTABLISHED 1000 376381 5102/chromium-brows
tcp 0 0 10.0.2.15:40470 216.58.215.226:443 ESTABLISHED 1000 327196 5102/chromium-brows
tcp 0 0 10.0.2.15:56458 34.193.164.107:443 ESTABLISHED 1000 352517 5102/chromium-brows
tcp 0 0 10.0.2.15:52954 91.228.74.181:443 ESTABLISHED 1000 377413 5102/chromium-brows
tcp 0 0 10.0.2.15:52956 91.228.74.181:443 ESTABLISHED 1000 377416 5102/chromium-brows
tcp 0 0 10.0.2.15:39020 172.217.168.66:443 ESTABLISHED 1000 324280 5102/chromium-brows
tcp 0 0 10.0.2.15:39324 216.58.215.230:443 ESTABLISHED 1000 375801 5102/chromium-brows
tcp 0 0 10.0.2.15:38640 172.217.168.38:443 ESTABLISHED 1000 352610 5102/chromium-brows
tcp 0 0 10.0.2.15:50876 172.217.168.46:443 ESTABLISHED 1000 343823 5102/chromium-brows
tcp 0 0 10.0.2.15:36630 198.252.206.25:443 ESTABLISHED 1000 327486 5102/chromium-brows
tcp 0 0 10.0.2.15:40544 216.58.215.227:443 ESTABLISHED 1000 318302 5102/chromium-brows
tcp 0 0 10.0.2.15:47506 151.101.194.49:443 ESTABLISHED 1000 353343 5102/chromium-brows
tcp 311 0 10.0.2.15:38920 13.32.166.42:443 ESTABLISHED 1000 377418 5102/chromium-brows
tcp 0 0 10.0.2.15:54224 192.30.253.125:443 ESTABLISHED 1000 317858 5102/chromium-brows
tcp 0 0 10.0.2.15:49846 172.217.168.46:443 ESTABLISHED 1000 327213 5102/chromium-brows
tcp 0 0 10.0.2.15:56456 34.193.164.107:443 ESTABLISHED 1000 351738 5102/chromium-brows
tcp 32 0 10.0.2.15:42114 52.207.55.4:443 CLOSE_WAIT 1000 374681 5102/chromium-brows
tcp6 0 0 :::43209 :::* LISTEN 1000 355214 772/java
tcp6 0 0 ::1:631 :::* LISTEN 0 34358 -
tcp6 0 0 127.0.0.1:30107 :::* LISTEN 1000 355213 772/java
tcp6 0 0 127.0.0.1:43906 127.0.0.1:33295 TIME_WAIT 0 0 -
tcp6 0 0 127.0.0.1:43904 127.0.0.1:33295 TIME_WAIT 0 0 -
tcp6 0 0 127.0.0.1:43922 127.0.0.1:33295 TIME_WAIT 0 0 -
Please sign in to leave a comment.
What's the full command line? Does it work in the terminal outside of the IDE if you copy/paste it?
I do not start any command but rather just click on `sbt shell` as the following:
When I just clicked on `sbt shell ` it shows the message above. I also have global sbt installed.
Thanks
That was already clear from your description. Please try the same command from the first line in the Terminal and see if it shows the same problem.
Copy/paste the complete line here.
It may help if you change the JDK to a different version and/or reinstall the JDK used to run the SBT shell.
Make sure local firewall is not blocking the java process.
When I use the terminal, then it works:
~/scala/plugger$ sbt
[info] Loading settings for project global-plugins from plugins.sbt ...
[info] Loading global plugins from /home/developer/.sbt/1.0/plugins
[info] Loading project definition from /home/developer/scala/plugger/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to plugger (in build file:/home/developer/scala/plugger/)
[info] sbt server started at local:///home/developer/.sbt/1.0/server/899f3ad085680b814ac5/sock
sbt:plugger>
Do you mean that?
No, copy/paste this line here and also in the terminal:
I am using Scala version "2.12.8" and it supports only JDK8
Here we go:
developer@sweetsoft:~$ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,address=localhost:39621,suspend=n,server=y -Xdebug -server -Xmx1536M -Didea.managed=true -Dfile.encoding=UTF-8 -jar /home/developer/.IntelliJIdea2019.1/config/plugins/Scala/launcher/sbt-launch.jar --addPluginSbtFile=/tmp/idea8.sbt "; set ideaPort in Global := 35277 ; idea-shell"
ERROR: transport error 202: bind failed: Cannot assign requested address
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
Does localhost resolve on your system? Check /etc/hosts, it must resolve to 127.0.0.1, verify with "ping localhost" command.
Here we go:
developer@sweetsoft:~$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.080 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.094 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.059 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.072 ms
For some reason your system blocks java from binding on localhost:39621. It can be a local firewall issue.
As a workaround you can disable this option:
But what I need is, the debug modus. How can I turn off local firewall on ubuntu.
The firewall is inactive. Here is the proof.
sudo ufw status
[sudo] password for developer:
Status: inactive
When I disable the option "Enable debug..." then it work. Yes are right. But still I need the debug modus.
You need to find out why your OS blocks binding on localhost, I'm afraid it's not IDE specific issue.
How can I manually determine the port by myself? Intellij randomly choose a port.
You can't, it's a random port. Your system blocks any port binding from java.
OK. Thanks so much for your help. I appreciate it a lot.