Process killed when running npm install during file generation step of production guide (Canvas LMS) - amazon-ec2

I am trying to set up a canvas lms on an amazon ec2 Ubuntu environment. I've gone so far until the file generation step of the production environment guide. I've been able to successfully follow the steps until this point.
Steps to reproduce:
I was successful in making the asset directories and taking their ownership as directed in this step:
sysadmin#appserver:~$ cd /var/canvas
sysadmin#appserver:/var/canvas$ mkdir -p log tmp/pids public/assets public/stylesheets/compiled
sysadmin#appserver:/var/canvas$ touch Gemfile.lock
sysadmin#appserver:/var/canvas$ sudo chown -R canvasuser config/environment.rb log tmp public/assets \ public/stylesheets/compiled Gemfile.lock config.ru`
After this, I run 'npm install'
It is at this point that after getting some deprecated warnings I get stuck at this line:
canvas-lms#0.0.0 preinstall /home/ubuntu/canvas/script/gem_npm install
running npm install for gems/canvas_i18nliner/package.json
running npm install for gems/selinimum/package.json
Killed [ ..] / extract:lodash: sill gunzTarPerm modified mode [ 'fp/getOr.js', 420, 436 ]'
What I've already tried:
First I thought it was an error with the port 9418/tcp not being open. I opened this port through amazon ec2 security group inbound rules. This did not work. Then I tried opening all the ports 1-65000 to fix this. It still did not work.
Additional notes:
From the looks of it, it does not looks like a port issue because the script is able to fetch data in the previous steps. Also from the progress bar it can be seen that the extract is failing only when the last 2 dots are left as the progress bar is shows like this: [ ..]. I'm guessing this is a .js creation erorr.
The documentation provides a link to fix those issues but the description of the steps to follow are not very elaborate there as I can't understand what exactly i need to do. Can someone please look into this and help me? Any help is much appreciated.
The File Generation section in the production guide says to follow this link to fix .js creation issues. The solution I found in this link was to add the following code to the compile_template function found in lib/handlebars/handlebars.rb file. The directory lib/handlebars does not exist in /lib
def compile_template(source, id, plugin=nil)
require 'execjs'
require 'multi_json'
P.S. I downloaded my installation directly from the git repository so no chance of this being missing for some reason :/

Related

kubectl not working on my windows 10 machine

When I try to run any kubectl command including kubectl version, I get a pop-up saying "This app can't run on your PC, To find a version for your PC, check with the software publisher" when this is closed, the terminal shows "access denied"
The weird thing is, when I run the "kubectl version" command in the directory where I have downloaded kubectl.exe, it works fine.
I have even added this path to my PATH variables.
thank you for the answer, #rally
apparently, in my machine, it was an issue of administrative rights during installation. My workplace's IT added the permission and it worked for me.
Adding this answer here so that if anyone else comes across this problem they can try this solution as well.
Not knowing what exactly you downloaded, i would suggest you to delete everying in the folder and follow the instructions for installing kubectl for Windows from here:
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
Note: downloading the .exe is not enough. You need a kubeconfig file "config", which contains the configuration to access your cluster.
kubectl looks for this file in a hidden folder under your user profile directory. c:\users<me>.kube.
Just to let you try, i would suggest you to activate Kubernetes in your Docker-Desktop installation. I guess you have this installed. If not install it from the Dockersite. https://www.docker.com/products/docker-desktop/
Activating Kubernetes inside Docker-desktop, will install also kubectl and save the config in the .kube folder.
After the installation finished, in a new terminal:
kubectl get node
You should see the 1 node in the kubernetes-docker-desktop cluster.
Now if you want to access another cluster, you need the kubeconfig-file for that cluster. If you have it, just rename the config in the .kube folder (to not loose it) and put the other config inside.
If the new config file is correct you should be able to access that cluster.
The config file can be structured to hold more than one cluster configuration and you can switch between them using a so called context.
Here you can get the information how to do that, according to your needs:
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
Hope this can help you, starting with KUbernetes.

Facing issue regarding installation in hybris6.6

While installing the hybris, my localextension.xml is creating in comment form. I am very new in hybris ecommerce development.
So I have followed below steps for installing the hyrbis -
Installed the zip version of Hybris 6.6
Unzip it
From Platform folder, I opened the terminal and ran ". ./setantenv.sh" And after that I ran "ant clean all" and after the build completed succesfully all folders got created in Hybris folder.
Then I ran "./hybrisserver.sh" and my server got started successfully.
Then I ran "https://localhost:9002/" over that I initialize and it also went successfully.
When I try to access hmc or backoffice it is giving me 404 page not found error.
I checked my localextension.xml file and found all the extensions generated as a comment as shown below.
Could anyone help me out where I am doing the mistake.
Thanks in advance.
If you are using original package you need to install a receipt. Go to install folder.
Run below command for listing existing receipt
./install.sh -l
Prepare b2c with acc:
./install.sh -r b2c_acc
Initialize b2c with acc (Also you can use ant clean all for this step):
./install.sh -r b2c_acc initialize
Start hybris (Also you can use ./hybrisserver.sh start for this step):
./install.sh -r b2c_acc start
When you do "ant all" for the first time and set-up the config folder, it generates a localextensions.xml file which contains extensions that are commented out. If you initialize and start Hybris using this setting, you get nothing, except the HAC.
To enable HMC, you need to at least have "platformhmc" extension enabled (i.e. not commented out) in localextensions. So, stop Hybris, uncomment platformhmc, and do another build (i.e. "ant all"). After that, you can do a Platform Update, or a Platform Initialize (to build from scratch again). When it's done, and you've started Hybris, HMC should be accessible.
Or, if you want more features enabled by default, you can do #mkysoft's suggestion and use recipes.

Failed to initialize central HHBC repository: Failed to initialize schema

The complete error is:
Failed to initialize central HHBC repository:
Failed to initialize schema in /home/shreeram/.hhvm.hhbc:
I am trying to configure hhvm ana apache2.
For that i am following this link how-to-setup-hhvm-on-ubuntu-14-04-server-with-apache-2-4-part-1/
In above link i am stuck in the step when i put this command in the terminal:
curl -sS https://getcomposer.org/installer | php
The result of that command is the error mentioned above.
The shreeram directory has both read and write permission.
Could anyone help me to understand what i am missing there?
Are you sure permissions are correct on /home/shreeram, and that /home/shreeram/.hhvm.hhbc is readable and writable by the user running php? This issue really does sound like a permissions problem.
As the same user that was running php, does touch /home/shreeram/.hhvm.hhbc work? What about echo > /home/shreeram/.hhvm.hhbc?
If that's all fine, try rm /home/shreeram/.hhvm.hhbc and then try to install Composer again. Although it's typically a permission error, there are cases when the repo can become corrupt (particularly if the enclosing directory is on NFS or some other network filesystem) and you can just remove it and start over.

How to check Mesos Master?

I'm new to Mesos. I would like to know how do I know whether Mesos master is set up correctly in the node?
I have follow the set up given by http://mesos.apache.org/gettingstarted/
I am unable to run the following command:
Comment: Start mesos master (Ensure work directory exists and has proper permissions).
$ ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
but it shown error given:
./bin/mesos-master.sh: line 24: /home/user/mesos-0.20.0/build/src/mesos-master: No such file or directory
What ways should I proceed?
First, a few questions to help us debug your build:
Did the mesos build (make) complete successfully, and did make check pass all the tests?
If /home/user/mesos-0.20.0/build/src/mesos-master does exist, do you have execute permissions on it?
Are you running ./bin/mesos-master.sh from within /home/user/mesos-0.20.0/build/, or did you move the directory elsewhere?
If this is your first attempt at Mesos and you just want to run it and try it out (rather than fix bugs and develop features for it). I would recommend using a pre-built or cloud-deployed version of Mesos, rather than trying to build it yourself. See:
http://mesosphere.com/downloads/
http://mesosphere.com/downloads/details/index.html#apache-mesos
I'd suggest to follow Mesos Getting Started documentation.
After your system requirements are satisfied, following the section:
System Requirements
Once you reach the following section:
Building Mesos
when you execute the make without disabling verbosity, ensure that all process completed successfully. If it stops (e.g. tipically for proxy related issues) try to fix it accordingly or otherwise post your stack somewhere and I would be happy to help (if I can).
Unfortunately, running make check could not reveal the problem sometimes.
Have you run the make check command ? It is said in the documentation that the binaries will only be available after running the make checkcommand.Ì faced the same issue and it was because i didn't run that command.

How to install a mod_ftp module on a MAMP server

Background:
I recently installed MAMP, and am using it as a production server. The server setup did not come with an FTP server, and from what I've read, you can set up an FTP server via mod_ftp, an Apache module. I am not an expert with Apache software or server admin, although I can learn quickly. I can get to the following point and then I get stuck. Can someone please help me out?
I checked out the mod_ftp module files from the repository, here:
http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/
and I unzipped the contents into:
/Applications/MAMP/mod_ftp
I opened the README-FTP file (here):
http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/README-FTP
README-FTP:
To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;
./configure.apxs
make
make install
...
To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing
httpd source tree, and from the httpd source root directory
./buildconf (to pick up ftp)
./configure --enable-ftp {your usual options}
and proceed as usual.
Some Questions:
"build and install a DSO outside of the httpd source build, from the ftp source root directory" -- is the ftp source root directory the mod_ftp folder that I created from the zipped files I checked out from the repository?
What does it mean "outside of the httpd source build"? -- is this the ServerRoot value I set in the httpd.conf as "/Applications/MAMP/Library" ?
Likewise, what does "within the same httpd build" mean -- what location is this referring to?
How do I know whether I want a static or DSO build?
What is the statement: "copy the entire ftp source directory tree on top of your existing
httpd source tree" actually asking me to do? (on top of?? As in, in the parent directory of the httpd source tree, or in the same directory?)
If you've made it this far, I'd like to commend you!
From this point, I chose the first option, and entered the commands seen in README-FTP into my Terminal.
Here's what my terminal looks like:
$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features
Finished, run 'make' to compile mod_ftp
Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)
The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.
The conf/extra/ftpd.conf will be installed as an example
for you to work from. In your configuration file,
/private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
if test -f $i; then \
(awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
-v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
-v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
< $i > $i.new && \
mv $i $i.bak && mv $i.new $i \
) || true; \
fi; \
done
Preserving existing FTP documents
Installing header files
Installing online manual
$
So what do I do from here?
I don't see mod_ftp.so anywhere, and I am particularly looking in this directory:
/Applications/MAMP/Library/modules (where all of Apache's other mod_*.so files are...)
and this directory:
/Applications/MAMP/mod_ftp/modules/ftp (where all of mod_ftp's various .c, .h and other files are)
Ultimately, I think the problem I am running into is that I don't understand how the file structures between my mod_ftp source folder and the httpd source folders need to be integrated in order to get the module running properly. Also, I don't know what I don't know, so there is probably one simple question to ask, but unfortunately I can't figure out how to ask it. Thank you for your help and patience!
Cheers!
P.S., yes, I have scoured the internet for hours.
I ended up scrapping MAMP and using the Mac's built in server. Through the System Preferences > Sharing menu, you can enable file sharing, which has an Options pane that allows you to "Share files and folders using FTP." I was able to obtain a static IP address through Comcast Business, and configured port forwarding on port 21 in my router to accept traffic. Then, I could use my FTP client to connect to my router with something like "123.456.789:21" as my host. Wasn't the best or most secure solution, but it worked, so take it with a grain of salt.
Right, I finally managed to install this on Ubuntu LTS 16.04.
First of all, you should install svn and the apxs functionality by running
sudo apt-get install subversion apache2-dev.
Then, cd to a convenient folder, and run svn co http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/. This downloads everything in the folder named /trunk. Then, cd into the /trunk folder of the downloaded repo.
Then, run the stated instructions
./configure.apxs --> does something in the subfolder to enable makefile to work
make --> this compiles the contents of the repo and changes things around.
make install --> you may want to run with the suggested flag. Essentially copies things to where it needs to be copied, and creates the necessary modules.
The suggested ./buildconf and ./configure should only be done if you are compiling apache2 with ftp at the same time. Since you should already have apache2 installed, this is not the option that you should be doing. Just stick with the first set of instructions, which are used to compile mod_ftp independently of apache2 and patch things in as needed.
At this point, the installation should technically work. However, you are not fully out of the woods yet. If you restart apache2 at this point, it should fail to start. If you run systemctl -xe, you will see that it is due to syntax errors in various places of the config files where someone forgot to prepend a forward slash, so rather than being given relative to root, the directories being specified end up being relative to /etc/apache2 instead. Fix those, using the line numbers as a guide. The omissions may be found in the apache2.conf file that specify the location of the mod_ftp module, and in the ftpd.conf file that specify the location of the error log.
You now need to mess around with apache2.conf and ftpd.conf (found in the /extra subfolder of the /etc/apache2 folder). Make sure that the lines
include /etc/apache2/extra/ftpd.conf
LoadModule ftp_module /usr/lib/apache2/modules/mod_ftp.so are present and uncommented.
The first basically tells the main apache2.conf file to include the configuration files for mod_ftp to help with partitioning your http and ftp configuration settings. The second just makes sure that the ftp module is loaded so that it can interpret the directives in the ftpd.conf file. Thus, you won't need to add the line "FTP on" or specify ports, as those are handled in ftpd.conf perfectly well.
You should now be good to go. Just note that for some weird reason if you set the document root in ftpd.conf to be the same as that in apache2.conf, apache2 will still run normally. The ftp server will work normally but the http server will not work. No idea why, but if you want to do that a simple workaround is to just do a symlink to the http document root and set that as the ftp document root.

Resources