Related
After adding some new secrets to Terraform using the 1Password provider, we saw an error without much helpful output.
$ terraform plan
...
Error: rpc error: code = Unavailable desc = transport is closing
Error: rpc error: code = Canceled desc = context canceled
...
Terraform provider:
terraform {
required_providers {
onepassword = {
source = "anasinnyk/onepassword"
version = "~> 1.2.1"
}
}
required_version = "~> 0.13"
}
Terraform yml:
data "onepassword_item_password" "search_cloud_id" {
name = "Azure Elastic Cloud ID"
vault = data.onepassword_vault.vault_name.id
}
data "onepassword_item_password" "search_api_key" {
name = "Azure Elastic Cloud API key"
vault = data.onepassword_vault.vault_name.id
}
resource "kubernetes_secret" "search" {
metadata {
name = "search"
namespace = kubernetes_namespace.production.id
}
data = {
"ELASTICSEARCH_CLOUD_ID" = data.onepassword_item_password.api_search_cloud_id.password
"ELASTICSEARCH_API_KEY" = data.onepassword_item_password.api_search_api_key.password
}
type = "Opaque"
}
We managed to get some useful output by removing one data reference at a time, which lead to the errors printing:
panic: runtime error: invalid memory address or nil pointer dereference
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x147d1bd]
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1:
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: goroutine 194 [running]:
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/anasinnyk/terraform-provider-1password/onepassword.resourceItemPasswordRead(0x19418a0, 0xc0004ac540, 0xc000096f80, 0x173d040, 0xc0007ac740, 0xc0003bce40, 0xc000119910, 0x100c9b8)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/anasinnyk/terraform-provider-1password/onepassword/resource_item_password.go:75 +0x18d
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0004613f0, 0x1941820, 0xc000384300, 0xc000096f80, 0x173d040, 0xc0007ac740, 0x0, 0x0, 0x0)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/helper/schema/resource.go:288 +0x1ec
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc0004613f0, 0x1941820, 0xc000384300, 0xc000304b80, 0x173d040, 0xc0007ac740, 0xc0007ac740, 0xc000304b80, 0x0, 0x0)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/helper/schema/resource.go:489 +0xff
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc00026e6a0, 0x1941820, 0xc000384300, 0xc0003842c0, 0xc00026e6a0, 0xc00026e6b0, 0x185a058)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/internal/helper/plugin/grpc_provider.go:1102 +0x4c5
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadDataSource_Handler.func1(0x1941820, 0xc000384300, 0x17dcd60, 0xc0003842c0, 0xc000384300, 0x1773c80, 0xc0004ac401, 0xc000304640)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/internal/tfplugin5/tfplugin5.pb.go:3348 +0x86
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve.func3.1(0x19418e0, 0xc0003d4480, 0x17dcd60, 0xc0003842c0, 0xc000304620, 0xc000304640, 0xc0007c8ba0, 0x11b81c8, 0x17c7a20, 0xc0003d4480)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/plugin/serve.go:76 +0x87
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadDataSource_Handler(0x17fdb60, 0xc00026e6a0, 0x19418e0, 0xc0003d4480, 0xc0004ac4e0, 0xc00000d080, 0x19418e0, 0xc0003d4480, 0xc000010090, 0x90)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: github.com/hashicorp/terraform-plugin-sdk/v2#v2.0.0/internal/tfplugin5/tfplugin5.pb.go:3350 +0x14b
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00027ae00, 0x1949c60, 0xc000103380, 0xc00018e000, 0xc00020acf0, 0x1e49910, 0x0, 0x0, 0x0)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc#v1.30.0/server.go:1171 +0x50a
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc.(*Server).handleStream(0xc00027ae00, 0x1949c60, 0xc000103380, 0xc00018e000, 0x0)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc#v1.30.0/server.go:1494 +0xccd
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0000382e0, 0xc00027ae00, 0x1949c60, 0xc000103380, 0xc00018e000)
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc#v1.30.0/server.go:834 +0xa1
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-08-27T15:34:29.367+0930 [DEBUG] plugin.terraform-provider-onepassword_v1.2.1: google.golang.org/grpc#v1.30.0/server.go:832 +0x204
2021-08-27T15:34:29.368+0930 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021/08/27 15:34:29 [ERROR] eval: *terraform.evalReadDataRefresh, err: rpc error: code = Unavailable desc = transport is closing
2021/08/27 15:34:29 [ERROR] eval: *terraform.evalReadDataRefresh, err: rpc error: code = Unavailable desc = transport is closing
2021/08/27 15:34:29 [ERROR] eval: *terraform.evalReadDataRefresh, err: rpc error: code = Unavailable desc = transport is closing
2021/08/27 15:34:29 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2021-08-27T15:34:29.369+0930 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/anasinnyk/onepassword/1.2.1/darwin_amd64/terraform-provider-onepassword_v1.2.1 pid=17549 error="exit status 2"
2021/08/27 15:34:29 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2021/08/27 15:34:29 [TRACE] [walkRefresh] Exiting eval tree: data.onepassword_item_password.search_api_key
2021/08/27 15:34:29 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2021/08/27 15:34:29 [TRACE] vertex "data.onepassword_item_password.search_api_key": visit complete
2021/08/27 15:34:29 [TRACE] vertex "data.onepassword_item_password.search_api_key": dynamic subgraph encountered errors
2021/08/27 15:34:29 [TRACE] vertex "data.onepassword_item_password.search_api_key": visit complete
2021/08/27 15:34:29 [TRACE] vertex "data.onepassword_item_password.search_api_key (expand)": dynamic subgraph encountered errors
2021/08/27 15:34:29 [TRACE] vertex "data.onepassword_item_password.search_api_key (expand)": visit complete
2021/08/27 15:34:29 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/hashicorp/kubernetes\"] (close)" errored, so skipping
2021/08/27 15:34:29 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/anasinnyk/onepassword\"] (close)" errored, so skipping
2021/08/27 15:34:29 [TRACE] dag/walk: upstream of "root" errored, so skipping
2021-08-27T15:34:29.501+0930 [DEBUG] plugin: plugin exited
2021-08-27T15:34:29.502+0930 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-08-27T15:34:29.507+0930 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/hashicorp/kubernetes/1.13.3/darwin_amd64/terraform-provider-kubernetes_v1.13.3_x4 pid=17673
2021-08-27T15:34:29.507+0930 [DEBUG] plugin: plugin exited
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.
When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.
SECURITY WARNING: the "crash.log" file that was created may contain
sensitive information that must be redacted before it is safe to share
on the issue tracker.
[1]: https://github.com/hashicorp/terraform/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
This led us to find that one of our team members managed to create two 1Password entries with the same name in the same vault.
After deleting the duplicate entry in 1Password, terraform plan ran without error again.
I'm trying to build a web front end of a fabric-network, and after I completed the registerAdmin and registerUser, I got err when I was tring to run my js code.
root#oyu-virtual-machine:~/hyperledger-fabric/test/webapp# node get.js
Load privateKey and signedCert
Get History
Assigning transaction_id: 35e9ed932366df66448d789fbf5989e6ba31be555f96eaca3197475a1602749c
E0429 15:09:28.130483373 4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
returned from gethistory
Gethistory result count = 1
error from gethistory = Error: 14 UNAVAILABLE: failed to connect to all addresses
at Object.exports.createStatusError (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/common.js:91:15)
at Object.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1209:28)
at InterceptingListener._callNext (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:847:24) {
code: 14,
metadata: Metadata { _internal_repr: {}, flags: 0 },
details: 'failed to connect to all addresses'
}
Response is Error: 14 UNAVAILABLE: failed to connect to all addresses
In my opinion, the most important message is
E0429 15:09:28.130483373 4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
It's not generated by my code, but system generated it.
I do hope someone could help me. Thanks in advance.
I am trying to make tests using Karma and i am following Angulars own testing guide. Currently i am using the most basic test class but having issues running it.
The test class:
describe('1st test',()=>{
it('true is true', ()=> expect(true).toBe(true)); });
When i run it using npm test i get the following error in the command prompt:
[1] 24 04 2017 11:27:24.957:WARN [web-server]: 404: /base/node_modules/socket.io-client/dist/socket.io.js
[1] Chrome 57.0.2987 (Windows 10 0.0.0) ERROR
[1] {
[1] "__zone_symbol__error": {
[1] "originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js"
[1] },
[1] "stack": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "name": "Error",
[1] "message": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__stack": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "originalErr": {
[1] "__zone_symbol__error": {
[1] "originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js"
[1] },
[1] "stack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "name": "Error",
[1] "message": "XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__currentTask": {
[1] "type": "microTask",
[1] "state": "notScheduled",
[1] "source": "Promise.then",
[1] "zone": "<root>",
[1] "cancelFn": null,
[1] "runCount": 0
[1] },
[1] "__zone_symbol__stack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__message": "XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__name": "Error",
[1] "__zone_symbol__originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js"
[1] },
[1] "__zone_symbol__currentTask": {
[1] "type": "microTask",
[1] "state": "notScheduled",
[1] "source": "Promise.then",
[1] "zone": "<root>",
[1] "cancelFn": null,
[1] "runCount": 0
[1] },
[1] "__zone_symbol__name": "Error",
[1] "__zone_symbol__message": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js"
[1] }
[1]
[1] Chrome 57.0.2987 (Windows 10 0.0.0) ERROR
[1] {
[1] "__zone_symbol__error": {
[1] "originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js"
[1] },
[1] "stack": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "name": "Error",
[1] "message": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__stack": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "originalErr": {
[1] "__zone_symbol__error": {
[1] "originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js"
[1] },
[1] "stack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "name": "Error",
[1] "message": "XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__currentTask": {
[1] "type": "microTask",
[1] "state": "notScheduled",
[1] "source": "Promise.then",
[1] "zone": "<root>",
[1] "cancelFn": null,
[1] "runCount": 0
[1] },
[1] "__zone_symbol__stack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__message": "XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__name": "Error",
[1] "__zone_symbol__originalStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js",
[1] "__zone_symbol__zoneAwareStack": "Error: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js"
[1] },
[1] "__zone_symbol__currentTask": {
[1] "type": "microTask",
[1] "state": "notScheduled",
[1] "source": "Promise.then",
[1] "zone": "<root>",
[1] "cancelFn": null,
[1] "runCount": 0
[1] },
[1] "__zone_symbol__name": "Error",
[1] "__zone_symbol__message": "(SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__originalStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js",
[1] "__zone_symbol__zoneAwareStack": "Error: (SystemJS) XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError: XHR error (404 Not Found) loading src/node_modules/socket.io-client/dist/socket.io.js\n\tError loading src/node_modules/socket.io-client/dist/socket.io.js as \"socket.io-client\" from src/app/global/socket.service.js"
[1] }
I have checked the file that it cannot find and it exists in the directory stated by the error so i have no clue what to do.
Those are 404 errors for XHR requests. It doesn't mean that the file does not exist in the file system but that it is not served by accessing that particular path. It is unlikely that your server serves the entire file system so you shouldn't be worried if the file exists there or not but if it is being served from a particular URL that your program is trying to access it from.
See the code examples in this answer for an example:
Getting data from/writing data to localhost with Express
Here the socket.io.js file is referenced in HTML as:
<script src="/socket.io/socket.io.js"></script>
not as an absolute path in the file system, and not with a path including node_modules. Paths in the HTTP requests and paths in the file system are a different thing and 404 errors are HTTP-specific.
I have this message
2016/02/22 08:40:10 [error] 2127#0: *193 open()
"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg"
failed (2: No such file or directory), client: 192.168.144.95, server:
api.magritte.arte.tv, request: "GET
/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg
HTTP/1.1", host: "api.magritte.arte.tv", referrer:
"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"
And I parse it this way
grok {
match => { "message" => "(?<timestamp>%{YEAR}/%{MONTHNUM2}/%{MONTHDAY} %{TIME}) \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER:tid}:( \*%{NUMBER:cid})? %{GREEDYDATA:errormessage}(?:, client: (?<client>%{IP}|%{HOSTNAME}))(?:, server: %{IPORHOST:server})(?:, request: %{QS:request})?(?:, upstream: \"%{URI:upstream}\")?(?:, host: %{QS:host})?(?:, referrer: \"%{URI:referrer}\")?"}
}
date {
match => [ "timestamp" , "YYYY/MM/dd HH:mm:ss" ]
}
When a new message arrives the following behaviour occurs
message sent to rabbit : OK
message read from rabbit : OK
problem when logstash read message
"reason"=>"failed to parse [timestamp]",
"caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid
format: \"2016/02/22 08:40:10\" is malformed at \"/02/22
08:40:10\""}}}}, :level=>:warn}
But I have no idea where my error is. using http://grokconstructor.appspot.com/do/match#result all seems OK
The full log in the logstash is
{:timestamp=>"2016-02-22T08:43:29.968000+0100", :message=>"Failed action. ", :status=>400, :action=>["index", {:_id=>nil, :_index=>"logstash-2016.02.22", :_type=>"nginx_error", :_routing=>nil}, #<LogStash::Event:0x75f8f9a0 #metadata_accessors=#<LogStash::Util::Accessors:0x402f1514 #store={}, #lut={}>, #cancelled=false, #data={"message"=>"2016/02/22 08:40:10 [error] 2127#0: *193 open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory), client: 192.168.144.95, server: api.magritte.arte.tv, request: \"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\", host: \"api.magritte.arte.tv\", referrer: \"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos\"", "#version"=>"1", "#timestamp"=>"2016-02-22T07:40:10.000Z", "path"=>"/var/log/nginx/api.magritte.arte.tv_error.log", "host"=>["magritte.arte.tv", "\"api.magritte.arte.tv\""], "type"=>"nginx_error", "application"=>"api", "timestamp"=>"2016/02/22 08:40:10", "severity"=>"error", "pid"=>2127, "tid"=>0, "cid"=>193, "errormessage"=>"open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory)", "client"=>"192.168.144.95", "server"=>"api.magritte.arte.tv", "request"=>"\"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\"", "referrer"=>"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"}, #metadata={}, #accessors=#<LogStash::Util::Accessors:0x27ca0e3f #store={"message"=>"2016/02/22 08:40:10 [error] 2127#0: *193 open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory), client: 192.168.144.95, server: api.magritte.arte.tv, request: \"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\", host: \"api.magritte.arte.tv\", referrer: \"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos\"", "#version"=>"1", "#timestamp"=>"2016-02-22T07:40:10.000Z", "path"=>"/var/log/nginx/api.magritte.arte.tv_error.log", "host"=>["magritte.arte.tv", "\"api.magritte.arte.tv\""], "type"=>"nginx_error", "application"=>"api", "timestamp"=>"2016/02/22 08:40:10", "severity"=>"error", "pid"=>2127, "tid"=>0, "cid"=>193, "errormessage"=>"open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory)", "client"=>"192.168.144.95", "server"=>"api.magritte.arte.tv", "request"=>"\"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\"", "referrer"=>"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"}, #lut={"type"=>[{"message"=>"2016/02/22 08:40:10 [error] 2127#0: *193 open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory), client: 192.168.144.95, server: api.magritte.arte.tv, request: \"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\", host: \"api.magritte.arte.tv\", referrer: \"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos\"", "#version"=>"1", "#timestamp"=>"2016-02-22T07:40:10.000Z", "path"=>"/var/log/nginx/api.magritte.arte.tv_error.log", "host"=>["magritte.arte.tv", "\"api.magritte.arte.tv\""], "type"=>"nginx_error", "application"=>"api", "timestamp"=>"2016/02/22 08:40:10", "severity"=>"error", "pid"=>2127, "tid"=>0, "cid"=>193, "errormessage"=>"open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory)", "client"=>"192.168.144.95", "server"=>"api.magritte.arte.tv", "request"=>"\"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\"", "referrer"=>"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"}, "type"], "[type]"=>[{"message"=>"2016/02/22 08:40:10 [error] 2127#0: *193 open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory), client: 192.168.144.95, server: api.magritte.arte.tv, request: \"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\", host: \"api.magritte.arte.tv\", referrer: \"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos\"", "#version"=>"1", "#timestamp"=>"2016-02-22T07:40:10.000Z", "path"=>"/var/log/nginx/api.magritte.arte.tv_error.log", "host"=>["magritte.arte.tv", "\"api.magritte.arte.tv\""], "type"=>"nginx_error", "application"=>"api", "timestamp"=>"2016/02/22 08:40:10", "severity"=>"error", "pid"=>2127, "tid"=>0, "cid"=>193, "errormessage"=>"open() \"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\" failed (2: No such file or directory)", "client"=>"192.168.144.95", "server"=>"api.magritte.arte.tv", "request"=>"\"GET /static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg HTTP/1.1\"", "referrer"=>"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"}, "type"]}>>], :response=>{"create"=>{"_index"=>"logstash-2016.02.22", "_type"=>"nginx_error", "_id"=>"AVMH7uSoo1ZDC2Pzezhl", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [timestamp]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: \"2016/02/22 08:40:10\" is malformed at \"/02/22 08:40:10\""}}}}, :level=>:warn}
I think it's a quote issue ...
1
Message in nginx logfile 2016/02/22 08:40:10 [error] 2127#0: *193
open()
"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg"
failed (2: No such file or directory), client: 192.168.144.95, server:
api.magritte.arte.tv, request: "GET
/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg
HTTP/1.1", host: "api.magritte.arte.tv", referrer:
"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"
It's the one I use to do my grok parsing (logstash sourceside)
rabbitmq message payload
{"message":"2016/02/22 08:40:10 [error] 2127#0: *193 open()
\"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\"
failed (2: No such file or directory), client: 192.168.144.95, server:
api.magritte.arte.tv, request: \"GET
/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg
HTTP/1.1\", host: \"api.magritte.arte.tv\", referrer:
\"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos\"","#version":"1","#timestamp":"2016-02-22T07:40:10.000Z","path":"/var/log/nginx/api.magritte.arte.tv_error.log","host":["magritte.arte.tv","\"api.magritte.arte.tv\""],"type":"nginx_error","application":"api","timestamp":"2016/02/22
08:40:10","severity":"error","pid":2127,"tid":0,"cid":193,"errormessage":"open()
\"/etc/nginx/nginx/html/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg\"
failed (2: No such file or
directory)","client":"192.168.144.95","server":"api.magritte.arte.tv","request":"\"GET
/static-cdn.arte.tv/resize-preprod/nQa5oWnNDknADSxe0mPEMd5McUA=/940x530/smart/default/prog_img/IMG_APIOS/051000/051700/051757-001_1137283_32_202.jpg
HTTP/1.1\"","referrer":"https://api.magritte.arte.tv/api/oauth/user/documentation/opa/endpoint/27/-api-opa-v2-videos"}
Some backslashes are added
This backslash prevent logstash (target side) to correctly handle the messages.
With this, it works :)
grok {
match => { "message" => "(?<timestamp>%{YEAR}/%{MONTHNUM2}/%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND}) \[%{LOGLEVEL:severity}\] %{POSINT:p_id}#%{NUMBER:t_id}:( \*%{NUMBER:c_id})? %{GREEDYDATA:errormessage}(?:, client: (?<client>%{IP}|%{HOSTNAME}))(?:, server: %{IPORHOST:server})(?:, request: %{QS:request})?(?:, upstream: %{QS:upstream})?(?:, host: %{QS:vhost})?(?:, referrer: \"%{URI:referrer}\")?"}
}
date {
match => [ "timestamp" , "yyyy/MM/dd HH:mm:ss" ]
}
A grok pattern is available, that can solve your problem.
grok {
match => ["message","%{DATESTAMP:timestamp}" ]
}
Try y instead of Y in date filter.
joda.time.format.DateTimeFormat
date {
match => [ "timestamp" , "yyyy/MM/dd HH:mm:ss" ]
}
There was a problem signing an Add-On via jpm: The command
jpm -v sign --api-key 'user:xxxxxxxx:xxx' --api-secret xxxxxxxxxxxxxxxxxxxxxxxxx
failed with the error message
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.x.y/
Signing via the web interface worked.
How can this be fixed?
The full verbose output is
JPM [info] binary set to /usr/bin/firefox
JPM [info] verbose set
JPM [info] Checking compatability bootstrap.js and install.rdf for xpi
Validating the manifest
JPM [info] Creating fallbacks if they are necessary..
Creating XPI
JPM [info] Creating XPI...
JPM [info] .jpmignore found
JPM [info] Adding: /path/to/file
[...]
JPM [info] Adding: /path/to/another_file
JPM [info] XPI created at /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/#addonname-0.x.y.xpi (121ms)
JPM [info] Removing fallbacks if they were necessary..
JPM [info] Creating updateRDF...
Created XPI at /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/#addonname-0.x.y.xpi
JPM [info] Created XPI for signing: /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/#addonname-0.x.y.xpi
JPM [debug] [API] -{ url: 'https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.x.y/',
formData:
{ upload:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
path: '/tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/#addonname-0.x.y.xpi',
fd: null,
flags: 'r',
mode: 438,
start: undefined,
end: undefined,
autoClose: true,
pos: undefined } },
headers: { Authorization: '<REDACTED>', Accept: 'application/json' } }
JPM [debug] [API] <- { headers:
{ allow: 'GET, PUT, HEAD, OPTIONS',
'content-type': 'application/json',
date: 'Thu, 17 Dec 2015 10:17:23 GMT',
server: 'nginx',
'set-cookie': '<REDACTED>',
'strict-transport-security': 'max-age=31536000',
vary: 'Accept, X-Mobile, User-Agent',
'www-authenticate': 'JWT realm="api"',
'x-frame-options': 'DENY',
'content-length': '51',
connection: 'Close' },
response: { detail: 'Incorrect authentication credentials.' } }
JPM [error] FAIL
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.x.y/
status: 401
response: {"detail":"Incorrect authentication credentials."}
headers: {"allow":"GET, PUT, HEAD, OPTIONS","content-type":"application/json","date":"Thu, 17 Dec 2015 10:17:23 GMT","server":"nginx","set-cookie":["multidb_pin_writes=y; expires=Thu, 17-Dec-2015 10:17:38 GMT; Max-Age=15; Path=/"],"strict-transport-security":"max-age=31536000","vary":"Accept, X-Mobile, User-Agent","www-authenticate":"JWT realm=\"api\"","x-frame-options":"DENY","content-length":"51","connection":"Close"}
at /usr/local/lib/node_modules/jpm/lib/amo-client.js:85:13
at tryCatchReject (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:804:4)
at Fulfilled.when (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:592:4)
at Pending.run (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/usr/local/lib/node_modules/jpm/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/usr/local/lib/node_modules/jpm/node_modules/when/lib/Scheduler.js:27:9)
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)
These posts (1), (2) show that this error can occur if your local clock is off by more than 60 seconds with the Mozilla server.
This is also documented in the Olympia 3.0 Authentication API (see exp parameter):
iat
This is a standard JWT claim indicating the issued at time. It should be a Unix epoch timestamp and must be in UTC time.
exp
This is a standard JWT claim indicating the expiration time. It should be a Unix epoch timestamp in UTC time and must be no longer
than 60 seconds past the issued at time.
Note:
If you’re having trouble authenticating, make sure your system clock
is correct and consider synchronizing it with something like NTP
(Network Time Protocol).