Install AWS Redshift drivers Tableau Server not working - amazon-web-services

I installed AWS Redshift drivers in Tableau Server using:
Download:
wget https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.27.1000/AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm
Install:
sudo yum --nogpgcheck localinstall AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm
Install output is:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Examining AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm: AmazonRedshiftODBC-64bit-1.4.27-1.x86_64
Marking AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package AmazonRedshiftODBC-64bit.x86_64 0:1.4.27-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================================================================
Installing:
AmazonRedshiftODBC-64bit x86_64 1.4.27-1 /AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64 60 M
Transaction Summary
========================================================================================================================================================================================================================
Install 1 Package
Total size: 60 M
Installed size: 60 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : AmazonRedshiftODBC-64bit-1.4.27-1.x86_64 1/1
Verifying : AmazonRedshiftODBC-64bit-1.4.27-1.x86_64 1/1
Installed:
AmazonRedshiftODBC-64bit.x86_64 0:1.4.27-1
Complete!
When I test redshift connection I get this error:
Drivers needed not installed to connect to db.<br>2021-06-28 14:39:57.163, (YNnfPNRMIky5JaHdM7bkwwAAANQ,1:1

downgrade the driver to 1.4.20.1001, any version after this is not compatible with tableau server.
https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.20.1001/AmazonRedshiftODBC-64-bit-1.4.20.1001-1.x86_64.rpm

Related

Unable to upgrade Amazon Linux 2 kernel from 4.14 to 5.4

I have an older Amazon Linux 2 EC2 instance running the following:
uname -sar:
Linux ip-172-31-8-8.eu-west-1.compute.internal 4.14.62-70.117.amzn2.x86_64 #1 SMP Fri Aug 10 20:14:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Trying to upgrade the kernel to 5.4 using sudo amazon-linux-extras install kernel-5.4 -y shows the following error:
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:5.4.228-132.418.amzn2 will be installed
--> Processing Dependency: microcode_ctl >= 2:2.1-47.amzn2.0.4 for package: kernel-5.4.228-132.418.amzn2.x86_64
--> Finished Dependency Resolution
Error: Package: kernel-5.4.228-132.418.amzn2.x86_64 (amzn2extra-kernel-5.4)
Requires: microcode_ctl >= 2:2.1-47.amzn2.0.4
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Installation failed. Check that you have permissions to install.
Any ideas on how to resolve this dependency and why is it causing it?

Unable to install syslog-ng on amazon linux 2

I have started EC2 instance from L=amazon linux 2 AMI.
I am trying to install syslog-ng with yum but I am getting error.
Commands used :
$ sudo amazon-linux-extras install epel -y
$ sudo yum install syslog-ng
AND
$ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng321/repo/epel-7/czanik-syslog-ng321-epel-7.repo"
$ sudo yum install --enablerepo=epel --assumeyes syslog-ng
But I am getting following error in both the cases:
Loaded plugins: dkms-build-requires, extras_suggestions, langpacks, priorities, update-motd
215 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package syslog-ng.x86_64 0:3.23.1-1.el6 will be installed
--> Processing Dependency: libmaxminddb.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Running transaction check
---> Package libmaxminddb.x86_64 0:1.2.0-1.el7 will be installed
---> Package syslog-ng.x86_64 0:3.23.1-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: syslog-ng-3.23.1-1.el6.x86_64 (copr:copr.fedorainfracloud.org:czanik:syslog-ng323epel6)
Requires: libpcre.so.0()(64bit)
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
cloud-init-19.3-44.amzn2.noarch has missing requires of rsyslog
I wrote these instructions a year ago: https://www.syslog-ng.com/community/b/blog/posts/installing-syslog-ng-in-amazon-linux-2-including-graviton2
I do not have any AWS accounts right now, but if they do not work, the I'll try to get one...
**Update:**
First of all: I double checked your report. You mention adding a repo for EPEL 7 syslog-ng 3.21, however the error below it is about syslog-ng 3.23 for EPEL 6.
OK, I got access. I followed my own instructions and it works:
[ec2-user#ip-xxx ~]$ syslog-ng -V
syslog-ng 3 (3.29.1)
Config version: 3.29
Installer-Version: 3.29.1
Revision:
Compile-Date: Aug 29 2020 08:27:16
Module-Directory: /usr/lib64/syslog-ng
Module-Path: /usr/lib64/syslog-ng
Include-Path: /usr/share/syslog-ng/include
Available-Modules: add-contextual-data,affile,afprog,afsocket,afstomp,afuser,appmodel,basicfuncs,cef,confgen,cryptofuncs,csvparser,dbparser,disk-buffer,examples,graphite,hook-commands,json-plugin,kvformat,linux-kmsg-format,map-value-pairs,pseudofile,sdjournal,stardate,syslogformat,system-source,tags-parser,tfgetent,timestamp,xml,azure-auth-header,http
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: on
Enable-TCP-Wrapper: on
Enable-Linux-Caps: on
Enable-Systemd: on
[ec2-user#ip-xxx ~]$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
And tried to latest version (3.35), and that works as well.
Tried with specific package and its able to install.
$ sudo yum --enablerepo=epel -y install syslog-ng-3.5.6-3.el7.x86_64

The repository ... does not have a Release file (Maxmind)

I am following this tutorial: Maxmind GeoLite2 & GeoIP Database Auto-Update | 2020
I launched an Ec2 AWS instance with the mautic application (debian 10).
I'm trying to install Geolip Maximind on my instance but without success.
Here are the problems:
When I execute the command add-apt-repository ppa:maxmind/ppa
I get the result:
More info: https://launchpad.net/~maxmind/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmpxsjdtonq/pubring.gpg' created
gpg: /tmp/tmpxsjdtonq/trustdb.gpg: trustdb created
gpg: key DE1997DCDE742AFA: public key "Launchpad PPA for MaxMind" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
When I execute the command apt update
I get the result:
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://cdn-aws.deb.debian.org/debian buster InRelease
Hit:3 http://cdn-aws.deb.debian.org/debian buster-updates InRelease
Hit:4 http://cdn-aws.deb.debian.org/debian buster-backports InRelease
Ign:5 http://ppa.launchpad.net/maxmind/ppa/ubuntu impish InRelease
Err:6 http://ppa.launchpad.net/maxmind/ppa/ubuntu impish Release
404 Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/maxmind/ppa/ubuntu impish Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I didn't think it was useful to continue the tutorial because of these errors. I need your precious help to correct them.
If you are running Debian then you just have to install geoip-bin and geoip-database and for the updates you install geoipupdate. They are all in the standard apt repository.
You do not need to add the maxmind repository.
apt install geoip-bin geoip-database geoipupdate
Note that depending what you plan to do you may need also other packages for your perl php lua apache lighttp etc ... Since you don't want to tell us what you have in mind, I can't tell you more than that.
There are several packages there ...
root#linux:~# apt policy geoipupdate
geoipupdate:
Installiert: 3.1.1-1
Installationskandidat: 3.1.1-1
Versionstabelle:
*** 3.1.1-1 500
500 http://ftp.debian.org/debian buster/contrib amd64 Packages
100 /var/lib/dpkg/status
2.5.0-1~bpo9+1 100
100 http://ftp.debian.org/debian stretch-backports/contrib amd64 Packages
2.3.1-1 500
500 http://ftp.debian.org/debian stretch/contrib amd64 Packages
The standard apt repositories are :
deb http://ftp.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.debian.org/debian/ buster main non-free
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main non-free
deb http://ftp.debian.org/debian buster-backports main contrib
deb-src http://ftp.debian.org/debian buster-backports main contrib
add them to your /etc/apt/sources.list and then try again

How to uninstall php-pgsql on AWS EC2

I got a problem when uninstall php-pgsql. it can't be remove.
[root#ip-172-31-31-52 /]# yum list php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
php-pgsql.x86_64 5.3.29-1.8.amzn1 amzn-main
[root#ip-172-31-31-52 /]# yum remove php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: php-pgsql*
No Packages marked for removal
When i check the package is available but stil can't remove. Please help. Thank you
If you look at the output of the list command, it shows that the php-pgsql.x86_64 is available, not installed on the machine. and that's why, when you hit the remove command, it shows that no packages marked for removal.
To support my answer, I had tried to run both of your command on ec2, and which does remove the package , if its installed.
Now if the plugin in installed on ec2 and you run list command , it shows the installed packages:
[root#ip-xx-xxx-xx-xxx ec2-user]# yum list php-pgsql*
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages -- this line shows it installed.
php-pgsql.x86_64
Try remove command to remove the packages:
[root#ip-xx-xxx-xx-xxx ec2-user]# yum remove php-pgsql* -y
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-pgsql.x86_64 0:5.3.29-1.8.amzn1 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Removing:
php-pgsql x86_64 5.3.29-1.8.amzn1 #amzn-main 315 k
Transaction Summary
=============================================================================================================================================================================================================================================
Remove 1 Package
Installed size: 315 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : php-pgsql-5.3.29-1.8.amzn1.x86_64 1/1
Verifying : php-pgsql-5.3.29-1.8.amzn1.x86_64 1/1
Removed:
php-pgsql.x86_64 0:5.3.29-1.8.amzn1
Complete!

how to install virtualbox on RHEL 6 without using yum?

My company has firewall rules for yum so we can use only rpm to install the softwares on the RHEL 6 SERVER. So, I got a task to install virtualbox 5.1 on it. i used the rpm from the virtualbox website and installed it, but it failed with 2 dependencies and i installed them also. Then i got the below error.I just googled that i need some kernel-devel rpms but i dono, what to do after that and what else i need to make the virtual box running.
# virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.32-642.4.2.el6.x86_64) or it failed to load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Qt FATAL: QXcbConnection: Could not connect to display
Aborted
There will be lot of dependencies while installing rpm's. you need to check one by one and install the RPM's. Is suggest you to build local yum repository which doesnt require internet. you should use rhel 6 iso file to build local repo. And download the virtual box rpm, and try to install it with yum utility. yum will use local repo for dependency resolution.
Build repo:
1. mount DVD
[root#lh1 Packages]# cd /etc/yum.repos.d
[root#lh1 yum.repos.d]# vi dvd.repo
[root#lh1 yum.repos.d]# cat dvd.repo
[DVD_ISO]
name= Linux 6
baseurl=file:///mnt/cdrom
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[root#lh1 rpm-gpg]# yum clean all
Loaded plugins: rhnplugin
[Errno 2] No such file or directory: '/var/cache/yum/x86_64/6Server'
[root#lh1 rpm-gpg]# yum repolist
Loaded plugins: rhnplugin
This system is not registered with ULN.
ULN support will be disabled.
DVD_ISO | 3.7 kB 00:00 ...
DVD_ISO/primary_db | 3.1 MB 00:00 ...
repo id repo name status
DVD_ISO Linux 6 3,379
repolist: 3,379