Labs64 / NetLicensing-Demo

Labs64 NetLicensing / Demo Application
https://netlicensing.io
MIT License
6 stars 2 forks source link

Cannot create docker images #17

Open thomasd-gea opened 4 years ago

thomasd-gea commented 4 years ago

Hi,

I tried to start the application with "docker-compose up -d", however, I got the following error:

---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
---> Package php71w-pecl-imagick.x86_64 0:3.4.3-1.w7 will be installed
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Finished Dependency Resolution
Error: Package: php71w-pecl-imagick-3.4.3-1.w7.x86_64 (webtatic)
           Requires: libMagickWand.so.5()(64bit)
Error: Package: php71w-pecl-imagick-3.4.3-1.w7.x86_64 (webtatic)
           Requires: libMagickCore.so.5()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
ERROR: Service 'netlicensing-demo' failed to build: The command '/bin/sh -c yum -y install php71w                            php71w-bcmath               php71w-cli                              php71w-common                           php71w-curl                             php71w-fpm                              php71w-gd                           php71w-ldap                             php71w-imap                             php71w-intl                             php71w-mbstring                         php71w-mcrypt                           php71w-mysqlnd                              php71w-opcache                      php71w-pdo                              php71w-pear                             php71w-pecl-apcu                        php71w-pecl-imagick                             php71w-pgsql                            php71w-process                      php71w-pspell                           php71w-recode                           php71w-soap                             php71w-tidy                             php71w-xml' returned a non-zero code: 1
r-brown commented 4 years ago

System components updated:


r-brown commented 4 years ago

@thomasd-gea may I ask you to verify revised configuration on your env.

thomasd-gea commented 4 years ago

It worked until the "prj-build" step, see output below. Indeed, https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-72_binding.node returns a 404. This seems to be related: https://github.com/sass/node-sass/issues/2694

# NetLicensing Auth
NLIC_AUTH_USERNAME=demo
NLIC_AUTH_PASSWORD=demo
NLIC_AUTH_API_KEY=

> node-sass@4.5.3 install /var/www/netlicensing-demo/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-72_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@0.6.7 install /var/www/netlicensing-demo/node_modules/syntaxhighlighter/node_modules/node-sass
> node rebuild.js

make: Entering directory '/var/www/netlicensing-demo/node_modules/syntaxhighlighter/node_modules/node-sass/build'
  CXX(target) Release/obj.target/binding/binding.o
make: g++: Command not found
make: *** [binding.target.mk:134: Release/obj.target/binding/binding.o] Error 127
make: Leaving directory '/var/www/netlicensing-demo/node_modules/syntaxhighlighter/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-48-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/netlicensing-demo/node_modules/syntaxhighlighter/node_modules/node-sass
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> node-sass@4.5.3 postinstall /var/www/netlicensing-demo/node_modules/node-sass
> node scripts/build.js

Building: /usr/bin/node /var/www/netlicensing-demo/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/var/www/netlicensing-demo/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.6.2
gyp info using node@12.18.4 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/netlicensing-demo/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/netlicensing-demo/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/netlicensing-demo/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:168:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/netlicensing-demo/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/netlicensing-demo/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/netlicensing-demo/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:168:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/netlicensing-demo/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/netlicensing-demo/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/netlicensing-demo/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:168:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/netlicensing-demo/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/netlicensing-demo/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/netlicensing-demo/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/netlicensing-demo/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:168:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/var/www/netlicensing-demo/node_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/var/www/netlicensing-demo/node_modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack     at F (/var/www/netlicensing-demo/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/var/www/netlicensing-demo/node_modules/which/which.js:80:29)
gyp ERR! stack     at /var/www/netlicensing-demo/node_modules/which/which.js:89:16
gyp ERR! stack     at /var/www/netlicensing-demo/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /var/www/netlicensing-demo/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:168:21)
gyp ERR! System Linux 5.4.0-48-generic
gyp ERR! command "/usr/bin/node" "/var/www/netlicensing-demo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/netlicensing-demo/node_modules/node-sass
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-23T07_13_50_282Z-debug.log

> @ dev /var/www/netlicensing-demo
> npm run development

> @ development /var/www/netlicensing-demo
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module '/var/www/netlicensing-demo/node_modules/laravel-mix/setup/webpack.config.js'
Require stack:
- /var/www/netlicensing-demo/node_modules/webpack/bin/convert-argv.js
- /var/www/netlicensing-demo/node_modules/webpack/bin/webpack.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at requireConfig (/var/www/netlicensing-demo/node_modules/webpack/bin/convert-argv.js:96:18)
    at /var/www/netlicensing-demo/node_modules/webpack/bin/convert-argv.js:109:17
    at Array.forEach (<anonymous>)
    at module.exports (/var/www/netlicensing-demo/node_modules/webpack/bin/convert-argv.js:107:15)
    at Object.<anonymous> (/var/www/netlicensing-demo/node_modules/webpack/bin/webpack.js:153:40)
    at Module._compile (internal/modules/cjs/loader.js:1137:30) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/www/netlicensing-demo/node_modules/webpack/bin/convert-argv.js',
    '/var/www/netlicensing-demo/node_modules/webpack/bin/webpack.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-23T07_13_51_146Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-23T07_13_51_166Z-debug.log
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

E.                                                                  2 / 2 (100%)

Time: 12.81 seconds, Memory: 8.00MB

There was 1 error:

1) Tests\Feature\ExampleTest::testBasicTest
Swift_TransportException: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
"

/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:281
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php:270
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php:346
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:416
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:444
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:176
/var/www/netlicensing-demo/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php:85
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:443
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:217
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:160
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:221
/var/www/netlicensing-demo/app/Exceptions/Handler.php:86
/var/www/netlicensing-demo/app/Exceptions/Handler.php:38
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:314
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:118
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234
/var/www/netlicensing-demo/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:57
/var/www/netlicensing-demo/tests/Feature/ExampleTest.php:19

ERRORS!
Tests: 2, Assertions: 1, Errors: 1.
r-brown commented 4 years ago

@thomasd-gea thank you to let us know. We'll fix this NodeJS build step.

However, demo application should be served on the localhost:80 even with the above errors.

thomasd-gea commented 4 years ago

Still no luck. First, the log file storage/logs/laravel-2020-09-23.logcould not be opened for appending stuff. I execed into the container and changed the permissions.

Now, I get the following error (via the web page):

The Mix manifest does not exist. (View: /var/www/netlicensing-demo/resources/views/layouts/default.blade.php) (View: /var/www/netlicensing-demo/resources/views/layouts/default.blade.php)
r-brown commented 4 years ago

@thomasd-gea http://l64.cc/demo ?

thomasd-gea commented 4 years ago

Thanks, I might take this opportunity later. for now, I wanted to play around with the demo a little bit.

r-brown commented 4 years ago

Might be some clarification here:

The way to discover NetLicensing would be:

r-brown commented 4 years ago

@thomasd-gea you might need to clean old docker images as it described here https://github.com/Labs64/NetLicensing-Demo/issues/17#issuecomment-696946862

thomasd-gea commented 4 years ago

Well, I tried that before, but after pulling the git changes again and running through the whole chain again it finally worked. Thanks!

thomasd-gea commented 4 years ago

And then again...

file_put_contents(/var/www/netlicensing-demo/storage/framework/views/8f2a88709f44ff9f911534b06fca7aa99972ad5d.php): failed to open stream: Permission denied

Build was run sucessfully.

Nevertheless, I don't urgently need a fix right now. I tried your online links and played there a little bit. Thanks!

r-brown commented 4 years ago

Was this cleanup script executed as well?

docker exec netlicensing-demo ./dockerfiles/bin/prj-clean.sh
thomasd-gea commented 4 years ago

Yes, I followed all the steps mentioned in https://github.com/Labs64/NetLicensing-Demo/issues/17#issuecomment-696946862