Hadoop - No route to host while configuring HUE - mysql

I have installed hue on my local ubuntu system and installed hadoop muti cluster system on two system.
Hadoop Version : 2.7.3
Hue Version : 3.12.0
Ozzie Version : 4.3.0
I am facing issue when I am running sqoop job process from mysql to import data from HDFS. I am getting following error.
Caused by: java.net.NoRouteToHostException: No Route to Host from Developer4/127.0.0.1 to cm:10020 failed on socket timeout exception: java.net.NoRouteToHostException: No route to host; For more details see: http://wiki.apache.org/hadoop/NoRouteToHost
HDFS url hdfs://master:9000
My /etc/hosts file like
192.168.1.149 master
127.0.0.1 developer4
192.168.1.161 slave
Please suggest me where I am doing wrong. Even ozzie command for start and stop command work properly on command line.

You have set Hadoop in your localhost system then you need to remove or modified below things in core-site.xml file.
mapreduce.jobhistory.address 0.0.0.0:10020 Host and port for Job History Server (default 0.0.0.0:10020)
After that you need to run jobhistoryservice with below command.
sbin/mr-jobhistory-daemon.sh --config /home/developer4/hadoop-2.7.3/etc start historyserver
After this command port is enable on your localhost and hope this will help you.

Related

Error while running mysql_secure_installation on arch linux

I'm trying to install MySQL(pure) on Arch Linux so I downloaded the following file from https://dev.mysql.com/downloads/mysql/.
mysql-8.0.26-linux-glibc2.17-x86_64-minimal-rebuild.tar.xz
I extracted it and tried to run ./mysql_secure_installation but after I enter the root password I get the following error message:
[rob#archrob bin]$ sudo ./mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
How can I fix this?
I tried to download it from AUR repository too but when I run the makepkg -si it get a point of the installation it looks like will take forever.
Build files have benn written to /home/rob/mysql/src/build
[0%] Built target INFO_BIN
[0%] built target abi_check
[0%] built target INFO_SRC
[0%] Building CXX object extra/protobuf...
[0%] and so on...
After one hour it was at [22%] so I stopped the installation and tried from the official website.
You'll need to start mariadb before running mysql_secure_installation:
$ sudo systemctl start mariadb.service

Problem with virsh / cannot connect to qemu

I am trying to setup KVM, but when running $ sudo virsh net-define br10.xml I get this:
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
And when jumping into virt-manager GUI a get this dialog Unable to connect to libvirt qemu:///system.
I checked if I am in both kvm and libvirt groups and that seems okay.
I also checked if the libvrt-sock file is created when running $ sudo systemctl start libvirtd.service but there is nothing.
So it showed up that privilges for my files wasn't set correctly. Now everything works

Cannot access hawkular metrics

I have install openshift origin 3.9 using inventory file like you. I have used below line for metrics installation:
openshift_metrics_install_metrics=true
openshift_metrics_hawkuler_hostname=hawkular-metrics.example.com
openshift_master_metrics_public_url=https://hawkular-metrics.example.com/hawkular/metrics
And I installed using inventory file with prerequisites.yaml and then deploy_cluster.yaml, so that hawker-cassandra, hawkular-metrics and heapster in running condition and oc adm top node command is working.
But problem is cannot access hawkular metrics by below command:
curl -H "Athorization :Bearer XXXXX" -H "Hawkular-Tenant:openshift-infra" -X GET https://hawkular-metrics.example.com/hawkular/metrics/metics
Showing error:
could not resolve host:hawkular-metrics.example.com,unknown error.
To deploy metrics and access metrics should I need any thing extra for this version?
Is hawkular-metrics.example.com/hawkular/metrics/metics accessible from client? Either a DNS Server or a local /etc/hosts entry should resolve hawkular-metrics.example.com to the node where router pod resides.

Installing mysql using chef-solo

I have a VM to train myself with chef solo.
Installed it and configured a kitchen. Configured my own VM as the only node in the kitchen.
Used Librarian to download the mysql cookbook and updated the runlist.
What is the command to use - to install the mysql on my node?
Thanks,
Liora
You can use the following command :
chef-solo -j JSON_ATTRIBS -c CONFIG
here
JSON_ATTRIB is the json data for the VM configuration
CONFIG is the configuration file which contains the runlist to be run on the VM
More help can be found using chef-solo --help

how to setup and configure mysql-proxy on ubuntu on amazon ec2

i am trying to setup mysql-proxy on ubuntu on amazon ec2
i have done following:
sudo apt-get install mysql-proxy --yes
vi /etc/default/mysql-proxy
i put following content on "/etc/default/mysql-proxy"
ENABLED="true"
OPTIONS="--proxy-lua-script=/usr/share/mysql-proxy/rw-splitting.lua
--proxy-address=127.0.0.1:3306
--proxy-backend-addresses=private_ip_of_another_ec2_db_server:3306,private_ip_of_another_ec2_db_server:3306"
also tied with "--proxy-address=private_ip_or_public_ip_of_proxy-server:3306 or 4040"
and "--proxy-backend-addresses=public_ip_of_another_ec2_db_server:3306,public_ip_of_another_ec2_db_server:3306"
after that i tried to connect proxy server from another pc using mysql like:
mysql -u some_user -pxxxxx -h proxy_server_ip
or
mysql -u some_user -pxxxxx -h proxy_server_ip -P 4040
but its not working
its showing error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'ip' (10061)
i want to tell you can connect the db server remotely where i allowed remote connection to any host
i also tried /etc/init.d/mysql-proxy start or /etc/init.d/mysql-proxy restart but no result
just to inform you that /etc/init.d/mysql-proxy stop is showing failed
can anyone please help me to setup and configure mysql-proxy on ubuntu
===
Edit
i found some help from other question of stackoverflow and also according to a suggestion in the comments, have done following procedure. and it seems its working now.
i installed mysql-client and mysql-server locally(on proxy server)
then i tried to run mysql-proxy using following command:
mysql-proxy --proxy-backend-addresses=10.73.151.244:3306 --proxy-backend-addresses=10.73.198.7:3306 --proxy-address=:4040 --admin-username=root --admin-password=root --admin-lua-script=>/usr/lib/mysql-proxy/lua/admin.lua
then i tried to connect remotely to the proxy server and its working.
but it seems i need to run this command under screen because when i close the terminal proxy stops working.
Can you please tell me that do i need to run this command under screen or is there any other way to make it alive all time?
There is no need to install Mysql client or Mysql Server on your mysql-proxy.
Installing mysql-proxy does have "full daemon capabilities" compiled into it.
If your are running Ubuntu Server, you may wish to use an UPSTART service script.
This script can be copied into /etc/init/mysql-proxy.conf
# mysql-proxy.conf (Ubuntu 14.04.1) Upstart proxy configuration file for AWS RDS
# mysql-proxy - mysql-proxy job file
description "mysql-proxy upstart script"
author "shadowbq <shadowbq#gmail.com>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect daemon
# Run before process
pre-start script
[ -d /var/run/mysql-proxy ] || mkdir -p /var/run/mysql-proxy
echo "starting mysql-proxy"
end script
# Start the process
exec /usr/bin/mysql-proxy --plugins=proxy --proxy-lua-script=/usr/share/mysql-proxy/rw-splitting.lua --log-level=debug --proxy-backend-addresses=private_ip_of_another_ec2_db_server:3306,private_ip_of_another_ec2_db_server:3306 --daemon --log-use-syslog --pid-file=/var/run/mysql-proxy/mysql-proxy.pid
In the above example I hard coded the AWS RDS server into script, instead of fiddling with defaults and config file
Install Upgraded version 0.8.5
Note:
apt repo does not have 0.8.5 so we need to download tar from mysql official site
Prerequisite :-
Create file /etc/default/mysql-proxy with following content
ENABLED="true"
OPTIONS="--defaults-file=/etc/mysql/mysql-proxy.cnf"
Installation Procedure :-
Download mysql-proxy 0.8.x
Untar in /usr/local
Update PATH environment with /usr/local/mysql-proxy-0.8.5-linux-debian6.0-x86-64bit/bin
vim /etc/environment (to update environment path)
cd /usr/local/mysql-proxy-0.8.5-linux-debian6.0-x86-64bit/bin
Run command sudo ./mysql-proxy --defaults-file=/etc/mysql/mysql-proxy.cnf
Sample mysql-proxy.cnf file
[mysql-proxy]
log-level=debug
log-file=/var/log/mysql-proxy.log
pid-file = /var/run/mysql-proxy.pid
daemon = true
--no-proxy = false
admin-username=ADMIN
admin-password=ADMIN
proxy-backend-addresses=RDS-ENDPOINT:RDS-PORT
admin-lua-script=/usr/lib/mysql-proxy/lua/admin.lua
proxy-address=0.0.0.0:4040
admin-address=localhost:4041
change host ip and port of RDS or mysql
connect to Mysql server via proxy with
mysql -h{proxy-host-ip} -P 4040 -u{mysql_username} -p