Apache Ranger is Failed to install in Kerberos Hadoop cluster - kerberos

I have enabled Kerberos from Ambari 2.7.2 and tested authentication from Kafka and HBase.Now I have tried to install Apache Ranger for Authorization. using Mysql DB in Unix based. ranger admin is installed but ranger user-sync is not installing. I am getting below error in Ambari UI.
RuntimeError: Failed to execute command '/usr/bin/apt-get -o Dpkg::Options::=--force-confdef --allow-unauthenticated --assume-yes install ranger-3-1-0-0-78-admin', exited with code '100', message: 'E: Failed to fetch http://public-repo-1.hortonworks.com/HDP/ubuntu16/3.x/updates/3.1.0.0/pool/main/r/ranger/ranger-3-1-0-0-78-admin_1.2.0.3.1.0.0-78_all.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
In Ambari audit logs I am getting below error
2019-07-15T12:19:54.906+0530, User(admin), Operation(CUSTOM_COMMAND RANGER_USERSYNC), Details(RESTART RANGER/RANGER_USERSYNC), Status(ABORTED), RequestId(205), TaskId(969), Hostname(HOSTNAME)
2019-07-15T12:20:28.121+0530, User(admin), RemoteIp(192.168.14.203), Operation(INSTALLED: RANGER_USERSYNC/RANGER on HOSTNAME (TrinityHub)), Host name(HOSTNAME), RequestId(206), Status(Successfully queued)
2019-07-15T12:20:28.128+0530, User(admin), Operation(Install Ranger Usersync), Status(IN_PROGRESS), RequestId(206)
2019-07-15T12:20:28.128+0530, User(admin), Operation(INSTALL RANGER_USERSYNC), Status(QUEUED), RequestId(206), TaskId(970), Hostname(HOSTNAME)
2019-07-15T12:21:09.870+0530, User(admin), Operation(Install Ranger Usersync), Status(FAILED), RequestId(206)
2019-07-15T12:21:09.870+0530, User(admin), Operation(INSTALL RANGER_USERSYNC), Status(FAILED), RequestId(206), TaskId(970), Hostname(HOSTNAME)
2019-07-15T12:21:10.339+0530, User(admin), Operation(EXECUTE AMBARI_SERVER_ACTION), Details(Preparing Operations), Status(ABORTED), RequestId(206), TaskId(971), Hostname(null)
2019-07-15T12:21:10.339+0530, User(admin), Operation(CUSTOM_COMMAND KERBEROS_CLIENT), Details(CHECK_KEYTABS KERBEROS/KERBEROS_CLIENT), Status(ABORTED), RequestId(206), TaskId(972), Hostname(HOSTNAME)

Related

remote connection to postgresql in cpanel

I have a spring boot application, i tried to connect It to a remote database (postgresql) created in a cpanel server but i got this error: An error occurred while setting up the GSS Encoded connection, to fix It i added gssEncMode=disable, then i got this error : Une erreur s'est produite pendant l'établissement de la connexion SSL. here is my application.properties:
spring.datasource.url=jdbc:postgresql://host:port/db?gssEncMode=disable
spring.datasource.username=admin
spring.datasource.password=admin
spring.jpa.hibernate.ddl-auto=update
server.port=9080
spring.servlet.multipart.max-file-size=500KB
spring.servlet.multipart.max-request-size=500KB
spring.jackson.serialization.fail-on-empty-beans=false
Please help me to fix this issue!! Question:how can I get the host and the port of my cpanel server? how can i configure my postgresql database to receive connections from a spring boot application?what are the steps to connect a spring boot application to a postgresql database created in cpanel ?
Add this parameter also to jdbc url then retry :
sslmode=require

How to configure a ODBC connection to teiid on rhel8? GSSAPI negotiation fails

I have a default Teiid 12.2 installation on RHEL 8.
Now I'm trying to configure an ODBC connection that would be used by PHP.
This always results in an error "[unixODBC]received invalid response to GSSAPI negotiation: R"
This is my ODBC configuration
[TEIID12]
Driver = PostgreSQL
Trace = No
Description = PostgreSQL Data Source
Servername = servername
Port = 35432
Protocol = 7.4-1
UserName = someusername
Password = xxxx
Database = vdb
ReadOnly = no
ServerType = Postgres
ConnSettings =
UseServerSidePrepare=1
Debug=0
Fetch = 10000
A regular isql command also fails with the same information
isql -v TEIID12 someusername xxxx
Results in:
[08001][unixODBC]received invalid response to GSSAPI negotiation: R
[ISQL]ERROR: Could not SQLConnect
Additional information:
The same configuration used to work on a different Linux Distro (Ubuntu) but on this machine, kerberos was not configured. So I assume that this is influincing some sort of "preference".
The standalone-teiid.xml configuration has <ssl mode="disabled" /> for the odbc transport. And yet the GSS API errors occur.
In combination with the later, is it possible that the postgresql ODBC driver is requiring GSS to be used? Is there a setting in odbc.ini where this can be disabled?
On Ubuntu the driver version was 10.01, on RHEL it is 10.03
A solution that worked was to set the environment variable PGGSSENCMODE=disable in /etc/profile.

CentOS 6.7 and Windows MSSQL connection - FreeTDS and PHP

I searched for answers related to my question but not found what I'm looking for.
I have server with Linux CentOS 6.7. I need to connect to MS SQL Server 2005 on Windows Small Business Server 2003. In CentOS I installed FreeTDS and I managed to connect to SQL Server from terminal using this command:
# TDSVER=7.0 tsql -H ServerIPAdress -p 1433 -U username -P password
As far as I know this command bypass settings in freetds.conf.
Now I need to connect from PHP script. I'm using PDO extension and I tried this DSN string:
$db = new PDO("dblib:version=7.0;host=ServerIPAdress;dbname=Database;","username","password");
This leads me to first error:
Could not find driver
Ok, I understand that - my PHP 5.3.3 installation doesn't have installed PDO driver dblib.
My question: How can I install pdo_dblib driver in CentOS? Many tutorials and answers suggest to install through this command:
yum install php5-sybase
But that package doesn't exist:
No package php-sybase available.
If I check tsql configuration with command
tsql -C
I get these output:
Version: freetds v0.95
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: yes
As I understand I need to configure FreeTDS:
./configure --enable-msdblib --with-pdo-dblib=/usr/local
But how can I configure FreeTDS after instalation? I tried to remove current version but I can't find way to do that. Also I tried to install another version but configuration doesn't change.
Any advice are appreciated.
When I run command # odbcinst -j I can see this output:
unixODBC 2.3.0
DRIVERS ...........: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLSETPOSIROW Size.: 8
Content of my freetds.conf:
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
tds version = 7.0
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 7.0
# A typical Microsoft server
[MSServer]
host = 192.168.1.55
port = 1433
tds version = 7.0
odbcinst.ini:
[FreeTDS]
Description = FreeTDS v7.0
Driver = /usr/local/lib/libtdsodbc.so
UsageCount = 1
odbc.ini:
[MSSQL]
Driver = FreeTDS
Description = MSSQL Server Connection
TDS_Version = 7.0
Trace = No
Server = MSServer
Port = 1433
Database = MyDatabase
Username = DOMAIN\MyUsername
Password = MyPassword
I can make connection with isql command when I specify username and password:
# isql -v MSSQL "DOMAIN\MyUsername" MyPassword
But if I omit username and password isql generate error:
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
I suspect that my username make problems because I have to use DOMAIN name followed by backslash before username when I connect to SQL Server 2005.
UPDATE:
I succesfully made connection in PHP and now I can run queries. I added this line on top of my script: putenv("FREETDSCONF=/usr/local/etc/freetds.conf")
Why is this necessary?

Odoo v8 server won't start from eclipse

I am trying to start Odoo v8 server from Eclipse ide. I have set the debug configurations and have given the config file path in the arguments as
-c /etc/odoo-server.conf.
When I do debug as python run, I do not get any error. The log file also does not show any error. But when I open localhost:8069 from the browser.
I get server not found error. This does not happen when I start the server through the terminal. Can anyone please tell me what could be the problem?
Below is the odoo-server.conf content:
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = odoo
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo-server.log
Below is the server traceback:
2014-11-15 07:47:06,205 3875 INFO ? openerp: OpenERP version 8.0
2014-11-15 07:47:06,206 3875 INFO ? openerp: addons paths: ['/home/hassan/.local/share/Odoo/addons/8.0', u'/opt/odoo/addons', '/opt/odoo/openerp/addons']
2014-11-15 07:47:06,207 3875 INFO ? openerp: database hostname: localhost
2014-11-15 07:47:06,207 3875 INFO ? openerp: database port: 5432
2014-11-15 07:47:06,207 3875 INFO ? openerp: database user: odoo
2014-11-15 07:47:07,046 3875 INFO ? openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072
Try to check whether the configuration file that you have set is having appropriate access rights. And try not to log the errors into a file, instead allow it show it on the console on Eclipse IDE.
There's nothing wrong with your "traceback": is a normal log, with only INFO messages and it tells you that the server is running and waiting for requests on port 8072.
Point a browser at http://localhost:8072 and you should see a login page.
I know my answer is late, but i ran into this problem today, and got the server running, so thought I should share :
Do not start the openerp server as : Debug as -> Python run.
It only starts the longpolling service.
Try running as : Run as -> Python run
This will start the Http service at your defined port or by default at 8069.

mongodb on VMPlayer ubuntu

I have installed mongoDB on ubuntu in VMplayer running on windows7.
I have edited the hosts file to have
machinename 192.168.1.12.
I installed all the packages and trying to start the mongod.
This is the error I am getting:
ubuntu:/etc/init.d$ start mongodb start: Rejected send message, 1
matched rules; type="method_call", sender=":1.128" (uid=1000 pid=9669
comm="start mongodb ") interface="com.ubuntu.Upstart0_6.Job"
member="Start" error name="(unset)" requested_reply="0"
destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
Can you please let me know what could be the issue?
I was able to install successfully in a pevious in ubuntu.
That's a permission error, you need to sudo, i.e. run the following and you will be ok -
sudo start mongodb