fabric8 -The last operation resulted in the following error: Unauthorized - fabric8

I am working with kubernetes on google cloud,
I have created a fabric8 cluster: http://fabric8.io/guide/getStarted/gke.html
when the cluster is up and running i pull remote repositories and it works but when i try create a new app and i get the following msg:
The last operation resulted in the following error:
Unauthorized
log:2016-08-21T16:39:07.505206481Z Both
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
and
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
are equal candidates for handling the current request which can lead
to unpredictable results
can any body help me understand what this error means?

Any chance of seeing the full log of the fabric8-forge pod?
kubectl logs fabric8-forge-xxxx
Were you creating a project using the wizard using the gogs git server or did you try to import a project from an external git repository?

Related

Nexus helm proxy repo

Have a quick question on helm setup... I created a repo (helm-proxy) on Nexus and tried to add the repo via helm client but got this error " Error: looks like "http://xxxxx:8081/repository/helm-proxy/" is not a valid chart repository or cannot be reached: failed to fetch http://3.231.230.88:8081/repository/helm-proxy/index.yaml : 404 Not Found...
I dont find any issues in adding the helm hosted repo as the index.html got created along with the repo creation but helm-proxy rep there is no index.html... Any help on this ?
Make sure that the value of the Location of the remote repository being proxied (URL-value) in your proxy configuration is correct.
correct means it works with URL-value/index.yaml
It has nothing to do with helm-hosted as helm-hosted generates its own index.yaml on creating it.

Terraform Custom Provider: How to avoid TF state file updates in case remote URL is unavailable?

I am writing a custom terraform provider and have followed all the documented steps in the following URL: https://learn.hashicorp.com/terraform/development/writing-custom-terraform-providers
I am able to get it running with all the CRUD operations with an SDK used for remote service where I am triggering API calls.
However, one issue I am facing is that in case remote URL is unavailable, running a terraform apply overwrites the TF state file even though I am returning an error from the plugin. This error is also reflected in the terraform apply output.
Edit:
Looks like I found steps to replicate this with an existing repository: https://github.com/Mastercard/terraform-provider-restapi/
Observations from this:
If I use the latest release binary from https://github.com/Mastercard/terraform-provider-restapi/releases, it works as expected.
If I clone the repository and build the binary myself using this command go build -o terraform-provider-restapi_v1.10.0-linux-amd64, I start getting the errors as mentioned in the question.
go version: go version go1.10.3 linux/amd64
What am I doing wrong here? How do we build provider binaries?
Any help on how to correct this?

Upload of application bundle failed with error: EISDIR: illegal operation on directory (Elastic Beanstalk deploy VSTS)

I am trying to set up a CICD pipeline using Visual Studio > Visual Studio Team Services > Elastic Beanstalk Create version.
I have been able to check in my code OK, and kick off my build pipeline which contains the following step in place of 'publish artefact':
"Create Elastic Beanstalk Revision:"
This step is attached to an AWS IAM User with Administrator privileges. This step fails when I try to run my pipeline to deploy the ASP.NET application (Webforms, so not Core) via this method.
The error output is as follows:
2018-07-30T04:46:22.7765736Z ##[section]Starting: Create Elastic
Beanstalk Revision: Sparky 2018-07-30T04:46:22.7771363Z
============================================================================== 2018-07-30T04:46:22.7771634Z Task : AWS Elastic Beanstalk
Create Version 2018-07-30T04:46:22.7771964Z Description : Create an
application revision for deployment to an environment.
2018-07-30T04:46:22.7772192Z Version : 1.0.21
2018-07-30T04:46:22.7772403Z Author : Amazon Web Services
2018-07-30T04:46:22.7772908Z Help : Please refer to AWS
Elastic Beanstalk User
Guide
for more details on deploying applications with AWS Elastic Beanstalk.
2018-07-30T04:46:22.7773336Z
============================================================================== 2018-07-30T04:46:23.2641747Z ac747f99-1789-4d43-86c5-c8283d1a72c0
exists true 2018-07-30T04:46:23.2671026Z Deployment type set to aspnet
2018-07-30T04:46:24.8994140Z Determine S3 bucket
elasticbeanstalk-ap-southeast-2-153247006570 to store application
bundle 2018-07-30T04:46:24.9038683Z Upload of application bundle
failed with error: EISDIR: illegal operation on a directory, read {
Error: EISDIR: illegal operation on a directory, read
2018-07-30T04:46:24.9047409Z Uploading application bundle D:\a\1\a to
object Sparky/a-cicd_test.zip in bucket
elasticbeanstalk-ap-southeast-2-153247006570
2018-07-30T04:46:24.9048878Z ##[error]Error: EISDIR: illegal operation
on a directory, read 2018-07-30T04:46:24.9053846Z at Error
(native) errno: -4068, code: 'EISDIR', syscall: 'read' }
2018-07-30T04:46:24.9172250Z ##[section]Finishing: Create Elastic
Beanstalk Revision: Sparky
I could find very little (pretty much no) results online about this error. I'm not sure how to resolve it. Any ideas anyone? I know it's not IAM permissions as I am using ADMIN for the AWS User just for testing.
EDIT: Added image of build definition. (Note, I don't really know how to use version label output variables so just put something there, but I don't think that's the issue, this failure is something else entirely. I'm just following online example/tutorials for a basic deployment)
The build extension is https://aws.amazon.com/vsts/ and looking back over my screenshot and the instructions I was following here https://aws.amazon.com/blogs/developer/deploying-net-web-applications-using-aws-elastic-beanstalk-with-visual-studio-team-services/ I just realised a mistake! I didn't specify the file name in the web deploy archive.
I changed
$(build.artifactstagingdirectory)
To
$(build.artifactstagingdirectory)\SparkIdeaGenerator.zip
And the build succeeded! However, clearly I didn't understand the purpose of this build task, as it has only created an application revision in AWS, it hasn't actually deployed the updated code. This isn't much good, as I still need to go into the console and click 'Deploy'. This doesn't seem ideal. Here's what I mean:
Clearly I didn't understand the limits of this build task. I thought it would create the revision and deploy the code. It doesn't. There is only one other Elastic Beanstalk build task available in the toolset I downloaded, which is 'create application'. I don't want this, as I already have the application present, I Just want to update it. I will take a look further into this, as I need that full end-to-end automation, commit code, run build, deploy code, update site.
I will however mark the question as answered, as I have solved this specific question/error by specifically referencing a .zip with the package name of the solution itself.
The process is defined in: https://docs.aws.amazon.com/vsts/latest/userguide/tutorial-eb.html
It states that you use the zip file name along with the $(build.artifactstagingdirectory), like what was identified above.
This does appear to fix the issue.

What is Gitlab host URL in Jenkins configuration for Gitlab?

I am trying to configure Jenkins to work with Gitlab.
Currently, I have set Gitlab host URL in the Jenkins configure page as https://gitlab.example.com, which results in the following error:
HTTP ERROR 403
Problem accessing /descriptorByName/com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig/checkUrl. Reason:
Forbidden
As I understand it, the Gitlab host URL is specified under external_url in the /etc/gitlab/gitlab.rb file. However, this file doesn't exist on my local machine. I believe it's created when gitlab is installed but I am unsure it is possible to install gitlab on a mac as I have thus far been unable to find any instructions as to how to do so.
Where would I find the correct gitlab host URL in this case?

fabric8 -how to deploy deploy with gitk keys and create new projects in google cloud

I am working in google cloud with kubernetes and deployed the cluster like in the examples
i downloaded gofabric8-0.4.42-darwin-amd64.tar.gz and deploy it and i am running into a few issues:
i cant create new projects -> The last operation resulted in the following error: Unauthorized with no errors in the log
link to question :
fabric8 -The last operation resulted in the following error: Unauthorized
how can i deploy fabric8 with ssh key to my git ?
note:i am working with gitlab
LOGS:
Error occurred during error handling, give up!
org.apache.cxf.interceptor.Fault: Failed to command remote repo git#:backend/bash-parser.git due: ssh://git#:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host '' can't be established.
RSA key fingerprint is 46:24:24:04:ca:83:62:33:0c:c0:85:4e:21:ea:4d:fa.
Are you sure you want to continue connecting?
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)[cxf-rt-frontend-jaxrs-3.1.6.jar:3.1.6]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)[cxf-rt-frontend-jaxrs-3.1.6.jar:3.1.6]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[cxf-core-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)[servlet-api-3.1.jar:3.1.0]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273)[cxf-rt-transports-http-3.1.6.jar:3.1.6]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837)[jetty-servlet-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)[jetty-servlet-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)[jetty-security-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)[jetty-servlet-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.Server.handle(Server.java:524)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)[jetty-server-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)[jetty-io-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)[jetty-io-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)[jetty-io-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)[jetty-util-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)[jetty-util-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)[jetty-util-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)[jetty-util-9.3.10.v20160621.jar:9.3.10.v20160621]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)[jetty-util-9.3.10.v20160621.jar:9.3.10.v20160621]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
See the separate question for where we can answer that one
To import a project from your own git repository you will need to create a Secret in your users namespace (e.g. in the user-secrets-source-admin namespace) to contain your SSH key, user/password or github user and token.
Then when you import the project (via Team -> Team Dashboard -> Create Application -> Import from Git) after you've supplied the git URL you can select the Secret you wish to use with your git repository so that the git repository can be cloned & edited.
Its a little easier to use HTTPS URLS with git repository as you can then just use user/passwords - or better - use user name + tokens from (say) github. But if you use a ssh based URL for a git repo then you'll have to import your public + private keys into the Secret.

Resources