Raspberry PI 2 local push failure

I’ve been following the Getting Started for my PI2: https://resinos.io/docs/raspberry-pi2/gettingstarted/#running-your-first-container

But encountered a problem running sudo resin local push resin.local --source .:

  • Building…
  • Stopping and removing any previous ‘myapp’ container
  • Uploading build context & starting build…
    Push failed. Error: (HTTP code 500) server error - Dockerfile parse error line 1: unknown instruction: Error: (HTTP code 500) server error - Dockerfile parse error line 1: unknown instruction:
    at /usr/lib/node_modules/resin-cli/node_modules/docker-modem/lib/modem.js:254:17
    at IncomingMessage. (/usr/lib/node_modules/resin-cli/node_modules/docker-modem/lib/modem.js:281:9)
    at IncomingMessage.emit (events.js:187:15)
    at IncomingMessage.EventEmitter.emit (domain.js:442:20)
    at endReadableNT (_stream_readable.js:1085:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

On the host journald I see:>

Jul 19 10:54:35 resin healthdog[720]: :1:1: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:2: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:3: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:4: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:5: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:6: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:7: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:8: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:9: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:10: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:11: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:12: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:13: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:14: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:15: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:16: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:17: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:18: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:1: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:2: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:3: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:4: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:5: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:6: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:7: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:8: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:9: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:10: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:11: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:12: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:13: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:14: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:15: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:16: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:17: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: :1:18: illegal character NUL
Jul 19 10:54:35 resin healthdog[720]: time=“2018-07-19T10:54:35.955405148Z” level=error msg="Handler for POST /build returned error: Dockerfile parse error line 1: unknown instruction: \x00\x00\x00\x00\x00\x>

But if I grab the POST data out of Wireshark the tarfile looks good.
I’m not sure where to look next, please help!

Thanks.

Hey, going on from what the error message says, it looks like there a NUL character in your Dockerfile (which it shouldn’t be).
Is your Dockerfile being generated programmatically?

Hiya,
No, it’s an unmodified clone of the sample ‘hello world’ type sample app as per the getting started! Hexdump doesn’t show anything before the ‘FROM’ in the Dockerfile.
My only thought was that it’s trying to use the post data directly - not untarring it. But I couldn’t prove it either way. I tried to post a tar using postmaster and got the same result; same too if send a tar.gz, I tried setting the content-type to application/x-tar.
I’m using the Rpi2 binary distribution download.
Do you know if there’s anything more I can get out of the host - some extra verbose logging maybe?
Thanks.

hey @sei1 what version of resinOS are you experiencing this on?

Another question is that is the FROM in your Dockerfile? is it possible that it is an x86 image?

I think it is resinOS 2.13.6+rev1.dev, but I’m not at my desk; I’ll have to confirm tomorrow.

Um, the FROM definitely mentions something to the effect of raspberrypi_alpine.
But it feels like it’s not getting as far as that to me. I could check wireshark tomorrow to see if the pi attempts any external connections.

hmm, thats pretty odd. I just tried here with a fresh 2.13.6 from resinos.io and pushed https://github.com/resin-io-playground/resinos-sample and I wasn’t able to reproduce it. Does the network the Pi2 is running in have any restrictions, etc?

I don’t believe there are any restrictions - it’s on the same local LAN as my machine.
I thought it could be the setup on my machine, I’m running Mint 18.2 but only just installed node for the CLI. But then the outgoing packet looks good on wireshark, I can even extract the tar from the http packet and it reads fine.
I’ll try it out with a third machine in the middle to be sure. Maybe isolate the network too.
Did you try it on a Pi2?
I’ve got a few things to try tomorrow - thanks for your help.

I tried setting up the Intel nuc system in a VirtualBox with the same version 2.13.6+rev1 dev and the push worked. Exact same push still fails to my PI2.
I tried the push from a different machine (on the same LAN) with the same results - works to virtual-nuc, fails to pi2
.
Is there any way to dig more info from the pi2’s balenad? Maybe get it to copy what it thinks is the Dockerfile somewhere?

Just to update: I’ve given up on the RPI2!
I do have resinOS running just fine on my BB-Green and I’ve also got it running on my TI AM437x IDK dev kit. The local push works on both devices once the correct time and date is set.
Cheers.