Redis installation error ./redis-trib.rb not found - ruby

I am trying to install redis cluster in ubuntu server using ssh. I don't have sudo permissions to install something in the server.
When I was trying to use the command to create the cluster.
./redis-trib.rb create --replicas 1 127.0.0.1:30000
127.0.0.1:32000 127.0.0.1:32001 127.0.0.1:32002
I got the error as follows
./redis-trib.rb command not found.
I know that I need to install ruby gems to solve the issue. since I dont have sudo permisiion, can you suggest an alternate way to configure it.

Related

Using AWS CLI with MobaXterm on Windows

I am a newbie to both AWS and MobaXterm. I am trying to use MobaXterm to manage AWS instances because it comes with bash.
I am following the commands as per https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html.
When I run the following command $ sudo ./aws/install, I get the following error:
Unable to start 'install': There is no application associated with the
given file name extension.
I did run chmod 777 to ensure that I am able to read/write/execute. Please see attached image.
I do know that I can use Windows CLI installer in command line. However, doing SSH to EC2 is a nightmare in Windows with all certificates. With MobaXterm (because of bash), it is very easy. So, my preference is to use MobaXterm instead of Windows command prompt.
Moreover, I don't want to directly install Ubuntu. Hence, I am looking for some guidance here. I'd appreciate any help.
I am hoping that I am not missing any package. Thanks for any help.
In order for AWS cli to run on MobaXterm, you will need to run the following commands in MobaXterm:
MobApt install python2-pip
pip2 install awscli
It will take some time for MobaXterm to complete steps 1 and 2. Also, AWS cli runs super slow in MobaXterm. You are better off using cmd.
This is the site that helped me ran AWS cli on MobaXterm.
https://majornetwork.net/2017/07/installing-aws-cli-on-cygwin/

pkill does not seem to remove dpkg process in Ubuntu 18.04 LTS

I'm currently using Ubuntu 18.04 LTS, and I am trying to install GitLab via the instructions on https://www.linode.com/docs/development/version-control/install-gitlab-with-docker/.
Initially, I was following the instructions to download and install GitLab via Ubuntu 18.04 LTS at: https://about.gitlab.com/install/#ubuntu, which lead to a problem similar to the problem posed here: https://askubuntu.com/questions/637962/gitlab-install-is-stuck-at-0-on-ubuntu.
I then tried removing the processes involving dpkg with the help of sudo pkill gitlab, following the instructions posed at: https://unix.stackexchange.com/questions/94430/process-id-and-killing-process-ps-commmand.
However, I obtained the following error:
Is there a way to resolve this such that you must manually run sudo dpkg --configure -' to correct the problem does not appear again?
To answer your specific question, running dpkg --configure -a once should resolve the issue and you won't see the message again on future apt install execution. This problem arises because you kill apt in the middle of it doing work.
It seems like the root of the issue may be that you cannot access the GitLab package repository, or CloudFront, to pull the package?
Are you able to access https://packages.gitlab.com/gitlab/gitlab-ee from this system? i.e. curl https://packages.gitlab.com/gitlab/gitlab-ee
If the above works, can you try downloading an actual package manually to see if that works? i.e. wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ee/packages/ubuntu/xenial/gitlab-ee_12.2.4-ee.0_amd64.deb/download.deb
The image itself is served via CloudFront. So I wonder if you're able to connect to https://packages.gitlab.com but not cloudfront.net once the actual file is served.

Ambari agent is not exist

I'm trying to setup the Ambari agent in each node in my cluster and it works fine for almost all my nodes unless one, when I try to retray the Ambari wizard to fix the problem for this one I get this error:
==========================
Running setup agent script...
==========================
Command start time 2017-12-01 14:52:13
Server error attempting a GET to /rhsm/ returned status 503
Repository HDP-UTILS-1.1.0.21 is listed more than once in the configuration
sed: can't read /etc/ambari-agent/conf/ambari-agent.ini: No such file or
directory('', None)
So obviously this error means therer is no ambari-agent installed in this machine,
so I verified if the agent is installed or not with "yum repolist ambari-agent" it replays that the service is already installed
and when I tried to install "yum install ambari-agent", I could not, also there is No directory called /etc/ambari-agent/
I thought about reinstall the ambari agent for this node but I m not sure if this is going to be the good decision.
what should I do??
Removing the agent then reinstalling the agent should resolve the issue. The following commands (run on the node that is failing to register) should achieve that:
sudo yum remove ambari-agent
sudo yum install ambari-agent
You should then be able to retry the installation in the Ambari UI using the cluster setup wizard.

EC2 Instance install x11 libraries

I have a java app running on ec2 instance and I am getting following error:
java.lang.LinkageError: libXt.so.6: cannot open shared object file: No such file or directory
I know this error is because I am missing the x11 libraries. Can someone please help me install this missing libraries? I am logged into the ec2 instance via putty.
Thank you for all the help in advance.
I ran the following lines from putty and that did it.
sudo yum install libXt.{i686,x86_64}
Then I got another error for missing libXmu.so.6.
sudo yum install libXmu.{i686,x86_64}
and that solved it.

knife-windows: Network Error: getaddrinfo: Name or service not known (windows:22)

I have an Ubuntu workstation and i'm trying to bootstrap a windows node. The windows node has ssh open on port 2222. I've been following http://docs.opscode.com/plugin_knife_windows.html.
ateetor#ateetor-virtual-machine:~/chef/chef-repo$ sudo gem install knife-windows --http-proxy=[REMOVED]
Successfully installed knife-windows-0.5.12
1 gem installed
Installing ri documentation for knife-windows-0.5.12...
Installing RDoc documentation for knife-windows-0.5.12...
ateetor#ateetor-virtual-machine:~/chef/chef-repo$ sudo knife bootstrap windows ssh 10.29.3.114 -x chef -P SSHuser1! -N test -p 2222 -VV
DEBUG: Looking for bootstrap template in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:2222
ERROR: Network Error: getaddrinfo: Name or service not known
Check your knife configuration and network settings
To me what that looks like is it's trying to use the word windows as part of the IP; however my syntax matches the guide so i don't know why. Does anyone have any ideas on how to fix this?
If you look at the output it's running the generic bootstrap template.
Looking for bootstrap template in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/bootstrap
Most likely there is an installation or ruby environment issue resolving the knife-windows gem.
When correctly configured you should see:
Looking for bootstrap template in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/knife-windows-0.5.12/lib/chef/knife/bootstrap
The only fix I have found is to use knife from a windows workstation instead of a linux one.
knife bootstrap windows winrm 111.22.33.44.compute-1.amazonaws.com -x Administrator -P "asdklfj329" -N "windows-2008-551"
Enjoy :)
I have faced the similar issue.One of the reasons for this might be you knife-windows gem package is not installed in expected location.
knife-windows resolves target hostname ,if its not properly installed winrm knife cant resolve targetname.So to overcome this install knife-windows as below
To install the knife windows plugin using RubyGems, run the following command:
$ /opt/chef/embedded/bin/gem install knife-windows
if properly installed you should be able to find knife-windows at
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/

Resources