ambari server 2.7.3 installing host on step 3 error - ambari

I have build ambari 2.7.3 from source, so I cleanly install ambari and then install 2.7.3 following the instructions from: https://cwiki.apache.org/confluence/display/AMBARI/Installation+Guide+for+Ambari+2.7.3
Fresh install ambari server 2.7.3 installing host on step 3 ambari server get this error code :
/var/lib/ambari-agent/bin/ambari-agent: line 23: buildNumber: unbound variable

edit file ambari-agent with notepad
/root/var/lib/ambari-agent/bin/ambari-agent
edit HASH and fill with version that has been converted to md5
set -u # fail on unset variables
VERSION="2.7.3.0"
HASH=" -md5 code here- "
example:
set -u # fail on unset variables
VERSION="2.7.3.0"
HASH="fa14de4a50197357f7c5c0e1b3486df2"
save and restart ambari-agent

Related

Multiple issues trying to install PyBOSSA

I am trying to set up PyBOSSA on an AWS EC2 instance running Ubuntu 18.04 LTS. I am following the official instructions and have encountered three errors so far.
sudo apt-get install -y git postgresql postgresql-all postgresql-server-dev-all libpq-dev python-psycopg2 libsasl2-dev libldap2-dev libssl-dev python-virtualenv python-dev build-essential libjpeg-dev libssl-dev libffi-dev dbus libdbus-1-dev libdbus-glib-1-dev libldap2-dev libsasl2-dev python-pip python3-pip redis-server
cd ~
git clone --recursive https://github.com/Scifabric/pybossa
cd pybossa
virtualenv -p python3 env (I'm using Python3 explicitly as my system also has Python 2.7 installed).
source env/bin/activate
pip install -U pip
pip install -r ~/pybossa/requirements.txt
At this point, I start getting error messages... I have copied the stdout and stderr into a file, which I have uploaded here.
I'm not sure if the errors there are what have caused my later errors, but I pushed on through the instructions anyway in hopes it'd work...
cp settings_local.py.tmpl settings_local.py
cp alembic.ini.template alembic.ini
redis-server contrib/sentinel.conf --sentinel
I noted that the Redis server version was 4.0.9 (the instructions say it needs to be v2.6 or greater).
The output from starting the Redis server was as follows:
30284:X 30 Mar 03:09:22.004 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
30284:X 30 Mar 03:09:22.004 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=30284, just started
30284:X 30 Mar 03:09:22.004 # Configuration loaded
...I gather that's ok...
rqscheduler --host 127.0.0.1
This command wasn't installed on my system. I tried to use apt to install it, but there was nothing there. I also tried apt install rq rqscheduler rq-scheduler - nothing found. I then Googled and found the website for rq-scheduler, and found that I could install it by running pip install rq-scheduler
That installed correctly. Nonetheless, running the command rqscheduler --host 127.0.0.1 in the terminal still failed: rqscheduler: command not found.
Knowing that it was a Python package, I wondered if maybe I needed to prepend python3 onto the start of the command: python3 rqscheduler --host 127.0.0.1. Response: python3: can't open file 'rqscheduler': [Errno 2] No such file or directory.
I also tried pip3 install rq-scheduler (which installed fine) and then running the command, but encountered the same error.
I would appreciate knowing how to get that running, but for the purpose of this test, I skipped setting up Regis and the scheduler, and continued with the PyBOSSA instructions:
sudo su postgres
createuser -d -P pybossa
(Password set)
createdb pybossa -O pybossa
exit
python3 cli.py db_create
...and then I got this error:
File "cli.py", line 162
'''SELECT id, created FROM task_run WHERE created LIKE ('\x%')''')
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 54-55: truncated \xXX escape
I instead tried python cli.py db_create, just in case it'd work, and got a different error:
python cli.py db_create
ValueError: invalid \x escape
So I'm seeing three separate issues:
Installing the PyBOSSA-required Python packages.
The issue with the rqscheduler command.
The error when starting the PyBOSSA server.
What do these errors mean?
1 ) For the installation, try this:
virtualenv env
source env/bin/activate
sudo apt install python3-pip
pip3 install -r requirements.txt
Which ended with no error.
2) Try :
pip install rq-scheduler==0.9.1
or
pip3 install rq-scheduler==0.9.1
3) The \ char need to be escaped (like \\) in python.
So you may alter the cli.py line 162 (using text editor) from:
'''SELECT id, created FROM task_run WHERE created LIKE ('\x%')''')
To:
'''SELECT id, created FROM task_run WHERE created LIKE ('\\x%')''')
But it will be better to be fixed by dev on github ...
CONCLUSION
According to official documentation,
PYBOSSA for python 3 We’ve finally migrated PYBOSSA to python 3. We’re
not going to merge into master until we test it in production a bit
more, so please, help us by testing it. All you have to do is
basically, check out the python3 branch (migrate-python3) and run it.
Then, any bug, issue you find, you just report it and we will be happy
to help you.
The PYBOSSA python3 version is freshly migrated so finaly is not very stable ... I expect that it will be better to use the PYBOSSA python2.7 branch and follow exactly the documentation.
And according to official github account they try to make money with support (?...)
Get professional support You can hire us to help you with your PYBOSSA
project or server (specially for python 2.7). Go to our website, and
contact us.
The issue has now been fixed for the master branch (https://github.com/Scifabric/pybossa/pull/1986). You can fetch the new code and use it.

I configured sonar in my local host Ubuntu 16.04 but http://localhost:9000/sonar not working

I am configuring sonar(https://www.sonarqube.org) to my local machine which has Ubuntu 16.04 OS with LAMP(Linux,Apache,mysql,PHP) installed in it.
I have considered these reference link to setup SonarPHP
https://www.howtoforge.com/tutorial/how-to-install-sonarqube-on-ubuntu-1604/
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/
Now I can see that sonar is running in my PC but link http://localhost:9000/sonar is not working.
Please help me.
After lot of research I found the solution. I am explaining step by step process of how to setup Sonar in Ubuntu16.04 so other's developer who is new to sonar can understand this process.
Step 1
Download sonar "Community Edition 7.7" from this link https://www.sonarqube.org/downloads/
Step 2
Unzip file and move folder to /opt/sonarqube
Step 3
Update Sonar configuration file
sudo vi sonarqube-7.0/conf/sonar.properties
Update following values [database user = sonarqube,database = sonarqube]
sonar.jdbc.username=sonarqube
sonar.jdbc.password=some_secure_password
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.host=127.0.0.1
sonar.web.javaAdditionalOpts=-server
...
Step 4
Create new service in ubuntu 16.04
sudo vi /etc/systemd/system/sonarqube.service
add following text to file and make sure that you have double checked mentioned path.
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
User=sonarqube
Group=sonarqube
Restart=always
[Install]
WantedBy=multi-user.target
Start sonar by following command
sudo service sonarqube start
Check sonar status using following command
service sonarqube status
Enable sonar by following command
sudo systemctl enable sonarqube
Step 5
Create Mysql database user and database with following details
Database Username : sonarqube
Database Name : sonarqube
Done.
For project scan you have to download and setup sonar-scanner.
I have taken following links for reference.
https://www.digitalocean.com/community/tutorials/how-to-ensure-code-quality-with-sonarqube-on-ubuntu-16-04
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/

How to configure glassfish or Tomcat server with netbeans Ide in ubuntu 14.04 in 32-bit System

In ubuntu 14.04,i tried to configure glassfidh sever in netbeans. I am also following below steps.
But it could not configured.
Step 1: wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
Step 2: unzip glassfish-4.1.zip -d /opt/
Step 3: nano ~/.profile
Step 4: source ~/.profile
Step 5: asadmin start-domain
step 1 to step 4, there is no problem but at step 5 there is problem like:
No command 'asadmin' found, did you mean: Command 'acsadmin'
from package 'ion' (universe) Command 'amadmin' from package
'amanda-server' (universe) asadmin: command not found
i am following above steps, if i am wrong please correct me.
Thank you.
The asadmin tool is located in the glassfish4 directory that you unzipped. The error message is Ubuntu telling you that it doesn't know of any command named asadmin.
You will need to specify where the asadmin tool is for Ubuntu to interact with it. If you are in the same directory, this means using:
./asadmin start-domain
If you want to be able to start GlassFish like this regardless of the directory, it would be best to install GlassFish as a service as follows:
./asadmin create-service
You should then be able to run something like the following from any terminal window:
service GlassFish_domain1 start
service GlassFish_domain1 stop
service GlassFish_domain1 restart
Find out more details about the options for the command by using the following:
./asadmin help create-service

Where is passenger_config on Debian?

I'm running Debian 8, I want to install Passenger for Apache and followed the instructions here -- https://www.phusionpassenger.com/library/install/apache/install/oss/jessie/. However, when I get to the step about validating the config ...
myuser#myserver:/var/www/html/myuser.net/cindex $ sudo /usr/bin/passenger-config validate-install
sudo: /usr/bin/passenger-config: command not found
I don't find this file anywhere on my system. Where do I find the passenger-config or is the validation step outdated?

How to install MySQLDb adaptor in zope?

I am trying to install MySQLDB adaptor in zope. I have a mac book pro with snow leopard. I have downloaded the "MySQL-python-1.2.0.
from: http://old.zope.org/Members/adustman/Products/MySQLdb/
I extracted the file in /usr/local/zope/lib/python/products
and then I changed directory to it:
cd MySQL-python-1.2.0
And I typed:
sudo /Users/dkar/Desktop/zope/bin/python setup.py build
sudo /User/dkar/Desktop/zope/bin/python setup.py install
I get this error:
Traceback (most recent call last):
File "setup.py", line 34, in ?
mysqlstatic = eval(os.getenv('mysqlstatic', 'False'))
File "<string>", line 0, in ?
NameError: name 'False' is not defined
I see the lines 0 and 34 in the setup.py but I don't know what should I do. Any suggestions what to do? I am new in these things and I don't have any idea how to solve this issue.
Please let me know if you don't understand some part and I will try to explain it better!
Environment that was used:
Debian 2.6.32-5-amd64
Plone 4.3.10
MySQL Server 5.1.49-3
Python-MySQL 1.2.3
ZMySQLDA
Step by step...
Install Plone
Install MySQL, in this exemple I install using apt-get install mysql-server
Install another dependecies apt-get install libmysqlclient-dev
Edit base.cfg or buildout.cfg in eggs add:
eggs =
MySQL_python
In buildout.cfg at the bottom add:
[zmysqlda]
recipe = collective.recipe.zmysqlda
target = ${buildout:directory}/products
run buildout bin/buildout -v
edit DABase.py at the line 92 and the file DA.py line 96
Where have: from ImageFile import ImageFile
Change to: from App.ImageFile import ImageFile
create a folder that the script request:
mkdir -p /{buildout_folder}/buildout-cache/eggs/Zope2-2.13.12-py2.6.egg/Shared/DC/ZRDB/www
Put the icon that don't exist in the folder
wget http://old.zope.org/Documentation/Guides/ZSQL-HTML/DBAdapterFolder_icon.gif
run buildout again.
In zope interface management add Z MySQL database connection
Enter Database conection string:
I hope help yoU!
I extract this cookbook from my post here: http://julianoaraujo.objectis.net/blog/pzp/400320287, it's in Brazilian Portuguese.
I don't know what causes the strange error you get so I'm not sure if my answer will help you. I also had trouble installing mySQLdb. I found out that mysql has to be installed on your system, even if you do not intend to use it with mySQLdb (maybe you just want to use it with a remote connection).
Before building and installing, you have to edit site.cfg and set the path to your mysql_config (which on my mac is: /usr/local/mysql/bin/mysql_config). Then make a symlink, so that your mysql client will be found:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
Hope that helps :)