Connection reset by Cloudflare when building Packer image - packer

I am trying to build a packer image for a digital ocean droplet, however when the build process finishes, it fails to create image (from what I can tell, that is a Cloudflare IP)
Any idea why this is happening or what I can do to investigate it further?
==> digitalocean: Gracefully shutting down droplet...
==> digitalocean: Error shutting down droplet: Post https://api.digitalocean.com/v2/droplets/198964166/actions: read tcp 10.0.2.15:44558->104.16.181.15:443: read: connection reset by peer
==> digitalocean: Destroying droplet...
==> digitalocean: Deleting temporary ssh key...
Build 'digitalocean' errored: Error shutting down droplet: Post https://api.digitalocean.com/v2/droplets/198964166/actions: read tcp 10.0.2.15:44558->104.16.181.15:443: read: connection reset by peer

Related

Rancher desktop unable to pull an image from Docker

I have downloaded and set up Rancher Desktop with nerdctl but I am unable to pull any public image from the Docker Hub. I am receiving an error:
INFO[0011] trying next host error="failed to do request: Head
"https://registry-1.docker.io/v2/maildev/maildev/manifests/latest":
dial tcp: lookup registry-1.docker.io on 192.168.47.23:53: read udp
192.168.47.23:37689->192.168.47.23:53: i/o timeout" host=registry-1.docker.io
FATA[0011] failed to resolve reference
"docker.io/maildev/maildev:latest": failed to do request: Head
"https://registry-1.docker.io/v2/maildev/maildev/manifests/latest":
dial tcp: lookup registry-1.docker.io on 192.168.47.23:53: read udp
192.168.47.23:37689->192.168.47.23:53: i/o timeout
Thanks for your inputs

How is a private IPFS network setup?

ubuntu#ip-172-31-39-89:~$ export LIBP2P_FORCE_PNET=1 && IPFS_PATH=~/.ipfs ipfs daemon
I have the following error -
export LIBP2P_FORCE_PNET=1 && IPFS_PATH=~/.ipfs ipfs daemon
go1.11.1
Successfully raised file descriptor limit to 2048.
13:37:13.509 ERROR p2p-config: tried to create a libp2p node with no Private Network Protector but usage of Private Networks is forced by the enviroment config.go:69
13:37:13.512 ERROR cmd/ipfs: error from node construction: privnet: private network was not configured but is enforced by the environment daemon.go:332
Error: privnet: private network was not configured but is enforced by the environment
Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)
Any ideas about the cause?
I carefully repeated the process and regenerated the swarm keys and it worked this time.
I was having the same problem, when I tried to run it off a systemd service. Using the LIBP2P_FORCE_PNET env variable raises the error. I deleted the ipfs(~/.ipfs) data directory and run the init command again.
I think the reason could be the fact that I did not add the IPFS swarm key. Here's the commands if someone has a similar problem.
export LIBP2P_FORCE_PNET=1
IPFS_PATH=~/.ipfs ipfs init
#then,
go get -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen
ipfs-swarm-key-gen > ~/.ipfs/swarm.key
IPFS_PATH=~/.ipfs ipfs daemon

issue in Downloading Platform-specific Binaries

I want to download Binary files for running Hyperledger Fabric. I am trying to execute this command. I am behind proxy too.
Also I have docker Installed, OS being used Win 10.
export HTTP_PROXY=http://172.16.30.30:80/
export HTTPS_PROXY=https://172.16.30.30:8080/
export NO_PROXY=localhost,127.0.0.1,::1
$ curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.1.0 1.1.0 0.4.6
Installing hyperledger/fabric-samples repo
===> Checking out v1.1.0 of hyperledger/fabric-samples
HEAD is now at 1252c7a... [FAB-8920] Pin fabric-samples to node.js "~1.1.0"
Installing Hyperledger Fabric binaries
===> Downloading version x86_64-1.1.0 platform specific fabric binaries
===> Downloading: https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/windows-amd64-1.1.0/hyperledger-fabric-windows-amd64-1.1.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28.0M 100 28.0M 0 0 91407 0 0:05:21 0:05:21 --:--:-- 145k
... Here 2 files are downloaded and Then i get this erros continiously
Warning: failed to get default registry endpoint from daemon (error during connect: Get https://127.0.0.1:2376/v1.37/info: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.). Using system default: https://index.docker.io/v1/
error during connect: Post https://127.0.0.1:2376/v1.37/images/create?fromImage=hyperledger%2Ffabric-peer&tag=x86_64-1.1.0: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.
error during connect: Post https://127.0.0.1:2376/v1.37/images/hyperledger/fabric-peer:x86_64-1.1.0/tag?repo=hyperledger%2Ffabric-peer&tag=latest: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.
==> FABRIC IMAGE: orderer
===> List out hyperledger docker images
error during connect: Get https://127.0.0.1:2376/v1.37/images/json: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.

Error Starting Protocol Stack: Invalid arguement

I am currently trying to work with the geth and I want to start my private Ethereum Network so I can test my applications. However, when I try to use geth --datadir=./chaindata/ but that's only giving me some error in the terminal which I have shown at the bottom of this question. I am aware that there are other users that are having the same problem on Mac OS, which is what I'm using as well.
Here is the terminal output:
Steves-MBP:assignment_1 stevesahayadarlin$ geth --datadir=./chaindata/
WARN [01-06|22:12:18] No etherbase set and no accounts found as default
INFO [01-06|22:12:18] Starting peer-to-peer node instance=Geth/v1.7.3-stable/darwin-amd64/go1.9.2
INFO [01-06|22:12:18] Allocated cache and file handles database=/Users/stevesahayadarlin/Desktop/distributed_exchange_truffle_class_3-master/assignment_1/chaindata/geth/chaindata cache=128 handles=1024
INFO [01-06|22:12:18] Initialised chain configuration config="{ChainID: 15 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Engine: unknown}"
INFO [01-06|22:12:18] Disk storage enabled for ethash caches dir=/Users/stevesahayadarlin/Desktop/distributed_exchange_truffle_class_3-master/assignment_1/chaindata/geth/ethash count=3
INFO [01-06|22:12:18] Disk storage enabled for ethash DAGs dir=/Users/stevesahayadarlin/.ethash count=2
INFO [01-06|22:12:18] Initialising Ethereum protocol versions="[63 62]" network=1
INFO [01-06|22:12:18] Loaded most recent local header number=0 hash=9b8d4a…9021ba td=131072
INFO [01-06|22:12:18] Loaded most recent local full block number=0 hash=9b8d4a…9021ba td=131072
INFO [01-06|22:12:18] Loaded most recent local fast block number=0 hash=9b8d4a…9021ba td=131072
INFO [01-06|22:12:18] Loaded local transaction journal transactions=0 dropped=0
INFO [01-06|22:12:18] Regenerated local transaction journal transactions=0 accounts=0
INFO [01-06|22:12:18] Starting P2P networking
INFO [01-06|22:12:20] UDP listener up self=enode://258e1a8136fd23d47b97404139841059a37e95751182dde366adc4a22bab88b9580eb53bfb1de937016645817f071d0766a3be66e7e056c8f6afe0a450bb221d#70.106.232.168:30303
INFO [01-06|22:12:20] RLPx listener up self=enode://258e1a8136fd23d47b97404139841059a37e95751182dde366adc4a22bab88b9580eb53bfb1de937016645817f071d0766a3be66e7e056c8f6afe0a450bb221d#70.106.232.168:30303
INFO [01-06|22:12:20] Blockchain manager stopped
INFO [01-06|22:12:20] Stopping Ethereum protocol
INFO [01-06|22:12:20] Ethereum protocol stopped
INFO [01-06|22:12:20] Transaction pool stopped
INFO [01-06|22:12:20] Database closed database=/Users/stevesahayadarlin/Desktop/distributed_exchange_truffle_class_3-master/assignment_1/chaindata/geth/chaindata
INFO [01-06|22:12:20] Mapped network port proto=udp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [01-06|22:12:20] Mapped network port proto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
Fatal: Error starting protocol stack: listen unix /Users/stevesahayadarlin/Desktop/distributed_exchange_truffle_class_3-master/assignment_1/chaindata/geth.ipc: bind: invalid argument
Steves-MBP:assignment_1 stevesahayadarlin$

waiting for SSH to become available with packer too long

Anyone have already this issue with packer build ?
Waiting for SSH to become available...
[INFO] Attempting SSH connection...
reconnecting to TCP connection for SSH
handshaking with SSH
handshake error: ssh: handshake failed: read tcp 127.0.0.1:49663->127.0.0.1:3278: wsarecv: Une connexion existante a dû être fermée par l’hôte distant.
[DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:49663->127.0.0.1:3278: wsarecv: Une connexion existante a dû être fermée par l’hôte distant.
My packer build run correctly but the step to connect with ssh is very long (10min).
Have you a idea for resolve this ?
PS : the "space" character in log is not my fault, this is just the result of -debug packer build. Perhaps open another stackoverflow issue for resolve this.
I have a similar setup (Ubuntu, Windows 7, virtualbox-iso). My scripts include a file below that's called in the provisioners block. Lacking these may be a cause of the slowness
#!/bin/sh -x
echo "UseDNS no" >> /etc/ssh/sshd_config;
echo "GSSAPIAuthentication no" >> /etc/ssh/sshd_config;
It's also possible that the 10 minute wait is just other stuff happening in the background that you can't see. If you can post a link to your scripts and/or tell me how long the entire build process takes that might provide additional context