Docker : Anaconda error : HTTP 000 CONNECTION FAILED error in WINDOWS - windows

I am building an existing code base (python fast api) in docker (in windows). Docker-compose throws an error. I use corporate laptop with zscaler. It looks like repodata.json is ~240Mb, this is not getting downloaded or failed inside the container for some weird unknown reason.
Options I tried:
Googled and read conda docs , FAQ on HTTP 000 connection issue.
ssl verify to false
Exported root certificate from browser to container root
Set request_ca_bundle parameter to crt path
Increased remote_read_timeout_secs to 600 sec in condarc
I created docker from power shell and curl the repodata.json url . This can able to download huge repodata.json file quickly.
Please share some troubleshooting steps. I also used verbose flag in conda ; not much help.
base image : continuumio/miniconda3:4.9.2
The same code works great in MacOS or from Linux. FYI.
[ 8/17] RUN conda env update --name base: #0 0.672 Collecting package metadata (repodata.json): ...working... failed #0 608.5 #0 608.5 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda- forge/linux-64/repodata.json> #0 608.5 Elapsed: - #0 608.5 #0 608.5 An HTTP error occurred when trying to retrieve this URL. #0 608.5 HTTP errors are often intermittent, and a simple retry will get you on your way.
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.8
- pydantic==1.8.2
- pip
- pip:
- jaydebeapi==1.2.3
- pyOpenSSL==23.0.0
- certifi==2022.12.7
troubleshooting steps and tips

Related

How to install pymol using anaconda (CondaHTTPError: HTTP 403 FORBIDDEN for url)

When I try to install pymol using conda install -c schrodinger pymol-bundle as the documentation instructs (https://pymol.org/2/), an error occurs, and I'm not able to solve it.
Downloading and Extracting Packages
pdb2pqr-2.1.2+pymol | 236 KB | | 0%
freemol-1.158 | 6 KB | | 0%
CondaHTTPError: HTTP 403 FORBIDDEN for url <https://conda.anaconda.org/schrodinger/noarch/pdb2pqr-2.1.2 pymol-py_0.tar.bz2>
Elapsed: 00:00.354925
CF-RAY: 72dee7c5fd0d3577-CNF
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 403 FORBIDDEN for url <https://conda.anaconda.org/schrodinger/noarch/freemol-1.158-py_2.tar.bz2>
Elapsed: 00:00.390000
CF-RAY: 72dee7c87ccb3565-CNF
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
I think it can be a license problem, and I have the pymol license .lic file on my computer, that I've used to install pymol from the windows installer before, but I don't know how to include the license in the anaconda installation command. Is there a way to do that?
You are likely experiencing the same issue as many other users. It seems like Cloudflare's system outages are affecting installations.
Here is a related thread on conda's github:
https://github.com/conda/conda/issues/11638

`Failed to solve with frontend dockerfile.v0...` how to tackle?

I have the following Dockerfile:
# syntax=docker/dockerfile:1
FROM windows
CMD echo Hello World!
I go to the folder where it is contained and run the command:
docker build -t myapp .
Here is the output I am getting:
#1 [internal] load build definition from Dockerfile
#1 sha256:a1d3c4a6e12f4cddf4afffc562b1433934c473851b755b2abc3f2fde935a1a92
#1 transferring dockerfile: 31B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:fb211a3db6387cb686b1196a6ecf918d5e247355af1defb5650b7e56a616141b
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/windows:latest
#3 sha256:d7ef60db0c57c36d3b2205b072a719bb2fde4c4f6da14ba36cfb712dae5b2314
#3 ...
#4 [auth] library/windows:pull token for registry-1.docker.io
#4 sha256:f2ddcdfd41cd000ab0347326f1abf8fae77a85d55a3cccd4448d5b972ac3e584
#4 DONE 0.0s
#3 [internal] load metadata for docker.io/library/windows:latest
#3 sha256:d7ef62dd0c57c36a3b2205b072b719bb2fde4b7f6ea31ba36cfb723dae5b2314
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
> [internal] load metadata for docker.io/library/windows:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
I am very new to Docker, so I can not understand what is causing this error. I do not know how to check if I logged in in Dockedr Hub or not and I do not know how to check if the base image named windows exists.
This question is not helpful at all.
1 My file is called Dockerfile.
2 I do not know what is the buildkit and I do not know where to put the:
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
3 I just freshly installed the Docker. I tried this sample application tutorial and it worked just fine for me.
4 As you can see in my Dockerfile I am not trying to copy anything.
Also, I am getting the following error:
$ docker pull mcr.microsoft.com/windows
Using default tag: latest
Error response from daemon: manifest
for mcr.microsoft.com/windows:latest
not found: manifest unknown: manifest tagged by "latest" is not found
I can not even pull the servercore/insider:
$ docker pull mcr.microsoft.com/windows/servercore/insider
Using default tag: latest
Error response from daemon: manifest for mcr.microsoft.com/windows/servercore/insider:latest not found: manifest unknown: manifest tagged by "latest" is not found
Even though my local Docker is configured to use the Windows containers:
Feels kind of devastating, I do not know why it does not work and how to fix it.
FROM windows
is not a valid base image on Docker Hub. You can see the pull attempt here:
#3 [internal] load metadata for docker.io/library/windows:latest
...
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
For a list of Windows images, I'd look to mcr.microsoft.com, and windows has documented their base images here:
https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images
e.g. for one of the Go images, it uses FROM mcr.microsoft.com/windows/servercore:1809

Error starting hyperledger-composer network after Fabric and Composer version upgrade

I've come across an error starting the hyperledger-composer network that isn't answered in the composer-wiki.
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: transaction returned with failure: can't find PEM header: undefined
Command failed
Checking pre-requisites,
Fabric 1.2
Composer 0.20.4
Node 8.12.0
Docker 18.01.1
"composer network install" was successful, with file appearing in the docker peer at /var/hyperleder/production/chaincodes
After running the "composer network start" command, a "docker ps" shows new docker instance with name:
dev-peer0.org1.example.com-<<business-network-name>>-0.0.7
But any attempt to ping this results in a failure like this:
Error: Error trying to ping. Error: make sure the chaincode <<business-network-name>> has been successfully instantiated and try again: getccdata composerchannel/<<business-network-name>> responded with error: could not find chaincode with name '<<business-network-name>>'
Checking the log of the dev-peer0, it ends with the following:
2018-11-05T05:03:18.227Z [4264161f] ERROR :Composer :Init() can't find PEM header: undefined
2018-11-05T05:03:18.227Z [4264161f] VERBOSE :Composer :#PERF Init() Total (ms) duration for txnID [4264161fc30a61c70884d4c7efb460fea6a755d07bc4852875c393346795227a]: 929.00
2018-11-05T05:03:18.228Z ERROR [lib/handler.js] [composerchannel-4264161f]Calling chaincode Init() returned error response [can't find PEM header: undefined]. Sending ERROR message back to peer
The corresponding error in the peer0 log is a big larger:
2018-11-05 05:03:18.229 UTC [endorser] SimulateProposal -> ERRO 439d [composerchannel][4264161f] failed to invoke chaincode name:"lscc" , error: transaction returned with failure: can't find PEM header: undefined
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:202
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:2361
2018-11-05 05:03:18.229 UTC [endorser] SimulateProposal -> DEBU 439e [composerchannel][4264161f] Exit
Since this last worked I have updated composer from 0.19 to 0.20.4, and taken Fabric from 1.1 to 1.2.
Googling suggests that this kind of error "can't find PEM header: undefined" is associated with a change in key signing. After tearing down Fabric I re-ran ./createPeerAdminCard.sh - is there another card or similar that needs to be re-created to accomodate the latest versions?
Thanks to #R Thatcher for putting me onto the right direction. This was all down to mismatching cards, and was resolved by clearing out everything and starting again.
Specifically, in /fabric-dev-servers:
./stopFabric.sh
./teardownFabric.sh
composer card list
composer card delete -c admin#<business-network-name>
composer card delete -c PeerAdmin#hlfv1
./startFabric.sh
./createPeerAdminCard.sh
Then changing into the composer/business-network-name directory:
composer network install --card PeerAdmin#hlfv1 --archiveFile business-network-name\#0.0.7.bna
composer network start -c PeerAdmin#hlfv1 -n business-network-name -V 0.0.7 -A admin -S adminpw --file networkadmin.card
composer card import --file networkadmin.card --card admin#business-network-name
composer network ping -c admin#business-network-name
So yes, it was about mismatching cards and not cleaning these up as part of a new deployment.
Although not part of the original problem, it's also worth noting that the -A and -S parameters of the composer network start command HAD to be set to admin and adminpw respectively. See composer issue #3781.
Answering the the last remark from #Capn Sparrow
"the -A and -S parameters of the composer network start command HAD to be set to admin and adminpw respectively."
This is the correct and expected behaviour :-)
with the composer network start command the -A and -S are specifying an existing user in the CA that we want a new set of Credentials (certificate and keys) for which is then bound to a Composer System participant.
When you use the 'standard development fabric' this has a CA configured with a user called 'admin' with a secret of 'adminpw'. If you had build your own Fabric from scratch you could choose the name and secret of your first default user. Alternatively you could work with the fabric-ca client software to create additional users in the CA.

ProxyAuthentication fails while updating conda

I keep getting an error while updating conda:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/r/noarch/repodata.json.bz2
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
ProxyError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443):
Max retries exceeded with url:
/pkgs/r/noarch/repodata.json.bz2 (
Caused by ProxyError(
'Cannot connect to proxy.',
OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))",
),
)
A reportable application error has occurred. Conda has prepared the above report.
Upload did not complete.
I tried this in the .condarc file
proxy_servers:
http: http://proxy.corp.local:8080
https: https://proxy.corp.local:8080
and
proxy_servers:
http: http://user:pass#corp.com:8080
https: https://user:pass#corp.com:8080
ssl_verify: True
ssl_verify: False
Regards
Bjorn
I also got the same error message and it is solved after googling so much.
Steps for solving the problem is given below
Create a .condrac file using the conda config command in command prompt or use a text editor to create a text file. I used conda config for creating the .condrac file
You can add following line into the .condrac file located in your user home directory or home
directory
proxy_servers:
http: http://username:password#proxyIP/Proxy URL:port no
https: http://username:password#proxyIP/ProxyURL:port no
ssl_verify: True
Same file can be copied into your anaconda home directory.(C:\ProgramData\Anaconda3 in my case)
Then run > conda update conda command from your prompt
Then you will be getting the result like below. C:\Users\USER.DESKTOP-BQVL8L4>conda update conda
Solving environment: done
Rerun your installation command. This solution worked well for me. Please try and let me know.
Copy files libcrypto-1_1-x64.dll and libssl-1_1-x64.dll
from the directory ./Anaconda3/Library/bin/
to ./Anaconda3/DLLs.
This method solved the problem that I had

Cannot Update Macports Port Tree

I've been trying to install a few ports ( wget, autoconf, coreutils, ... etc ) but it seems impossible !!! Here's what I have done step by step :
I'm using OS X 10.9.1 Mavericks and I've downloaded and installed macports using installation package (.pkg) from macports website. I had Xcode 5.0.2 already installed so I logged in my Apple iOS developer account, and downloaded command_line_tools_os_x_mavericks_for_xcode__late_october_2013.dmg and installed the package !
When I use
sudo port install coreutils I get the following error: Error: Port coreutils not found
I thought (And Googled of course) it must be because I haven't updated macports. Then I tried using self update using : sudo port -v selfupdate which by the way was not successful and I got the following error log :
---> Updating MacPorts base sources using rsync
rsync: failed to connect to rsync.macports.org: Operation timed out (60)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync42/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 10
Error: Error synchronizing MacPorts sources: command execution failed
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed`
According to failed to connect to server message, I thought it may be caused because of restrictions and sanctions applied to my IP Address which by the way is currently from Iran (I figured that out because I cannot even open macports website directly without using a proxy server) ! I used the instructions in the following URL to reroute the connection and make Macports connect through a proxy server :
http://samkhan13.wordpress.com/2012/06/15/make-macports-work-behind-proxy/
The instruction above tries to connect and fetch the port tree using a .tar.gz archive over HTTP ! I didn't got that connection error anymore but I got some Could not access the file error, so I downloaded that file manually, set up an Apache web server locally, and replaced that HTTP URL with my localhost link.
Everything seemed to be fine by using
sudo port -v sync instead of sudo port -v selfupdate
Here's how the log started :
---> Updating the ports tree
Synchronizing local ports tree from http://localhost/ports.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24.6M 100 24.6M 0 0 98.9M 0 --:--:-- --:--:-- --:--:-- 99.1M
x ports/
x ports/gnome/
x ports/gnome/gnofract4d/
x ports/gnome/gnofract4d/Portfile
x ports/gnome/gnofract4d/files/
x ports/gnome/gnofract4d/files/patch-setup.py.diff
x ports/gnome/gnofract4d/files/patch-win.diff
x ports/gnome/gnofract4d/files/patch-fract4d_fractconfig.py.diff
x ports/gnome/gnofract4d/files/patch-fract4d-c-imageIO.cpp.diff
x ports/gnome/libchamplain/
x ports/gnome/libchamplain/Portfile
x ports/gnome/gconf/
x ports/gnome/gconf/Portfile
x ports/gnome/goocanvas/
x ports/gnome/goocanvas/Portfile
x ports/gnome/gstreamer1-gst-libav/
.
.
.
But in the end, I got some errors :
.
.
.
x ports/net/daemonlogger/Portfile
x ports/net/dibbler/
x ports/net/dibbler/Portfile
x ports/net/dibbler/files/
x ports/net/dibbler/files/0-enable-prefix.patch
x ports/net/dibbler/files/1-correct-man-pages.patch
x ports/PortIndex_darwin_11_i386/
x ports/PortIndex_darwin_11_i386/PortIndex.quick: gzip decompression failed
tar: Error exit delayed from previous errors.
Command failed: cd /opt/local/var/macports/sources/localhost/ports/.. && /usr/bin/tar -v -z -xf ports.tar.gz
Exit code: 1
Error: Extracting http://localhost/ports.tar.gz failed (command execution failed)
port sync failed: Synchronization of 1 source(s) failed
Now, I still cannot install any ports, and if I revert that default link in /opt/local/etc/macports/sources.conf to its original RSYNC one, everything returns to the way it was ( all errors, all messages, etc ... )
If I don't revert and go on using the file I have put on my localhost ( or using file:// to address the file directly ) , here's what happens when I try to install a port ( for example, Using sudo port install coreutils ) :
Port extract failed: ports/PortIndex_darwin_11_i386/PortIndex.quick: gzip decompression failed
tar: Error exit delayed from previous errors.
while executing
"macports::fetch_port $path 1"
(procedure "macports::getportdir" line 12)
invoked from within
"macports::getportdir $source"
(procedure "macports::getindex" line 4)
invoked from within
"macports::getindex $source"
(procedure "_mports_load_quickindex" line 11)
invoked from within
"_mports_load_quickindex"
(procedure "mportinit" line 577)
invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, Port extract failed: ports/PortIndex_darwin_11_i386/PortIndex.quick: gzip decompression failed
tar: Error exit delayed from previous errors.
I have Googled and read almost every solution that is suggested but NONE has worked out and I'm really stuck with this :(
Any NEW solution is really appreciated.
No replies, and I Found the solution myself!
The only way to redirect RSYNC requests through a proxy server is to tunnel over an L2TP VPN connection ( not PPTP ). That's the only way to make Macports work behind a proxy server.
Hope this can help other guys who are stuck with this weird connection method.
Instead of the main MacPorts mirror (which is sponsored by MacOSForge, which is run by Apple, which is thus bound to US law and export restrictions to Iran), you can use an alternate rsync mirror from the list at http://trac.macports.org/wiki/Mirrors.
If none of the rsync mirrors work for you, also read the FAQ entry for this very question: http://trac.macports.org/wiki/FAQ#selfupdatefails.

Resources