Error mahout in hortonworks - mahout

I trying to execute mahout in hortonworks (ambari 2.2, HDP 2.4) but I get error "Error: JAVA_HOME is not set". Please, help me to manage for this issue and configuration.

Set JAVA_HOME=/path/to/jdk in .bashrc or run 'export JAVA_HOME=/path/to/jdk' in terminal.

Related

pytest' is not recognized as an internal or external command, while executing through jenkins job

I am trying to run python test through jenkins. I have pytest framework.
I have also installed python 3.8 on jenkins slave machine and set path in the environment variables
I have added below path under PATH section of environment variable as below
C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\Scripts
C:\Users\Admin\AppData\Local\Programs\Python\Python38-32
But still I am getting below error on while running job.
Below are my windows batch command to run from Jenkins:
echo '#### Create Virtual Environment ####'
python -m venv .UIAutomation/venv
echo '#### Activate Virtual Environment ####'
echo '#### Run tests ####'
pytest -s -v --alluredir=.UIAutomation/reports ./UIAutomation/tests --env=staging --browser=chrome
Please help
More details about console error :
warning: manifest_maker: standard file '-c' not found
12:04:12 Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
Note:
Below is my first requirement from file
Collecting psycopg2==2.8.6 (from -r ./UIAutomation/requirements.txt
So after execution I am seeing below error at first line of console-
12:04:12 Error: pg_config executable not found.
12:04:12 pg_config is required to build psycopg2 from source. Please add the directory
From what I see, I find the batch call suspicious.
I think call launches a new console and returns to the script, if its done. So in your case, you activate your venv in another console and then use your standard python env, not the venv and there is no pytest dependency installed.
See also: https://ss64.com/nt/call.html
I had a similiar problem in a yaml script I wrote for Azure DevOps.
I did solve that, with creating the venv and then adding the venv path to the environment variables.

./prereqs-ubuntu.sh Error: Ubuntu focal is not supported

I'm trying to use composer and for the same I'm using the below command for installation.
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
These above commands successfully executed.
But when I executed this command (./prereqs-ubuntu.sh) then I'm getting below error
Terminal Throws Error ///Ubuntu focal is not supported
Please help
Hyperledger Composer Installation
I also find this kind of error during Hyperledger Composer installation this problem mainly depends on the Ubuntu version.
Steps to overcome this problem.
upgrade ubuntu version as per your ubuntu versoin please follow:
https://www.fosslinux.com/38303/how-to-upgrade-to-ubuntu-20-04-lts-focal-fossa.htm
open file prereqs-ubuntu.sh with your compatible editor
update line:
#Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic');
with
# Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic', 'focal');
After saving this file
Run command: ./prereqs-ubuntu.sh
I hope this problem will resolve if anything please feel free to write.

Different software binary being executed on Jenkins for the same path

I have installed gems binary at two places on my jenkins server, each is different version:
[myserver]$ /opt/chef/embedded/bin/gem --version
2.4.1
[myserver]$ /opt/chefdk/embedded/bin/gem --version
2.4.4
I am running a job on this jenkins server with following command : /opt/chefdk/embedded/bin/gem inabox
and I get an error saying :
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command inabox
However when i run the same command from the command line , it identifies the inabox option.
To debug , when I ran this command /opt/chefdk/embedded/bin/gem help commands from the console and command line the options available are different and the console output doesnt include "inabox" option.
To make sure that I use the correct binary , I have also exported the binary path : PATH=$PATH:/opt/chefdk/embedded/bin in the job , but that also doesnt solve any thing.
I suspect that for some reason , /opt/chef/embedded/bin/gem binary is getting executed instead of /opt/chefdk/embedded/bin/gem , but I am not sure how and how do I solve it. Any pointers?
EDIT1
Here is output of echo $PATH
Here is the output of the command when I run through Jenkins console : /opt/chefdk/embedded/bin/gem help commands
Here is the output of the command when I run through command line :
1) Restart Jenkins every time you make changes to environment variables
2) if jenkins is executing the code on a slave, you need to define the PATH in your Jenkins settings.
We identified that a GEM_PATH variable being injected into the Jenkins job was causing the gem command to not work as intended. To resolve the issue, we added the “unset GEM_PATH” line to the beginning of the shell portion of the Build steps. This allowed the gem command to again recognize the “inabox” option and successfully upload gems to the Ruby Gems server.

Command not detected -> roscd: command not found

Many commands like roscd, rosls, roslaunch are not working. Errors are thrown as :-
roscd: command not found
What may be the reasons behind this?
It seems that your setup.bash hasn't been sourced in a terminal window.
Try executing this command:
source /opt/ros/hydro/setup.bash
If that won't work try following the steps on site bellow, as they are beautifully explained on how to install ROS on Ubuntu.
http://wiki.ros.org/groovy/Installation/Ubuntu#groovy.2BAC8-Installation.2BAC8-DebEnvironment.Environment_setup
you need to setup you environment and add variables to your bash
just use the following commands..
echo "source 'your setup.bash file path'" >> ~/.bashrc
source ~/.bashrc

rails s command does not run from ssh

I am using Putty to connect to my localhost, and I don't have any problems apparently, however, when I run command rails s to start my rails 4.0.0 application from Putty, it gives me this message:
jose#jose-laptop:~/rails/dedicated-agenda$ rails s
The program 'rails' can be found in the following packages:
ruby-railties-3.2
ruby-railties-4.0
Try: sudo apt-get install
I don't get that message from the terminal though, the application starts running just fine.
I had to reinstall ubuntu so I upgraded to ubuntu 14.04 just in case you need to know.
I don't know if I am missing something in my ssh settings or how could I use rails s from Putty.
Thanks in advance.
Your PATH environment variable is set differently when you are executing programs in an interactive shell and by ssh(using putty).
Use absolute path of the program to not depend on the PATH variable.
You can also set the right PATH variable at ~/.profile file and load the updated variables using the command source ~/.profile.
Now, you should be able to run the command.
You can use the command
>which rails
to see where rails is installed on your working session.
Then you need to make sure that is in your path when you ssh in.
If you are ssh'ing in as a different use then that user may not have permission to see the rails executable.

Resources