How see what exactly cookbook were uploaded fail? - ruby

I try to upload cookbook with dependencies, here is a log:
[root#redhat cookbooks]# knife cookbook upload reference-app --include-dependencies
Uploading my-cookbook [0.1.0]
Uploading maven [1.2.0]
Uploading hipsnip-jetty [0.9.0]
Uploading ark [0.9.0]
Uploading java [1.29.0]
Uploading windows [1.34.8]
Uploading 7-zip [1.0.2]
Uploading chef_handler [1.1.6]
WARNING: Uploaded 8 cookbooks ok but 2 cookbooks upload failed.
It is all log. Is there a way to sse what cookbook were failed exactly?

Using the verbose flag will show you why it didn't upload correctly.
For instance I added some bad code to the apt cookbook...
[scarman#coldlight cookbooks]$ knife cookbook upload apt --include-dependencies -n -V
Uploading apt [2.6.0]
INFO: Validating ruby files
FATAL: Cookbook file recipes/default.rb has a ruby syntax error:
FATAL: /home/scarman/DevOps/cookbooks/apt/recipes/default.rb:29: `##' is not allowed as an instance variable name
FATAL: /home/scarman/DevOps/cookbooks/apt/recipes/default.rb:29: syntax error, unexpected end-of-input, expecting '('
FATAL: uha897*#S::##!!
FATAL: ^
And also turned my internet off for a moment...
[scarman#coldlight cookbooks]$ knife cookbook upload apt --include-dependencies -n -V
ERROR: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all, retry 1/5
ERROR: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all, retry 2/5
ERROR: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all, retry 3/5
ERROR: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all, retry 4/5
ERROR: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all, retry 5/5
ERROR: Network Error: Error connecting to https://api.opscode.com/organizations/cls-chef/cookbooks?num_versions=all - getaddrinfo: Name or service not known
Check your knife configuration and network settings
That should hopefully provide you with more insight as to why it's failing.

Related

Go get from GCP source repositories

I'm trying to go get a repository from GCP Source repositories.
This seems to be very very poorly documented but what I tried to do was running go get source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git.
But I got the error:
go: downloading source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git v0.0.0-20210621185528-a62b060bc13d
go get: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: verifying
module: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: reading https://sum.golang.org/lookup/source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: 410 Gone
server response:
not found: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: invalid version: git fetch -f origin refs/heads/:refs/heads/ refs/tags/:refs/tags/ in /tmp/gopath/pkg/mod/cache/vcs/3eb4fda67ba3d1beb54fafd4a7594a34c06a66c44b1ffd91759a1b7362ecfa4d: exit status 128:
fatal: unable to connect to source.developers.google.com:
source.developers.google.com[0: 173.194.200.82]: errno=Connection refused
source.developers.google.com[1: 2607:f8b0:4003:c0d::52]: errno=Connection refused
How can I make it work?
Fixed by adding GOPRIVATE=source.developers.google.com. Seems that go mod was trying to use a public connection which was being refused by Source.

Using golang-ci lint error fetch corp package

Im using golangci-lint and getting the following error in CI, any idea what could be the reason? and how can I avoid this.
Our GitHub repo is already have all the vendor packages so it shouldn't install it in first place.
golangci-lint run --config golangci.yml
level=error msg="Running error: context loading failed: failed to load packages: failed to load with go/packages: err: exit
status 1: stderr: go: github.avt.corp/ding/logger-ut#v1.1.0:
unrecognized import path "github.avt.corp/ding/logger-ut" (https
fetch: Get https://github.avt.corp/ding/logger-ut?go-get=1: x509:
certificate signed by unknown authority)\n"
btw I was able to clone the project and run it
Use the following:
run:
modules-download-mode: vendor
or add this to the command you are runnig
--modules-download-mode vendor

GitLab CI Error: Uploading artifacts to coordinator - failed - responseStatus 400 Bad Request

I'm working with GitLab (free edition) pipelines and started receiving the error below on a pipeline that was working.
This is a minimal example from my .gitlab-ci.yml that reproduce the error (Although I don't think it is related to my code):
default:
image: node:10-alpine
stages:
- build
build:
stage: build
script:
- npm install
artifacts:
paths:
- node_modules/
only:
- Staging
.
.
.
Error's log:
64 packages are looking for funding
run `npm fund` for details
Running after_script
Saving cache
Uploading artifacts for successful job
Uploading artifacts...
node_modules/: found 62788 matching files
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
FATAL: invalid argument
ERROR: Job failed: exit code 1
Found this thread in Stackoverfow but it is related to different status error.
There are multiple threads (1 , 2 , 3 ) on this issue on Gitlab forum but it is hard to understand the cause of the problem and how to resolve it.
Any help will be highly appriciated.

Configuring the REST server with a persistent data store

I am having problems trying to deploy the rest server with persistence storage (mongo db) I ge this message when deploying the rest server:
docker logs -f rest
[2018-03-12 00:01:13] PM2 log: Launching in no daemon mode
[2018-03-12 00:01:14] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-03-12 00:01:14] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
at _checkRuntimeVersions.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:699:34)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[2018-03-12 00:07:03] PM2 log: App [composer-rest-server] with id [0] and pid [14], exited with code [1] via signal [SIGINT]
I am using composer v.18
is there any work around to fix this error. when I run the composer-rest- server alone it work. but if I try to add the mongodb it does not work

plugin install through proxy

I am trying to install Graph-Aided Search to integrate Neo4j with ElasticSearch (2.3.1) as shown here. But when I try this command line:
plugin install com.graphaware.es/graph-aided-search/2.3.2.0
I get errors:
plugin install com.graphaware.es/graph-aided-search/2.3.2.0
-> Installing com.graphaware.es/graph-aided-search/2.3.2.0...
Trying https://download.elastic.co/com.graphaware.es/graph-aided-search/graph-aided-search-2.3.2.0.zip ...
Trying https://search.maven.org/remotecontent?filepath=com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip ...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip ...
Trying https://github.com/com.graphaware.es/graph-aided-search/archive/2.3.2.0.zip ...
Trying https://github.com/com.graphaware.es/graph-aided-search/archive/master.zip ...
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information
And this when I add --verbose for more details:
plugin install com.graphaware.es/graph-aided-search/2.3.2.0 --verbose
-> Installing com.graphaware.es/graph-aided-search/2.3.2.0...
Trying https://download.elastic.co/com.graphaware.es/graph-aided-search/graph-aided-search-2.3.2.0.zip ...
Failed: SocketTimeoutException[connect timed out]
Trying https://search.maven.org/remotecontent?filepath=com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip ...
Failed: SocketTimeoutException[connect timed out]
Trying https://oss.sonatype.org/service/local/repositories/releases/content/com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip ...
Failed: SocketTimeoutException[connect timed out]
Trying https://github.com/com.graphaware.es/graph-aided-search/archive/2.3.2.0.zip ...
Failed: SocketTimeoutException[connect timed out]
Trying https://github.com/com.graphaware.es/graph-aided-search/archive/master.zip ...
Failed: SocketTimeoutException[connect timed out]
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information
I looked for that error on google and I found that it might be because of the proxy, and since I am working behind a proxy I tried something that basically worked for others. This is the command line that I tried to install the plugin through proxy:
C:\dev\elasticsearch-2.3.1\bin> plugin -Dhttps.proxyHost=http://example.test.fr -Dhttps.proxyPort=3128 -Dhttps.proxyUser=SomeUser -Dhttps.proxyPassword=Password install com.graphaware.es/graph-aided-search/2.3.2.0
But still it didn't work, and I am still getting the same error. I forced the authentification to the proxy on Internet Explorer, something that usually works for me when I install packages with Maven. However, in that case it didn't work.
I am struggling to integrate my Neo4j database with ElasticSearch, I have been trying that for 4days now and it is taking all my time and cannot work without making this integration with success.
I really appreciate any help or clarification to resolve this error. Thank you.
[UPDATE]
When I try to replace the path, it is still not working. I've tried this command line:
plugin install C:\dev\graph-aided-search-master\target\releases\graph-aided‌​-search-2.4.1.4-SNAP‌​SHOT.zip
and I got this error message:
-> Installing C:\dev\graph-aided-search-master\target\releases\graph-aided‌​-search-2.4.1.4-SNAP‌​SHOT.zip...
ERROR: Invalid prefix or suffix
I put the graph-aided-search Zip file in the same folder as plugin file, so in C:\dev\elasticsearch-2.3.1\bin. Then I tried with the relative path, and I got this message:
> plugin install graph-aided-search-2.4.1.4-SNAPSHOT.zip --verbose
-> Installing graph-aided-search-2.4.1.4-SNAPSHOT.zip...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/graph-aided-search-2.4.1.4-SNAPSHOT.zip/2.3.1/graph-aided-search-2.4.1.4-SNAPSHOT.zip-2.3.1.zip ...
Failed: SocketTimeoutException[connect timed out]
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information
You can download the plugin manually from the MavenRepository
https://mvnrepository.com/artifact/com.graphaware.es/graph-aided-search
The correct syntax is this one:
plugin install com.graphaware.es/graph-aided-search/2.3.2.0 -DproxyHost=exampleHost -DproxyPort=portNumber
It is working now!

Resources