Picture of Amy Groshek
Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Amy Groshek - Wednesday, 13 May 2020, 3:54 PM
 

I've spooled up two separate EC2 instances of Ubuntu Xenial trying to set up the AT... I'm using the most recent LTS of Node, as recommended in the docs.

root@ip-172-31-5-67:/var/opt/adapt_authoring# node --version
v12.16.3
root@ip-172-31-5-67:/var/opt/adapt_authoring# npm --version
6.14.4
root@ip-172-31-5-67:/var/opt/adapt_authoring# grunt --version
grunt-cli v1.3.2
grunt v1.0.4

Both times I get the same error during `node install`. With the first instance, I tried deleting node_modules and re-running `npm install --production` as recommended in another thread. That had no effect. This is a fresh install on a brand new instance, same error: 

root@ip-172-31-5-67:/var/opt/adapt_authoring# node install

This script will install the application.
Would you like to continue?
> Continue? Y/n (Y) y

We need to configure the tool before install.
Tip: just press ENTER to accept the default value in brackets.
> Server port (5000) 8080
> Server name (localhost)
> Data directory path (data)
> Git repository URL to be used for the authoring tool source code (https://github.com/adaptlearning/adapt_authoring.git)
> Git repository URL to be used for the framework source code (https://github.com/adaptlearning/adapt_framework.git)
> Specific git revision to be used for the framework. Accepts any valid revision type (e.g. branch/tag/commit) (tags/v5.4.0)
> Master database name (adapt-tenant-master)
> Will you be using a full database connection URI? (all connection options in the URI) y/N (N)
> Database host (localhost)
> Database server port (27017)
> Database server user (only specify if using database authentication)
> Database server password (only specify if using database authentication)
> Database server authentication database (only specify if using database authentication)
> Will you be using an SMTP server? (used for sending emails) y/N (N)
Now we need to configure the master tenant.
Tip: just press ENTER to accept the default value in brackets.

> Set a unique name for your tenant (master)
> Set the display name for your tenant (Master)

Cloned https://github.com/adaptlearning/adapt_framework.git successfully.
/temp/5ebc1592fcba604a672ce4f9/adapt_framework switched to revision tags/v5.4.0
error [13 May 20 15:43:32 +00:00] Error downloading the framework internal/fs/utils.js:230
throw err;
^

Error: EACCES: permission denied, open '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
at Object.openSync (fs.js:458:3)
at Object.writeFileSync (fs.js:1279:35)
at Object.<anonymous> (/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/build.js:5:4)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodent-runtime@3.2.1 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodent-runtime@3.2.1 install 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-05-13T15_43_32_085Z-debug.log

ERROR: internal/fs/utils.js:230
throw err;
^

Error: EACCES: permission denied, open '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
at Object.openSync (fs.js:458:3)
at Object.writeFileSync (fs.js:1279:35)
at Object.<anonymous> (/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/build.js:5:4)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodent-runtime@3.2.1 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodent-runtime@3.2.1 install 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-05-13T15_43_32_085Z-debug.log


Failed to create master tenant. Please check the console output.

 

When I navigate to /var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules, there is no /nodent-runtime. However, running `npm install` inside the adapt_framework directory just gives me the same exact error. 

 

root@ip-172-31-5-67:/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework# cat package.json | grep nodent
root@ip-172-31-5-67:/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework# cat package-lock.json | grep nodent
"nodent-runtime": "^3.2.1",
"nodent-transform": "^3.2.4"
"nodent-runtime": {
"resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz",
"nodent-transform": {
"resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz",
root@ip-172-31-5-67:/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework# npm install nodent-runtime

> nodent-runtime@3.2.1 install /var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime
> node build.js

internal/fs/utils.js:230
throw err;
^

Error: EACCES: permission denied, open '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
at Object.openSync (fs.js:458:3)
at Object.writeFileSync (fs.js:1279:35)
at Object.<anonymous> (/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/build.js:5:4)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/var/opt/adapt_authoring/temp/5ebc1592fcba604a672ce4f9/adapt_framework/node_modules/nodent-runtime/dist/index.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodent-runtime@3.2.1 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodent-runtime@3.2.1 install 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-05-13T15_51_48_581Z-debug.log

Picture of Matt Leathes
Re: Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Matt Leathes - Wednesday, 13 May 2020, 4:38 PM
 

Hi Amy!

You need to be running AAT 0.10.1 (or better) if you want to use Node v12

If you are, then perhaps its a permissions error? Errors that include 'EACCES: permission denied' tend to suggest permissions problems.

Picture of Amy Groshek
Re: Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Amy Groshek - Wednesday, 13 May 2020, 6:02 PM
 

Matt, thanks for your response! 

I am not able to select the tag for AAT 0.10.1. I tried over and over using "tags/v0.10.1" and was not successful...

I was able to get it to work using node 12 and  v5.4.0, I had to use nvm to install node instead of using an Ubuntu install package. 

But I should probably upgrade, is what you're saying? 

Here's what that looked like: 

ubuntu@ip-172-31-14-31:/var/opt/adapt_authoring$ node upgrade

This script will update the Adapt authoring tool and/or Adapt Framework. Would you like to continue?
> Continue? Y/n (Y) y
> Update automatically? Y/n (Y) n

> Specific git revision to be used for the authoring tool. Accepts any valid revision type (e.g. branch/tag/commit) v0.10.1
> Specific git revision to be used for the framework. Accepts any valid revision type (e.g. branch/tag/commit) v5.4.0

/var/opt/adapt_authoring switched to revision v0.10.1
Failed to update /var/opt/adapt_authoring to 'v0.10.1'
ERROR:


Upgrade was unsuccessful. Please check the console output.

Picture of Matt Leathes
Re: Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Matt Leathes - Wednesday, 13 May 2020, 7:04 PM
 

What version of the AAT are you running at the moment?

Can you let it try updating you to the latest version? There's no need for you to run v0.10.1 specifically, it's just that's the first release that included support for Node v12

Picture of Amy Groshek
Re: Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Amy Groshek - Friday, 15 May 2020, 1:50 AM
 

Thanks Matt. Works if I just use the update script without specifying a release.

Picture of Matt Leathes
Re: Authoring Tool Installation issues with Ubuntu 18 on AWS EC2
by Matt Leathes - Friday, 15 May 2020, 10:06 AM
 

Odd! But at least it's working now?