When running terraform init, the following error is displayed - terraform

When running terraform init, the following error is displayed:
Could not retrieve the list of available versions for provider
│ hashicorp/azurerm: could not connect to registry.terraform.io: Failed to
│ request discovery document: Get
│ "https://registry.terraform.io/.well-known/terraform.json": net/http:
│ request canceled while waiting for connection (Client.Timeout exceeded
│ while awaiting headers)
What could be the reason?

Related

the vue-awesome-swiper dependency was not found

I tried to use swiper plugin on my nuxtjs project. But I've got error on my command line when I running "yarn run dev":
`
yarn run dev
yarn run v1.22.19
$ nuxt
WARN sass-loader#13.1.0 is installed but ^10.1.1 is expected
╭───────────────────────────────────────╮
│ │
│ Nuxt # v2.15.8 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
i Preparing project for development
i Initial build may take a while
√ Builder initialized
√ Nuxt files generated
* Client █████████████████████████ building (39%) 245/251 modul
es 6 active
node_modules\setimmediate\setImmediate.js
× Server
Compiled with some errors in 9.04s
× Client
Compiled with some errors in 10.53s
× Server
Compiled with some errors in 9.04s
ERROR Failed to compile with 1 errors
This dependency was not found:
* vue-awesome-swiper/dist/ssr in ./plugins/swiper.js
To install it, you can run: npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
WARN Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
`
vue-awesome-swiper does not detected while I've installed by "yarn add vue-awesome-swiper".
And I've followed this instruction on cmd:
npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
But still have issued on my code. Does anyone have same problems and had solution?

Terraform init failed with Error: Failed to install provider read: connection reset by peer

Recently, I've got the problem when running terraoform init. The error showed as below:
>terraform init
Initializing modules...
Initializing the backend...
Initializing provider plugins...
- Reusing previous version of hashicorp/template from the dependency lock file
- Reusing previous version of cloudflare/cloudflare from the dependency lock file
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Installing hashicorp/template v2.2.0...
- Using previously-installed cloudflare/cloudflare v3.18.0
- Installing hashicorp/aws v3.30.0...
- Installing hashicorp/null v3.1.1...
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/template v2.2.0: Get "https://releases.hashicorp.com/terraform-provider-template/2.2.0/terraform-provider-template_2.2.0_linux_amd64.zip": read tcp 10.250.192.121:45540->108.157.30.78:443: read:
│ connection reset by peer
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v3.30.0: Get "https://releases.hashicorp.com/terraform-provider-aws/3.30.0/terraform-provider-aws_3.30.0_linux_amd64.zip": read tcp 10.250.192.121:37686->108.157.30.40:443: read: connection reset
│ by peer
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/null v3.1.1: Get "https://releases.hashicorp.com/terraform-provider-null/3.1.1/terraform-provider-null_3.1.1_linux_amd64.zip": read tcp 10.250.192.121:45552->108.157.30.78:443: read: connection reset
│ by peer
I suppose I need to add some additional configuration relating to network in my server? (IT team just added the new cert in the compary network system)

Unable to get local issuer certificate error while building kibana - yarn build

I am facing the unable to get local issuer certificate error when I try to build kibana using the command - yarn build --skip-os-packages
I have tried these solutions before which didn't work :
disabling TLS connection using set NODE_TLS_REJECT_UNAUTHORIZED=0 but then the build throws a warning and terminates the process.
yarn config set strict-ssl false
Below is the complete error :
yarn build --skip-os-packages
yarn run v1.22.17
$ node scripts/build --all-platforms --skip-os-packages
info [ global ] Verifying environment meets requirements
│ succ Node.js version verified
│ succ ✓ 0 sec
info [ global ] Cleaning artifacts from previous builds
│ debg Deleted 0 files/directories
│ succ ✓ 0 sec
info [ global ] Downloading node.js builds for all platforms
│ debg Downloading shasum values for node version 14.17.2 from https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v14.17.2/SHASUMS256.txt
│ERROR failure 1 sec
│ERROR Error: unable to get local issuer certificate
│ at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
│ at TLSSocket.emit (events.js:375:28)
│ at TLSSocket._finishInit (_tls_wrap.js:936:8)
│ at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Error: Failed to query available provider packages when I run terraform init command

So I am following Terrafom's official page to install and start with Terraform, but when I come to terraform init command, I am getting the following error.
Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider kreuzwerker/docker: could not connect to registry.terraform.io:
│ Failed to request discovery document: Get "https://registry.terraform.io/.well-known/terraform.json": dial tcp: lookup
│ registry.terraform.io on 192.168.0.1:53: server misbehaving
The issue seems to be with the network connectivity. If you are using a VPN stop it and then retry the command terraform init.
If you happen to be using an Apple M1 chip, I posted this answer elsewhere:
I am using a Macbook with an M1 chip as well and kept facing the same error. To fix, I had to uninstall terraform "brew uninstall terraform", follow these instructions https://benobi.one/posts/running_brew_on_m1_for_x86/, run "ibrew install hashicorp/tap/terraform".
Although "terraform version" will provide the same output as before, it now works. For me at least. Hope this helps someone!
I encountered the same error when running terraform init for a new AWS resource. I get the error below:
Initializing modules...
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/aws versions matching "4.9.0"...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: could not connect to registry.terraform.io: Failed to request discovery document: Get
│ "https://registry.terraform.io/.well-known/terraform.json": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Here's how I solved it:
I think it is a temporary network issue.
All I had to do was to upgrade the Terraform version from 1.17 to 1.18 using the command:
brew upgrade terraform
And then tried to run terraform init again. Waited for some minutes and it was successful.

how event loop phases handles the requests?

Event loop has phases as:
┌───────────────────────┐
┌─>│ timers │
│ └──────────┬────────────┘
│ ┌──────────┴────────────┐
│ │ I/O callbacks │
│ └──────────┬────────────┘
│ ┌──────────┴────────────┐
│ │ idle, prepare │
│ └──────────┬────────────┘ ┌───────────────┐
│ ┌──────────┴────────────┐ │ incoming: │
│ │ poll │<─────┤ connections, │
│ └──────────┬────────────┘ │ data, etc. │
│ ┌──────────┴────────────┐ └───────────────┘
│ │ check │
│ └──────────┬────────────┘
│ ┌──────────┴────────────┐
└──┤ close callbacks │
└───────────────────────┘
how does it work? does it jump from one phase to another? if yes then when it jumps? or it just maintains the que and executes the one callback after the another? and what is next tick , does it mean that when entire que is completed and que is empty then the loop starts over again? is there any actual loop in event loop? and how does this poll phase works? what happens when a new request arrives?
node maintains the worker pool (which are actually c++ threads), and whenever a some I/O task or any other blocking task comes, it hands over that task to that worker thread which actually carries out system task as interacting with database and getting data and when worker thread completes its task than worker thread puts the callback handler in event que back, and node takes this callback and executes it . Is this correct?
what is nodejs binding(c++)?
how event loop works? does it run on main thread?

Resources