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

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.

Related

Is there a way to add Unix commands to GitKraken?

How can I use unix commands in Gitkraken?
So I've recently picked up coding again, going back to the basics, and when I was learning previously I used windows and installed Git Bash which uses a Unix command-line environment if I'm not mistaken. The Odin Project (the website I am learning to code from) does not support Windows as an operating system when learning to code due to various reasons listed on their website. I believe that Windows is adequate and would like to continue using it instead of using VMware or VirtualBox to 'install' Linux. The only issue I'm having is executing commands using GitKraken. Some of the commands are different, so I was just wondering if there is a way to use Unix commands in GitKraken? At this point, I am just curious if it is possible. I can continue to use Git Bash, however, GitKraken displaying a visual map of my repos is very helpful.
Ex. How to open a file
$ open ./index.html - macOS
$ start index.html - Windows OS
Any help would be appreciated.

How do I run burrows-wheeler aligner on windows subsystem for linux?

Total newbie here and have no idea on what I'm doing.
I have installed ubuntu on windows can open bash from windows now.
I have also downloaded burrow-wheeler aligner from the Sourceforge: https://sourceforge.net/projects/bio-bwa/files/
From there I tried extracting the bz2 file. And I added the extracted folder into PATH
but when I type in bwa on bash, it says bwa: command not found
I'm a total beginner and want to get started with bioinformatics. I performed the aforementioned steps because that's how I setup conda to work on windows cmd.
What am I doing wrong?
In the subsystem, almost everything remains the same in your scenario just as an Ubuntu system, then you just follow the Readme file of this repository: lh3/bwa. Since the repo in Sourceforge seems to have been archived for a long time, you'd better use the newer alternative on Github.

Launch VSCode from source through WSL

I would like to build/launch the VSCode source code in the native Bash for Windows client. I have followed the steps outlined in the VSCode wiki on how to contribute, and everything is working as expected (All commands have been run on the WSL terminal following the Linux instructions)
After running yarn run watch, I try to launch VSCode by running DISPLAY=:0 ./scripts/code.sh from the source code directory, but nothing happens. I get two duplicate warnings:
[21496:1128/120229.392130:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected
but I'm not sure if this is causing the problem. I have an X Server client running, and have used to to successfully launch native Windows applications through WSL (terminator, emacs, etc.)
Is what I'm trying to do possible? If so, how can I make it work?
Amazing that you asked this! I was attempting to do the exact same thing at (it seems) the exact same time. Here's my process.
Install XMing
Install the xfree apps
Set DISPLAY=:0
Run xeyes ==> Awesome googly eyes!
Attempt to build vscode from source. The build docs seem to be incomplete b/c I had to install a ton of libraries beyond those listed e.g.
yarn
gulp
gulp-cli
pkg-config
libx11-dev
libxkbfile-dev
libsecret-1-dev
libgtk2.0-dev
libxss-dev
gnome-dev
libgconf2-dev
libnss3-dev
libasound2-dev
Eventually get the yarn tasks to finish such that I could run code.sh
./scripts/code.sh
[20474:1128/153959.035267:ERROR:bus.cc(427)] Failed to connect to the bus: F
ailed to connect to socket /var/run/dbus/system_bus_socket: No such file or
directory
[20474:1128/153959.081986:WARNING:audio_manager.cc(295)] Multiple instances
of AudioManager detected
[20474:1128/153959.082101:WARNING:audio_manager.cc(254)] Multiple instances
of AudioManager detected
Looking at ps I see that the process was running.
Conjectures
It seems that building from source from WSL is not yet supported. Or maybe you can build the artifact, but you can't connect to the Windows display to show it. Based on the quality of the xeyes session, it looks like a very, very, very primitive experience e.g. still using WinXP-style minimize / maximize / close icons.
I was literally writing an Issue on their github page when I thought I'd do one last search and found this post. Much of vscode treats WSL as a second-class environment on Windows. Recent work seems to suggest that things are going to get better as driving to integration between Windows' two internal environments continues to improve (e.g. https://github.com/Microsoft/vscode/issues/39144)
Update 2017-11-30
Based on some pursuit via Github, it seems that this issue has been reported to the WSL team: https://github.com/Microsoft/WSL/issues/2293. It appears to be under active consideration by the WSL team. I've added some commentary about my use case there.

TLS verification issue when setting up remote docker interpreter in pycharm in 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

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