Jx: I got some difficulties with Jenkins X.. jx create cluster gke

Created on 11 Jun 2018  路  13Comments  路  Source: jenkins-x/jx

I am on mac OS Sierra V: 10.13, and after typing jx create cluster gke in CLI I got an error Error: Command failed gcloud auth login --brief error creating cluster exit status 1 error: exit status 1

and in gcloud auth login --brief is this error WARNING: Failed to start a local webserver listening on any port between 8085 and 8186. Please check your firewall settings or locally running programs that may be blocking or using those ports. WARNING: Defaulting to URL copy/paste mode. Go to the following link in your browser:

I saw some people face the same problems... > https://pastebin.com/dRsLjg42
Any idea?

Many thanks for your time and help!

Most helpful comment

so you are unable to authenticate with gcloud directly right? Please could you raise an issue with Google Cloud.

Once you can login to Google Cloud directly you should be able to use jx create cluster gke provided your account has a project ID defined in the Google Cloud UI.

BTW you can omit the glcoud login option via jx create cluster gke --skip-login see https://jenkins-x.io/commands/jx_create_cluster_gke/

All 13 comments

does this give any more information:

jx create cluster gke --verbose

@jstrachan `

Error: flag needs an argument: 'v' in -v

Examples:
jx create cluster gke
Options:
-b, --batch-mode=false: In batch mode the command never prompts for user input
--cleanup-temp-files=true: Cleans up any temporary values.yaml used by helm install [default true]
--cloud-environment-repo='https://github.com/jenkins-x/cloud-environments': Cloud Environments git repo
--cluster-ipv4-cidr='': The IP address range for the pods in this cluster in CIDR notation (e.g. 10.0.0.0/14)
-n, --cluster-name='': The name of this cluster, default is a random generated name
--default-admin-password='': the default admin password to access Jenkins, Kubernetes Dashboard, Chartmuseum and Nexus
--default-environment-prefix='': Default environment repo prefix, your git repos will be of the form 'environment-$prefix-$envName'
-d, --disk-size='': Size in GB for node VM boot disks. Defaults to 100GB
--domain='': Domain to expose ingress endpoints. Example: jenkinsx.io
--draft-client-only=false: Only install draft client
--enable-autoupgrade=false: Sets autoupgrade feature for a cluster's default node-pool(s)
--environment-git-owner='': The git provider organisation to create the environment git repositories in
--exposer='Ingress': Used to describe which strategy exposecontroller should use to access applications
--git-api-token='': The git API token to use for creating new git repositories
--git-provider-url='': The git server URL to create new git repositories inside
--git-username='': The git username to use for creating new git repositories
--global-tiller=true: Whether or not to use a cluster global tiller
--headless=false: Enable headless operation if using browser automation
--helm-client-only=false: Only install helm client
--helm-tls=false: Whether to use TLS with helm
--http='true': Toggle creating http or https ingress rules
--ingress-cluster-role='cluster-admin': The cluster role for the Ingress controller
--ingress-deployment='jxing-nginx-ingress-controller': The namespace for the Ingress controller Deployment
--ingress-namespace='kube-system': The namespace for the Ingress controller
--ingress-service='jxing-nginx-ingress-controller': The name of the Ingress controller Service
--keep-exposecontroller-job=false: Prevents Helm deleting the exposecontroller Job and Pod after running. Useful for debugging exposecontroller logs but you will need to manually delete the job if you update an environment
-v, --kubernetes-version='': The Kubernetes version to use for the master and nodes. Defaults to server-specified
--labels='': The labels to add to the cluster being created such as 'foo=bar,whatnot=123'. Label names must begin with a lowercase character ([a-z]), end with a lowercase alphanumeric ([a-z0-9]) with dashes (-), and lowercase alphanumeric ([a-z0-9]) between.
--local-cloud-environment=false: Ignores default cloud-environment-repo and uses current directory
--local-helm-repo-name='releases': The name of the helm repository for the installed Chart Museum
-m, --machine-type='': The type of machine to use for nodes
--max-num-nodes='': The maximum number of nodes to be created in each of the cluster's zones
--min-num-nodes='': The minimum number of nodes to be created in each of the cluster's zones
--namespace='jx': The namespace the Jenkins X platform should be installed into
--no-brew=false: Disables the use of brew on MacOS to install or upgrade command line dependencies
--no-default-environments=false: Disables the creation of the default Staging and Production environments
-p, --project-id='': Google Project ID to create cluster in
--recreate-existing-draft-repos=false: Delete existing helm repos used by Jenkins X under ~/draft/packs
--register-local-helmrepo=false: Registers the Jenkins X chartmuseum registry with your helm client [default false]
--skip-ingress=false: Dont install an ingress controller
--skip-login=false: Skip Google auth if already logged in via gloud auth
--skip-tiller=false: Dont install a Helms Tiller service
--tiller-cluster-role='cluster-admin': The cluster role for Helm's tiller
--tiller-namespace='kube-system': The namespace for the Tiller when using a gloabl tiller
--timeout='6000': The number of seconds to wait for the helm install to complete
--tls-acme='false': Used to enable automatic TLS for ingress
--user-cluster-role='cluster-admin': The cluster role for the current user to be able to administer helm
--username='': The kubernetes username used to initialise helm. Usually your email address for your kubernetes account
--verbose=false: Enable verbose logging
-z, --zone='': The compute zone (e.g. us-central1-a) for the cluster
Usage:
jx create cluster gke [flags] [options]
Use "jx create options" for a list of global command-line options (applies to all commands).

`

@enkicoma I think he ment --verbose=true or --verbose. This gives you more output on what's actually happening

what happens if you just type:

gcloud auth login --brief

on your machine? Is there a firewall preventing access to sockets 8085-8186?

We may need to raise an issue against glcloud if we cannot figure out the error

sorry I meant --verbose not -v ;)

@beerkeeper

ERROR: There was a problem with web authentication. Try running again with --no-launch-browser.
ERROR: (gcloud.auth.login) EOF when reading a line
Enter verification code: Error: Command failed gcloud auth login --brief
error creating cluster exit status 1
error: exit status 1

and in gcloud auth login --brief is the same Warning from above

@jstrachan after gcloud auth login --brief output is here:

WARNING: Failed to start a local webserver listening on any port between 8085 and 8186. Please check your firewall settings or locally running programs that may be blocking or using those ports.
WARNING: Defaulting to URL copy/paste mode.
Go to the following link in your browser:

does clicking on that link after Go to the following link in your browser: help? Sounds like this is a google cloud / gcloud issue though with your laptop

@jstrachan Yep after copy/paste that links in my browser I just authorize myself to use that account. After is giving me a code to put in my CLI and after pressing enter just kicking me out and nothing happens.

so you are unable to authenticate with gcloud directly right? Please could you raise an issue with Google Cloud.

Once you can login to Google Cloud directly you should be able to use jx create cluster gke provided your account has a project ID defined in the Google Cloud UI.

BTW you can omit the glcoud login option via jx create cluster gke --skip-login see https://jenkins-x.io/commands/jx_create_cluster_gke/

I wasn't sure the best URL from these https://cloud.google.com/support/docs/issue-trackers to raise an issue against gcloud auth login

probably this one? https://issuetracker.google.com/issues/new?component=187077&template=0

@jstrachan jx create cluster gke --skip-login helps me 馃憤
yep, I will try to raise an issue

Many thanks for your help!

I'm gonna mark this as fixed for now; let us know and we can always reopen if need be. BTW I mentioned --skip-login along with installing via the Google Cloud Shell in the docs: https://jenkins-x.io/getting-started/create-cluster/#using-the-google-cloud-shell

Was this page helpful?
0 / 5 - 0 ratings