TLS verification issue when setting up remote docker interpreter in pycharm in Windows - windows

I try to use Docker integration in Pycharm in Windows 10.
It asks me to create a "Docker Server" (don't know what that is) and after I just use the default settings it tells me
"Enabled TLS verification (DOCKER_TLS_VEROFY=1) but certificate path
(DOCKER_CERT_PATH) 'C:\xxx' doesn't exits"
. How do I fix that? Moreover, it seems like it tries to use "docker-machine" rather than the native "docker" cli. Why? (Again, I am new to docker so I am not sure what's the difference).

Since I had a failry hard time getting the remote interpreter running,
here is the short version for those using 64bit Windows 10 Pro,
Enterprise and Education (1511 November update, Build 10586 or later)
as specified here:
https://docs.docker.com/engine/installation/windows/#/docker-for-windows
And in the future hopefully all recent Windows 10 versions.
There is no need to fiddle around with the docker-machine. When Docker
is up and running:
1. Make sure you share the C drive between Docker and your local machine
2. When specifying the remote interpreter set tcp://localhost:2375 as API URL. That’s it.
Credit: Markus at this blog post comments: https://blog.jetbrains.com/pycharm/2015/12/using-docker-in-pycharm/#comment-296772

Related

Why does Cygwin need _two_ reboots before sshd picks up PATH environment var changes?

I have a very strange problem with Cygwin sshd and changing the PATH environment variable through the Windows control panel. This is with Windows 10 64 running in a Parallels VM
After a reboot ssh sessions into the Windows machine will still use the old path. Local Cygwin sessions have no such problem: they will use the new path.
Note the bold text: I am aware that without the reboot this is expected to happen (because sshd got started with the old environment). But the After the reboot has got me baffled. If I ssh into the machine I see the old PATH. If I then reboot the VM again and ssh in again I finally see the new path.
Incidentally (fodder for future people googling this) I had the problem while using gitlab-runner to run CI/CD jobs on Windows using Parallels VMs on my Mac. So I would prepare the VM to have all the right tools installed and everything set correctly, then shut it down. gitlab-runner will then clone the VM and run the CI/CD jobs on it. Works now, as long as I reboot the original VM twice with an ssh session in between before having it cloned by gitlab-runner:-)
I never posted the answer I found: the problem was that hibernate was enabled on Windows. Actually the first "restart" was usually a shutdown followed by a startup.
But, by default Win10 has hibernate enabled, and if that is the case a shutdown and startup don't actually reboot the OS.
Disabling hibernate fixed it.
Double-check your Cygwin sshd installation, as described in "Installing Cygwin and Starting the SSH Daemon"
it makes sure the %PATH% does not reference other SSH, like W10 OpenSSH.
it stops any other SSH service.
it defines a Cygwin SSH Windows service, using a local account, which then should pick up the same account new path after a single reboot (or even with restarting the service, without reboot)
I am not sure why you need two reboots in your case, but see if that Cygwin sshd setup works better.

Docker for windows will not start [duplicate]

This question already has answers here:
Docker cannot start on Windows
(59 answers)
Closed yesterday.
I have installed Docker for windows as a complete noob looking to try it out.
I have ensured Hyper-V is enable, virtualisation is enabled also
any time I try and run the docker desktop the whale icon is red and it states that it could not start, and if I try to run a command like from cmd I get teh following error
error during connect: Get
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open
//./pipe/docker_engine: The system cannot find the file specified. In
the default daemon configuration on Windows, the docker client must be
run elevated to connect. This error may also indicate that the docker
daemon is not running.
I am at a loss as to how I can trouble shoot.
I have also noticed that the STATE when i list my WSL devices is always set as "Installing" even if I completely uninstall Docker through Add/Remove programs
I have had similar error and solved as follow;
In cmd, on admin mode run below command:
docker-machine restart default
if you see anything like: it is not exist then run: docker-machine create
Then you'll get a message something like:
open C:\User\{User_name}\.docker\machine\machines\default\config.json:
The system cannot find the file specified.
Go to the docker icon which will be on your windows tray (bottom right corner of the desktop)
Right click on the docker icon > Settings > Reset > Restart Docker
This solution worked for me. And reference for this answer:
docker cannot start on windows
Literally do as it says: launch Docker as admin.
Quit Docker, and ensure it is no longer running. You should be able to see if its running in the system tray. Right click -> Quit Docker Desktop
It may take a few seconds for it to stop. Wait for the windows notification:
Navigate to the installation directory, which for me was defaulted to C:\Program Files\Docker\Docker. Launch Docker Desktop.exe as admin
This will open the Docker UI. Wait for Docker to fully start up before attempting to consume its services
I had the same problem and here's how I solved it. Install the Docker and please follow brief instructions...
First - I enabled virtualization from BIOS.
Second - I downloaded and installed Linux kernel update package.
Third - Go to "Turn windows features on and off" window
Check whether following is checked...
* Virtual Machine Platform
* Windows Hypervisor Platform
* Windows Subsystem for Linux
You need to restart the PC and Docker will be working.
Please refer the following link and it will definitely give you more information - https://docs.docker.com/docker-for-windows/install/
Go to Powershell (run as administrator), and run this lines
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
check if it set on Linux containers overwise switch to Linux
Have you tried running Docker using WSL2?
https://docs.docker.com/docker-for-windows/wsl/

"Failed loading ClientOU certificate at ..." while running a Hyperledger Fabric sample "Building Your First Network"

I'm trying to test my development environment and keep getting this error while going through the "Building Your First Network". I've installed the prerequisites on a Windows 10 Home edition so I'm using Docker Toolbox. The error is described as follows and happens just after a execute the ./byfn.sh up -l node command:
2019-11-14 17:06:26.982 UTC [msp] loadCertificateAt -> INFO 002 Failed loading ClientOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
As you can see there is a backslash just before the ca.example.com-cer.pem which I think is causing the problem. Anyone have an idea of how I might solve this issue?
Docker Toolbox for windows doesn't provide a great experience for users. It's limited in how it can share windows directories with linux containers running in the linux VM it creates. I believe it can be made to work but you have to use very specific folders in your home directory and you would have to google it to find all the details but it's a lot more of a hassle.
You have other options of course
Upgrade to Windows Pro and use Docker for Windows (which doesn't have the same sharing limitations, but still not a great experience and you can still encounter problems sharing the directories)
Install a hypervisor such as virtualbox and run a linux desktop distribution such as ubuntu or mint and use that instead (which I would recommend and would suggest ubuntu 18.04 mate edition)
Wait until next year when hopefully microsoft will release WSL2 for everyone (including home edition) and then Docker won't need a linux VM running and it should be a much better experience trying to run linux containers on windows.
As mentioned by lindluni here
Backslash problem in Hyperledger 2.0.1 when orderer/peer look for .pem files
the problem arises when one creates crypto artifacts under Windows since "golang filepath.Join uses the current OS's filepath scheme". Hence, under Windows backslash is used in all the generated config.yaml files found in crypto-config/*. One can replace this backslashes before the deployment to fix the issue.

Bash/Windows/SVN - Resource Temporarily Unavailable

I'm using the Linux Subsystem for Windows (or whatever that new, fancy Ubuntu/Bash terminal is called in Windows 10). I'm using it in my Windows VM, which I am using to test an application developed and stored in Subversion.
I should point out that using the regular Windows command line, everything works perfectly with absolutely 0 issues. I just prefer Bash.
Anyway, svn is properly installed, and I can do commands like "svn status", "svn add", etc, in the Bash terminal no problem. However, if I try doing an "svn update" or "svn commit", that's when the problem happens.
I get the following error message:
myname#DESKTOP-VF4GBEA:~/Documents/Project$ svn update .
Updating '.':
svn: E000011: Unable to connect to a repository at URL 'https://some-url.com/trunk/Project'
svn: E000011: Error running context: Resource temporarily unavailable
I'm unsure why this is happening from the Bash terminal and not the Windows command line. I have Windows Defender disabled, no firewall there. I'm running Windows 10 Creators Edition (the latest version) in a virtual machine using VMWare Fusion on Mac OS Sierra. I do have Norton/Symantec protection running on the Mac, but it doesn't show anything having blocked a connection.
Regardless, doing these commands from the Windows command line, as I said, work perfectly fine.
Ok, I figured out the answer. The svn URL I was hitting was actually configured via my hosts file in the windows vm:
123.45.6.789 some-url.com
This was done in the windows file: C:\Windows\System32\drivers\etc\hosts. However, to get it to work in the Windows Bash Terminal, it needed to also be configured in /etc/hosts. That was the issue.
Ok, this is good to know. I guess the Bash/Windows thing uses all of its own configurations.

Node.js - tutorials on getting it to work with Cygwin on a Vista machine

All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
UPDATE1:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
Have you tried just using the Windows self contained binaries? http://node-js.prcn.co.cc/ This way you actually don't need to bother with Cygwin.
At first, i tried it your way too, using Cygwin. After smashing my head for the 10th time against a wall i just stopped trying and found a much cleaner solution.
I'm using VirtualBox running a Debain guest system to locally develop on my Windows 7 machine. Using VirtualBox, you can easily set up shared folders or port forwarding for node apps between your Windows machine and your Debian guest system.
Since you are using a plain Linux-system, all the compiling-pain is blown away.
If you plan to run node.js in production on a windows system: don't. I hardly believe node.js will be ever stable enough on windows-based systems using MINGW/Cygwin...
People seem to run into problems with Cygwin because they think that they are using a Windows machine.
If you install Cygwin, and open a bash shell prompt using the Cygwin icon, you are now in a UNIX environment and everything works the same as it would on UNIX. That includes building node.js.
I think you added some info to the question and I can see your problem. Yes, normally on Cygwin it has been possible to build node.js just as you would on any UNIX system, but that is no longer possible on Windows 7. Before running ./configure you have to:
Close all cygwin apps.
Double-click on C:\Cygwin\bin\ash.exe
Run ./rebaseall and when it completes, run ./perlrebase.
exit from the ash shell window.
At this point Cygwin will be back to normal and you can ./configure and make install.

Resources