plugin cannot connect to local docker, getting "uri was not specified"

Answered

when choosing "docker machine" i keep getting "cannot connect: java.lang.NullPointerException: uri was not specified" 

i configured all the exe in docker tools (docker.exe, docker-machine, compose etc..) but still i get the same thing.

 

i can connect using tcp. 

i have intelij 2019 .

2
21 comments

If you use TCP Socket connection type, make sure Settings (Preferences on macOS) | Build, Execution, Deployment | Docker | Engine API URL is specified correctly.

If issue remains, provide screenshots of configuration you launching and describing the problem. Also attach full output of the error and idea.log file. For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.

0

with tcp it works, but with docker machine it does not 

logs does't show anything, however, googling the error message, seems to show ,it comes from docker api..

i suspect is that the ui doesn't take into account the docker machine setting and still tries to use the URI, 

 

1

Can you run docker-machine commands from Windows command line?

0

i've run docker-machine ls ? no errors. (no machines either )

 

0

We've reproduced the error message when there are no docker-machine's in the system. 
Docker plugin does not have UI for the creation of the docker machine, it only allows connection to the existing one. 
So if you want to connect to one, please create it from the command line. 
Does it work?

0
Avatar
Permanently deleted user

Hello i have the same problem. y can acces by cli to my docker machine but by pycharm he said :"Cannot connect: java.lang.NullPointerException: uri was not specified".

It's news because two days before ,it's works correctly.

Any ideas ?

1
Avatar
Permanently deleted user

I find the problem.

I have a unused machine with a digital ocean driver . This machine is destroyed for a while. I have run on my local machine : docker-machine rm <name of unused machine with digital ocean driver>

after that pycharm show me the list of my docker machine.

1

I got here searching for the same issue for Rubymine on Windows, so hopefully this helps others with this infuriating issue on Windows with Docker Desktop

  • running docker-machine create (hyperv) requires Administrator privileges
  • You'll have to run Rubymine as Administrator

That's it. Wasted hours on this, switching from Docker Machine to TCP Socket. Running Rubymine as Administrator "enables" the IDE to "find" the machine you created (not left blank with no indicator as to whether or not you can provide it).

0

Hello,

Thank you for sharing your solution!

0

No problem.

Alternatively, if you don't want to run things as Administrator, adding yourself (regular user, not Admin user) to Hyper-V Administrators Group in Windows also works.

  • Computer Management > Local Users and Groups > Groups
  • Double click Hyper-V Administrators
  • Proceed to add yourself (regular user) to the Members
  • IMPORTANT: Log off and log back in - if you don't do this, it won't work

Now you can run things as normal user (command line, Rubymine).

IMHO, a better option than what I originally did :)

Hth.

0

I have a similar problem with Golang. Docker-machine is set up but I get the java exception error. I'm on linux; not windows:

 

 

 

There are active DM connections on this system.

I don't see anything in idea.log

0

Greg, Please provide a screenshot of the Settings | Build, Execution, Deployment | Docker | Tools, does it shows the docker-machine version?
If it is not, please check the path and access rights of the docker-machine executable.
If it is shown, please additionally provide terminal output for which docker-machine && docker-machine ls

0

As shown in the snapshot, docker-machine is detected as version 0.16.2. It's not in the PATH however.

There are active connections:

0

I'm experiencing the same issue as Greg with PyCharm 2019.3 on MacOS 10.15.3

Attached are screenshots of the PyCharm settings and docker-machine location & ls.   I do have one active docker-machine setup in Pycharm,  setup about 2 months ago.  I've had various docker-machine connections for at least 2 years so this is a new problem.  

 

0

Please add #com.intellij.docker.machine to Help | Diagnostic Tools | Debug Log Settings and provide idea.log after reproducing a problem.

0

I have logs, but can only upload images.   Where should I submit them?

 

0
0

I uploaded files last week, just posting today to note that I have the same problem with 2020.1, though now I get a big red error saying "Docker Machine Required.  The existing docker-machine connection is still working fine.

Please let me know if there is anything else I can provide, I would like to have this working.

0

Michael, could you please clarify a file name?

0

idea copy.log and docker copy.log, both dated 3.29.2020.

0

Could you please invoke custom build with additional logging as described here: https://youtrack.jetbrains.com/issue/IDEA-237306#focus=streamItem-27-4099943.0-0

0

Please sign in to leave a comment.