ec2: elb-create-lb-listeners fails - amazon-ec2

Has anyone gotten amazon's elastic load balancing command: elb-create-lb-listeners to work?
Is this the right site for ec2 questions: would serverfault be better? Amazon's forums seem slow...
I get:
PROMPT:~ acct$ elb-create-lb-listeners <MYLBNAME> --listener "protocol=http,lb-port=80,instance-port=80"
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
elb-create-lb-listeners: Malformed input-Unknown command: 'CreateLoadBalancerListeners'.
Use '--help' to see a list of valid commands.
...sup with that? Do I need to download something else? My ELB cli is 1.0.10.0, and AWS_ELB_HOME is set correctly.
thanks!
Colin

Generally, you're running the latest version and that command should work.
I'd really fix your $JAVA_HOME environment. That can screw things up. Also, did you make sure $AWS_ELB_HOME and $AWS_CREDENTIAL_FILE are set in your environment?

Ok, so this was long long back. But here's the solution:
Download Elastic Load Balancing API Tool from http://aws.amazon.com/developertools/2536 and unzip it.
Set the path as below:
export AWS_ELB_HOME=/root/james/ElasticLoadBalancing-1.0.15.1/
export PATH=$PATH:$AWS_ELB_HOME/bin
Set JAVA_HOME path as below:
export JAVA_HOME=/usr/java/jdk1.7.0_02/
Place your certification and private keys to some folder and point to it as below:
export EC2_CERT=/root/key/certfilename.pem
export EC2_PRIVATE_KEY=/root/key/pkfilename.pem
Now elb-create-lb would work :)

Related

kubectl not working on my windows 10 machine

When I try to run any kubectl command including kubectl version, I get a pop-up saying "This app can't run on your PC, To find a version for your PC, check with the software publisher" when this is closed, the terminal shows "access denied"
The weird thing is, when I run the "kubectl version" command in the directory where I have downloaded kubectl.exe, it works fine.
I have even added this path to my PATH variables.
thank you for the answer, #rally
apparently, in my machine, it was an issue of administrative rights during installation. My workplace's IT added the permission and it worked for me.
Adding this answer here so that if anyone else comes across this problem they can try this solution as well.
Not knowing what exactly you downloaded, i would suggest you to delete everying in the folder and follow the instructions for installing kubectl for Windows from here:
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
Note: downloading the .exe is not enough. You need a kubeconfig file "config", which contains the configuration to access your cluster.
kubectl looks for this file in a hidden folder under your user profile directory. c:\users<me>.kube.
Just to let you try, i would suggest you to activate Kubernetes in your Docker-Desktop installation. I guess you have this installed. If not install it from the Dockersite. https://www.docker.com/products/docker-desktop/
Activating Kubernetes inside Docker-desktop, will install also kubectl and save the config in the .kube folder.
After the installation finished, in a new terminal:
kubectl get node
You should see the 1 node in the kubernetes-docker-desktop cluster.
Now if you want to access another cluster, you need the kubeconfig-file for that cluster. If you have it, just rename the config in the .kube folder (to not loose it) and put the other config inside.
If the new config file is correct you should be able to access that cluster.
The config file can be structured to hold more than one cluster configuration and you can switch between them using a so called context.
Here you can get the information how to do that, according to your needs:
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
Hope this can help you, starting with KUbernetes.

how to setup environment for avalanche's test network

I'm new to avalanche and have never used go before. I have been trying to deploy an Avalanche local test network according to the documentation in my ubuntu20.04 but it's not very clear what should exactly be done about the GOPATH.
It is mentioned:
avalanche-network-runner will be installed into $GOPATH/bin, please make sure that $GOPATH/bin is in your $PATH, otherwise, you may not be able to run commands below.
but its not specified what to set the PATH or GOPATH to.
also the documentation mentions:
# replace execPath with the path to AvalancheGo on your machine
# e.g., ${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego
AVALANCHEGO_EXEC_PATH="${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego"
however the avalanchego project was never said to be cloned.
can someone please provide the specific steps needed to get the avalanche local test network up and working?
thanks in advance for your help
I solved it as follows:
From here, download the binary file and give your file path for AVALANCHEGO_EXEC_PATH.
export AVALANCHEGO_EXEC_PATH="PATH_TO_AVALANCHEGO_BINARY"
Steps:
Install the Avalanche CLI, Avalanche Network Node Runner
Download the Avalanche Bin File
Export its path with AVALANCHEGO_EXEC_PATH
export AVALANCHEGO_EXEC_PATH="PATH_TO_AVALANCHEGO_BINARY"
Then, follow instruction here.

How to check Mesos Master?

I'm new to Mesos. I would like to know how do I know whether Mesos master is set up correctly in the node?
I have follow the set up given by http://mesos.apache.org/gettingstarted/
I am unable to run the following command:
Comment: Start mesos master (Ensure work directory exists and has proper permissions).
$ ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
but it shown error given:
./bin/mesos-master.sh: line 24: /home/user/mesos-0.20.0/build/src/mesos-master: No such file or directory
What ways should I proceed?
First, a few questions to help us debug your build:
Did the mesos build (make) complete successfully, and did make check pass all the tests?
If /home/user/mesos-0.20.0/build/src/mesos-master does exist, do you have execute permissions on it?
Are you running ./bin/mesos-master.sh from within /home/user/mesos-0.20.0/build/, or did you move the directory elsewhere?
If this is your first attempt at Mesos and you just want to run it and try it out (rather than fix bugs and develop features for it). I would recommend using a pre-built or cloud-deployed version of Mesos, rather than trying to build it yourself. See:
http://mesosphere.com/downloads/
http://mesosphere.com/downloads/details/index.html#apache-mesos
I'd suggest to follow Mesos Getting Started documentation.
After your system requirements are satisfied, following the section:
System Requirements
Once you reach the following section:
Building Mesos
when you execute the make without disabling verbosity, ensure that all process completed successfully. If it stops (e.g. tipically for proxy related issues) try to fix it accordingly or otherwise post your stack somewhere and I would be happy to help (if I can).
Unfortunately, running make check could not reveal the problem sometimes.
Have you run the make check command ? It is said in the documentation that the binaries will only be available after running the make checkcommand.Ì faced the same issue and it was because i didn't run that command.

Golang and NSQ (bitly)

So kind of a noob here but I can't seem to find any examples or help anywhere. I have a working instance of NSQ, can register tasks, consumers, etc. Unfortunately I did not originally set the system up. What I am trying to do is figure out how to activate some of the built in command line tools that NSQ offers ( nsq_to_file, nsq_tail, etc. ). I found documentation on how to fire them but have no idea where to fire them from.
When I try nsq_tail --channel=MyTestChannel --topic=test --lookupd-http-address=127.0.0.1:4161 i get nsq_tail command not found. The only other thing I know is that NSQ is managed by docker in our circumstance. Any help / a shove in the right direction would be awesome. Thanks!
Did some digging and answered my own question. Hopefully this helps someone since the docs dont really exist:
Make sure NSQ is running by checking out the dashboard: localhost:4171
Install the NSQ library (different than nsq-go) go get github.com/bitly/nsq
Install godep, how bitly manages dependencies go get github.com/tools/godep
Go to bitly src directory cd $GOPATH/src/github.com/bitly
Use docker to compile and test the nsq command line tools sudo docker build nsq
You should see about 5 or 6 steps run followed by a schlew of tests and a success message.
Run nsq_tail you should see something along the lines of --topic is required
Clap your hands, you just installed the command line tools for NSQ.
Might also need to install docker if you don't have it, not referenced above but FYI.

Maven in Intellij IDEA cannot resolve symbol env.HOSTNAME

I searched all over for a resolution to this problem, but could not find anything specific to my setup. Finally, one of our sys admins figured it out.
I am running Intellij IDEA on Ubuntu 11.10. My Maven pom.xml file was unable to resolve a symbol, a system property environmental variable env.HOSTNAME.
Copy from user1141627 answers' edit:
It turns out that we had to manually set this variable from the terminal so Java would recognize it. The command was:
set env HOSTNAME yourhostname
After restarting Intellij, env.HOSTNAME resolved just fine. To get yourhostname, you can use the command:
hostname
or
echo $HOSTNAME
I realize this is not a question, it is an answer. Hopefully someone finds it useful if they come across a similar problem.
I know this is an old question, but my answer might help somebody.
Add export HOSTNAME=myhost to your ~/.profile file, and reboot your computer.

Resources