Hello,
I am trying to deploy a simple test app to my newly set up openbalena instance, but I am getting this error:
$ DEBUG=1 balena deploy testApp --logs --source .
[debug] original argv0="balena" argv=[/home/vkl/bin/balena-cli/balena,/snapshot/versioned-source/bin/balena,deploy,testApp,--logs,--source,.] length=7
[Debug] Parsing input...
[Debug] Loading project...
[Debug] Resolving project...
[Info] No "docker-compose.yml" file found at "***/balena/my-app"
[Info] Creating default composition with source: "***/balena/my-app"
[Debug] Creating project...
[Info] Everything is up to date (use --build to force a rebuild)
[Info] Creating release...
[Debug] Tagging images...
[Debug] Authorizing push...
[Debug] Untagging images...
[Info] Saving release...
[Error] Deploy failed
Cannot read property 'Symbol(Symbol.iterator)' of images.push
TypeError: Cannot read property 'Symbol(Symbol.iterator)' of images.push
at authorizePush (/snapshot/versioned-source/build/utils/compose.js:397:12)
at createRelease.finally.then.tagServiceImages.tap.getPreviousRepos.then.previousRepos (/snapshot/versioned-source/build/utils/compose.js:456:40)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at /snapshot/versioned-source/build/utils/compose.js:456:18
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
From previous event:
at /snapshot/versioned-source/build/utils/compose.js:452:14
From previous event:
at Object.deployProject (/snapshot/versioned-source/build/utils/compose.js:449:10)
at /snapshot/versioned-source/build/actions/deploy.js:104:24
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at /snapshot/versioned-source/build/actions/deploy.js:103:22
From previous event:
at /snapshot/versioned-source/build/actions/deploy.js:86:8
From previous event:
at deployProject (/snapshot/versioned-source/build/actions/deploy.js:52:72)
at /snapshot/versioned-source/build/actions/deploy.js:199:16
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at /snapshot/versioned-source/build/actions/deploy.js:198:22
From previous event:
at Command.action (/snapshot/versioned-source/build/actions/deploy.js:195:8)
at /snapshot/versioned-source/node_modules/capitano/build/command.js:98:37
While that comamnd is running, the server outputs this:
db_1 | 2020-05-05 12:27:04.521 UTC [52] ERROR: duplicate key value violates unique constraint "service_application_service name_key"
db_1 | 2020-05-05 12:27:04.521 UTC [52] DETAIL: Key (application, "service name")=(2, main) already exists.
db_1 | 2020-05-05 12:27:04.521 UTC [52] STATEMENT: INSERT INTO "service" ("application", "service name")
db_1 | VALUES ($1, $2) RETURNING "id";
If I try to build one of the example applications I get this:
$ DEBUG=1 balena deploy testApp --logs --source .
[debug] original argv0="balena" argv=[/home/vkl/bin/balena-cli/balena,/snapshot/versioned-source/bin/balena,deploy,testApp,--logs,--source,.] length=7
[Debug] Parsing input...
[Debug] Loading project...
[Debug] Resolving project...
[Debug] docker-compose.yml file found at "balena/multicontainer-getting-started"
[Debug] Creating project...
[Info] Building for amd64/intel-nuc
[Build] Building services...
[Build] frontend Preparing...
[Build] data Preparing...
[Debug] Found build tasks:
[Debug] frontend: build [./frontend]
[Debug] data: build [./data]
[Debug] Resolving services with [intel-nuc|amd64]
[Debug] Found project types:
[Debug] frontend: Dockerfile.template
[Debug] data: Dockerfile.template
[Debug] Prepared tasks; building...
[Build] data Step 1/6 : FROM balenalib/intel-nuc-debian-node:10-stretch-run
[Build] data ---> ec70d3da962b
[Build] data Step 2/6 : WORKDIR /usr/src/app
[Build] data ---> Using cache
[Build] data ---> a4c68aab40ed
[Build] frontend Step 1/11 : FROM balenalib/intel-nuc-debian-node:10-stretch-run
[Build] frontend ---> ec70d3da962b
[Build] frontend Step 2/11 : WORKDIR /usr/src/app
[Build] data Step 3/6 : COPY package.json package.json
[Build] frontend ---> Using cache
[Build] frontend ---> a4c68aab40ed
[Build] frontend Step 3/11 : RUN install_packages wget
[Build] frontend ---> Running in 854b0d2abe21
[Build] frontend Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
[Build] frontend Architecture: Intel 64-bit (x86-64)
[Build] frontend OS: Debian Stretch
[Build] frontend Variant: run variant
[Build] frontend Device: Intel NUC
[Build] frontend Device-type:intel-nuc
[Build] frontend Default variable(s): UDEV=off
[Build] frontend The following software stack is preinstalled:
[Build] frontend Node.js v10.20.0, Yarn v1.22.4
[Build] frontend Extra features:
[Build] data ---> Using cache
[Build] data ---> 7634785c28cd
[Build] data Step 4/6 : RUN JOBS=MAX npm install --production
[Build] data ---> Running in b163be6dd318
[Build] data Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
[Build] data Architecture: Intel 64-bit (x86-64)
[Build] data OS: Debian Stretch
[Build] data Variant: run variant
[Build] data Device: Intel NUC
[Build] data Device-type:intel-nuc
[Build] data Default variable(s): UDEV=off
[Build] data The following software stack is preinstalled:
[Build] data Node.js v10.20.0, Yarn v1.22.4
[Build] data Extra features:
[Build] frontend - Easy way to install packages with `install_packages <package-name>` command
[Build] frontend - Run anywhere with cross-build feature (for ARM only)
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org'
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Some index files failed to download. They have been ignored, or old ones used instead.
[Build] frontend Reading package lists...
[Build] frontend Building dependency tree...
[Build] frontend Reading state information...
[Build] frontend Package wget is not available, but is referred to by another package.
[Build] frontend This may mean that the package is missing, has been obsoleted, or
[Build] frontend is only available from another source
[Build] frontend E: Package 'wget' has no installation candidate
[Build] frontend apt failed, retrying
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org'
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Some index files failed to download. They have been ignored, or old ones used instead.
[Build] frontend Reading package lists...
[Build] frontend Building dependency tree...
[Build] frontend Reading state information...
[Build] frontend Package wget is not available, but is referred to by another package.
[Build] frontend This may mean that the package is missing, has been obsoleted, or
[Build] frontend is only available from another source
[Build] frontend E: Package 'wget' has no installation candidate
[Build] frontend apt failed, retrying
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org'
[Build] frontend W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org'
[Build] frontend W: Some index files failed to download. They have been ignored, or old ones used instead.
[Build] frontend Reading package lists...
[Build] frontend Building dependency tree...
[Build] frontend Reading state information...
[Build] frontend Package wget is not available, but is referred to by another package.
[Build] frontend This may mean that the package is missing, has been obsoleted, or
[Build] frontend is only available from another source
[Build] frontend E: Package 'wget' has no installation candidate
[Build] data - Easy way to install packages with `install_packages <package-name>` command
[Build] data - Run anywhere with cross-build feature (for ARM only)
[Build] data npm ERR! code EAI_AGAIN
[Build] data npm ERR! errno EAI_AGAIN
[Build] data npm ERR! request to https://registry.npmjs.org/express failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
[Build] data npm ERR! A complete log of this run can be found in:
[Build] data npm ERR! /root/.npm/_logs/2020-05-05T12_29_06_051Z-debug.log
[Build] Built 2 services in 0:02
[Error] Deploy failed
The command '/bin/sh -c install_packages wget' returned a non-zero code: 100
Error: The command '/bin/sh -c install_packages wget' returned a non-zero code: 100
at Stream.<anonymous> (/snapshot/versioned-source/node_modules/resin-docker-build/build/builder.js:181:23)
at Stream.stream.write (/snapshot/versioned-source/node_modules/through/index.js:26:11)
at Stream.ondata (internal/streams/legacy.js:15:31)
at Stream.emit (events.js:198:13)
at Stream.EventEmitter.emit (domain.js:448:20)
at drain (/snapshot/versioned-source/node_modules/through/index.js:36:16)
at Stream.stream.queue.stream.push (/snapshot/versioned-source/node_modules/through/index.js:45:5)
at Parser.exports.parse.parser.onToken (/snapshot/versioned-source/node_modules/JSONStream/index.js:132:18)
at Parser.proto.write (/snapshot/versioned-source/node_modules/jsonparse/jsonparse.js:135:34)
at Stream.<anonymous> (/snapshot/versioned-source/node_modules/JSONStream/index.js:23:12)
at Stream.stream.write (/snapshot/versioned-source/node_modules/through/index.js:26:11)
at IncomingMessage.ondata (_stream_readable.js:708:20)
at IncomingMessage.emit (events.js:198:13)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at addChunk (_stream_readable.js:287:12)
at readableAddChunk (_stream_readable.js:268:11)
at createBuildStream.Bluebird.try.then (/snapshot/versioned-source/node_modules/resin-docker-build/build/builder.js:73:20)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
at Builder.createBuildStream (/snapshot/versioned-source/node_modules/resin-docker-build/build/builder.js:72:97)
at Promise (/snapshot/versioned-source/node_modules/resin-multibuild/build/build.js:82:17)
at Object.runBuildTask (/snapshot/versioned-source/node_modules/resin-multibuild/build/build.js:59:12)
at /snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:158:34
at Generator.next (<anonymous>)
at __awaiter (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:8:71)
at new Promise (<anonymous>)
at __awaiter (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:4:12)
at performSingleBuild (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:156:12)
at Bluebird.map (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:141:20)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at Object.<anonymous> (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:140:39)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/versioned-source/node_modules/resin-multibuild/build/index.js:5:58)
From previous event:
at runCommand (/snapshot/versioned-source/build/app-capitano.js:159:14)
at Object.exports.run (/snapshot/versioned-source/build/app-capitano.js:171:39)
at routeCliFramework (/snapshot/versioned-source/build/preparser.js:39:79)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1322:13)
at startup (internal/bootstrap/node.js:320:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:660:3)
In that case there is no output on the server.
Everything else seems to be working fine. What could be the problem here?