balena-os / resin-device-toolbox

[DEPRECATED] The official Resin Device Toolbox CLI for resinOS
Apache License 2.0
14 stars 3 forks source link

"Error while pulling image" on rdt push #48

Open alexiri opened 7 years ago

alexiri commented 7 years ago

I'm trying to create a container with the electronjs sample and I get the following error:

~/resin/resin-electronjs (master) > rdt push resin  -s .
? Select a name for the application electronjs
* Building..
- Stopping and Removing any previous 'electronjs' container
- Building new 'electronjs' image
Step 1 : FROM resin/raspberrypi-node:slim
rdt push failed. Error: Error while pulling image: Get https://index.docker.io/v1/repositories/resin/raspberrypi-node/images: dial tcp: lookup index.docker.io on 127.0.0.2:53: server misbehaving Error: Error while pulling image: Get https://index.docker.io/v1/repositories/resin/raspberrypi-node/images: dial tcp: lookup index.docker.io on 127.0.0.2:53: server misbehaving
    at Stream.<anonymous> (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/build/docker-utils.js:142:23)
    at emitOne (events.js:96:13)
    at Stream.emit (events.js:188:7)
    at drain (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/node_modules/through/index.js:45:5)
    at Parser.parser.onToken (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/index.js:123:18)
    at Parser.proto.write (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js:88:34)
    at Stream.<anonymous> (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/index.js:23:12)
    at Stream.stream.write (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/resin-sync/node_modules/JSONStream/node_modules/through/index.js:26:11)
    at IncomingMessage.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at IncomingMessage.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at IncomingMessage.Readable.push (_stream_readable.js:134:10)
    at HTTPParser.parserOnBody (_http_common.js:123:22)
    at Socket.socketOnData (_http_client.js:363:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:548:20)

I'm not sure if the docker API is returning what it should or not:

~/resin/resin-electronjs (master) > wget https://index.docker.io/v1/repositories/resin/raspberrypi-node/images
--2016-11-25 21:53:03--  https://index.docker.io/v1/repositories/resin/raspberrypi-node/images
Resolving index.docker.io (index.docker.io)... 52.73.159.23, 52.207.178.113, 54.85.12.131
Connecting to index.docker.io (index.docker.io)|52.73.159.23|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘images’

images                                 [ <=>                                                          ]       2  --.-KB/s    in 0s      

2016-11-25 21:53:04 (118 KB/s) - ‘images’ saved [2]

~/resin/resin-electronjs (master) > cat images 
[]

I'm using rdt 0.0.6 with node 6.9.1 on a Raspberry Pi running 2.0.0-beta.1.

lekkas commented 7 years ago

Hey @alexiri ,

This looks like a one-off DNS error with docker.io.

I tried to reproduce the issue on a Raspberry Pi 2with2.0.0-beta.1` and the build seems to go past the step were you got this error:

kostasl@macbook:~/resin/github/resin-io/resin-electronjs$ rdt push resin.local -s .
? Select a name for the application electronjs
* Building..
- Stopping and Removing any previous 'electronjs' container
- Building new 'electronjs' image
Step 1 : FROM resin/raspberrypi2-node:slim
slim: Pulling from resin/raspberrypi2-node
67e669aa5a70: Pull complete
8dd48be171fc: Pull complete
03cb2944d923: Pull complete
a2b89a44a7f0: Pull complete
0a5b4b54b778: Pull complete
90b280c79de7: Pull complete
b3ee9a89a482: Pull complete
3f337d9642f7: Pull complete
4529aeafc967: Pull complete
c7d3c3f72a41: Pull complete
a04317a68c82: Pull complete
804b497c5f74: Pull complete
eca075a4394b: Pull complete
676bffb4b602: Pull complete
 ---> 2e5035ab1509
[...]

I used the https://github.com/resin-io/resin-electronjs project with only two changes:

It seems like you have already done these changes, just mentioning the steps I followed to make sure we are on the same page.

Did you attempt to rdt push again? Let me know if this issue persists.