Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to start portforwarding" #344

Closed
selfagency opened this issue Oct 31, 2018 · 6 comments · Fixed by #346
Closed

"Unable to start portforwarding" #344

selfagency opened this issue Oct 31, 2018 · 6 comments · Fixed by #346
Labels
area/chart-deployment Issues related to the deployment of charts with helm area/image-registry Issues related to pushing to Docker registries kind/enhancement Enhancement of an existing feature / improvement needs-information Indicates an issue needs more information to work on it

Comments

@selfagency
Copy link

What happened?

Unable to start portforwarding: Unable to list devspace pods: Selected Pod(s) cannot start (Status: ImagePullBackOff)

What did you expect to happen instead?

For the dev space to launch

How can we reproduce the bug? (as minimally and precisely as possible)

➜ git clone https://github.com/covexo/devspace-quickstart-nodejs
Cloning into 'devspace-quickstart-nodejs'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 2), reused 9 (delta 2), pack-reused 0
Unpacking objects: 100% (13/13), done.

~/Dev at ☸️  docker-for-desktop
➜ cd devspace-quickstart-nodejs/

devspace-quickstart-nodejs on  master is 📦 v0.0.1 via ⬢ 10.12.0 at ☸️  docker-for-desktop
➜ devspace up
What is the major programming language of your project?
Supported languages: csharp, go, java, javascript, none, php, python, ruby, typescript
Press ENTER to use: javascript
> javascript

Do you want to use the DevSpace Cloud? (free ready-to-use Kubernetes) (yes | no)
Press ENTER to use: yes
>

Do you want to add the DevSpace Cloud to the $HOME/.kube/config file? (yes | no)
Press ENTER to use: yes
>

[INFO]   Successfully logged into devspace-cloud
Which registry do you want to push to? ('hub.docker.com' or URL)
Press ENTER to use: hub.docker.com
>

Which image name do you want to use on Docker Hub?
Press ENTER to use: selfagency/devspace
>

[INFO]   Successfully logged into devspace-cloud
[INFO]   Building image 'selfagency/devspace' with engine 'docker'
[DONE] √ Authentication successful (hub.docker.com)
Sending build context to Docker daemon  205.8kB
Step 1/8 : FROM node:8.11.4
8.11.4: Pulling from library/node
f189db1b88b3: Pull complete
3d06cf2f1b5e: Pull complete
687ebdda822c: Pull complete
99119ca3f34e: Pull complete
e771d6006054: Pull complete
b0cc28d0be2c: Pull complete
9bbe77ca0944: Pull complete
75f7d70e2d07: Pull complete
Digest: sha256:3422df4f7532b26b55275ad7b6dc17ec35f77192b04ce22e62e43541f3d28eb3
Status: Downloaded newer image for node:8.11.4
 ---> 8198006b2b57
Step 2/8 : RUN mkdir /app
 ---> Running in 8953ba3f0049
 ---> 90eee4a7794a
Step 3/8 : WORKDIR /app
 ---> Running in ebb2abf00b50
 ---> f1b925b8e856
Step 4/8 : COPY package.json .
 ---> 07f752eefca5
Step 5/8 : RUN npm install
 ---> Running in 9878a7c5f446

> nodemon@1.18.5 postinstall /app/node_modules/nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN my-app@0.0.1 No description
npm WARN my-app@0.0.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 275 packages in 9.641s
 ---> 96835696dae7
Step 6/8 : COPY . .
 ---> 5cef85784001
Step 7/8 : EXPOSE 3000
 ---> Running in bedf3f724947
 ---> 7f156b6c17af
Step 8/8 : CMD ["npm", "start"]
 ---> Running in 38b99ece153b
 ---> 67af392022ff
Successfully built 67af392022ff
Successfully tagged selfagency/devspace:7FxIXu9
The push refers to repository [docker.io/selfagency/devspace]
53aa32f5d142: Pushed
3ae3c349b881: Pushed
68442ba5cce2: Pushed
93e27608ab02: Pushed
be0fb77bfb1f: Mounted from library/node
63c810287aa2: Mounted from library/node
2793dc0607dd: Mounted from library/node
74800c25aa8c: Mounted from library/node
ba504a540674: Mounted from library/node
81101ce649d5: Mounted from library/node
daf45b2cad9a: Mounted from library/node
8c466bf4ca6f: Mounted from library/node
7FxIXu9: digest: sha256:803cb53d6ef759f8e67386fbb6d41bffe0eb041ea9342263a7203a4fd15d14f5 size: 2840
[INFO]   Image pushed to registry (hub.docker.com)
[DONE] √ Done building and pushing image 'selfagency/devspace'
[INFO]   Deploying devspace-default with helm
[DONE] √ Tiller started
[DONE] √ Deployed helm chart (Release revision: 1)
[DONE] √ Finished deploying devspace-default
[FATAL]  Unable to start portforwarding: Unable to list devspace pods: Selected Pod(s) cannot start (Status: ErrImagePull)

Local Environment:

  • Operating System: mac
  • Deployment method: helm

Kubernetes Cluster:

  • Cloud Provider: DevSpace Cloud
  • Kubernetes Version:
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.7-gke.6", GitCommit:"06898a4d0f2b96f82b43d9e59fa2825bd3d616a2", GitTreeState:"clean", BuildDate:"2018-10-02T17:32:01Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?
This is my first install and attempt at using devspace

/kind bug

@LukasGentele
Copy link
Contributor

Thanks for reporting the issue, @selfagency - the issue occurs because Kubernetes cannot pull your image from Docker Hub (maybe because it is private?). If that is the case, you can create an imagePullSecret manually.. actually, a secret should have been created for you, but that did not seem to work. I will take a look and let you know when a fix is out for automatic pullSecret creation.

@selfagency
Copy link
Author

Where/how do I create and specify the secret? Sorry, I rarely work with Docker.

@LukasGentele LukasGentele added kind/enhancement Enhancement of an existing feature / improvement priority/longterm area/image-registry Issues related to pushing to Docker registries area/chart-deployment Issues related to the deployment of charts with helm labels Oct 31, 2018
LukasGentele pushed a commit that referenced this issue Oct 31, 2018
@LukasGentele LukasGentele mentioned this issue Oct 31, 2018
@LukasGentele
Copy link
Contributor

When your registry is private, you need to create a secret in Kubernetes containing an auth config for the private registry: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

However, I implemented a feature for automatic pull secret creation. Please, run devspace upgrade and try devspace up afterwards. Does that work now? @selfagency

@LukasGentele LukasGentele reopened this Oct 31, 2018
@selfagency
Copy link
Author

this is on my laptop, with a fresh install of the new version

❯ devspace up                                                                                                                                                                                      11s 756ms
[INFO]   Successfully logged into devspace-cloud
[INFO]   Building image 'devspace' with engine 'docker'
[DONE] √ Authentication successful (hub.docker.com)
Sending build context to Docker daemon  205.8kB
Step 1/8 : FROM node:8.11.4
8.11.4: Pulling from library/node
f189db1b88b3: Pull complete
3d06cf2f1b5e: Pull complete
687ebdda822c: Pull complete
99119ca3f34e: Pull complete
e771d6006054: Pull complete
b0cc28d0be2c: Pull complete
9bbe77ca0944: Pull complete
75f7d70e2d07: Pull complete
Digest: sha256:3422df4f7532b26b55275ad7b6dc17ec35f77192b04ce22e62e43541f3d28eb3
Status: Downloaded newer image for node:8.11.4
 ---> 8198006b2b57
Step 2/8 : RUN mkdir /app
 ---> Running in 57c1bbaee176
 ---> d30af1af63e8
Step 3/8 : WORKDIR /app
 ---> Running in 71c0bbfc8593
 ---> 6e9956ca290e
Step 4/8 : COPY package.json .
 ---> 988d307e995d
Step 5/8 : RUN npm install
 ---> Running in 3653a8633f4e

> nodemon@1.18.5 postinstall /app/node_modules/nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN my-app@0.0.1 No description
npm WARN my-app@0.0.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 275 packages in 11.423s
 ---> 237cb6f5a62d
Step 6/8 : COPY . .
 ---> a3f094d15fe4
Step 7/8 : EXPOSE 3000
 ---> Running in 2641209df23d
 ---> b4cec52d8900
Step 8/8 : CMD ["npm", "start"]
 ---> Running in a526dd5d7437
 ---> 7bf7ddc7a73c
Successfully built 7bf7ddc7a73c
Successfully tagged devspace:CRL26bP
The push refers to repository [docker.io/library/devspace]
86db01537de8: Preparing
01436138feb3: Preparing
5decd92daca5: Preparing
35b40c02e519: Preparing
be0fb77bfb1f: Preparing
63c810287aa2: Waiting
2793dc0607dd: Waiting
74800c25aa8c: Waiting
ba504a540674: Waiting
81101ce649d5: Waiting
daf45b2cad9a: Waiting
8c466bf4ca6f: Waiting
[FATAL]  Error during image push: denied: requested access to the resource is denied

daniel at selfagency-mbp in ~/Dev/devspace-quickstart-nodejs on master [?]
❯ devspace upgrade                                                                                                                                                                               1m 8s 363ms
2018/11/01 13:30:58 Current binary is the latest version:  2.2.0

@FabianKramm
Copy link
Collaborator

FabianKramm commented Nov 2, 2018

Seems like the image name is somehow wrong ('devspace' instead of 'selfagency/devspace'), therefore you can't push the image to dockerhub, because the name 'devspace' is forbidden. @selfagency Could you post your .devspace/config.yaml here, especially the images part?

@FabianKramm FabianKramm added the needs-information Indicates an issue needs more information to work on it label Nov 5, 2018
@LukasGentele
Copy link
Contributor

Closing this for now. Feel free to reopen this issue if the problem still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chart-deployment Issues related to the deployment of charts with helm area/image-registry Issues related to pushing to Docker registries kind/enhancement Enhancement of an existing feature / improvement needs-information Indicates an issue needs more information to work on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants