Wednesday, March 23, 2016

Graphite Installation on CentOS

Extend LVM in Centos 7

NFS on CentOS 7

http://www.server-world.info/en/note?os=CentOS_7&p=nfs&f=2

218  yum install nfs-utils
  219  vi /etc/idmapd.conf
  220  systemctl start rpcbind
  221  systemctl enable rpcbind
  222  showmount -e
  223  mount -t nfs 10.201.0.22:/vol/netapp_harvest_data /data_harvest
  224  vi /etc/fstab
  225  yum install autofs
  226  vi /etc/auto.master
  227  vi /etc/auto.mount
  228  systemctl start autofs
  229  systemctl enable autofs
  230  cd /data_harvest/
  231  ls
  232  ll
  233  cat /proc/mounts
  234  :q!
  235  cat /proc/mounts | grep data_harvest
  236  history

Tuesday, March 22, 2016

Statsfeeder and Grafana

statsfeeder : ERROR com.vmware.ee.statsfeeder.Main - Unexpected error in statsfeeder

Problem:

[root@statsfeeder]# ./StatsFeeder.sh -h abcd -u domain\user -p abcd1234 -c config/graphitesampleConfig.xml
StatsFeeder [4.1 (Build jenkins-Statsfeeder-697)]
Copyright (c) 2011-2013 VMware, Inc
All rights reserved
2    [main] ERROR com.vmware.ee.statsfeeder.Main  - Unexpected error in statsfeeder
com.vmware.ee.common.VimConnectionException: A general system error occurred: Authorize Exception
        at com.vmware.ee.statsfeeder.ExecutionContext.initAll(ExecutionContext.java:137)
        at com.vmware.ee.statsfeeder.ExecutionContext.init(ExecutionContext.java:144)
        at com.vmware.ee.statsfeeder.Main.main(Main.java:112)
Caused by: com.vmware.ee.common.VimConnectionException: A general system error occurred: Authorize Exception
        at com.vmware.ee.statsfeeder.ExecutionContext.initAll(ExecutionContext.java:123)
        at com.vmware.ee.statsfeeder.ExecutionContext.initAll(ExecutionContext.java:135)
        ... 2 more
Caused by: javax.xml.ws.soap.SOAPFaultException: A general system error occurred: Authorize Exception
        at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:125)
        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
        at com.sun.proxy.$Proxy28.login(Unknown Source)
        at com.vmware.ee.common.VimConnection.connect(VimConnection.java:232)
        at com.vmware.ee.common.VimConnection.initAll(VimConnection.java:177)
        at com.vmware.ee.common.VimConnection.<init>(VimConnection.java:50)
        at com.vmware.ee.statsfeeder.ExecutionContext.initAll(ExecutionContext.java:120)
        ... 3 more
StatsFeeder exited rc = 2, check log for details

Resolution:

Ensure "\" in user name is escaped as in "domain\\user" instead of "domain\user"

 

CentOS Yum downgrade Java from 1.8 to 1.7

[root@statsfeeder]# java -version
openjdk version "1.8.0_71"
OpenJDK Runtime Environment (build 1.8.0_71-b15)
OpenJDK 64-Bit Server VM (build 25.71-b15, mixed mode)

[root@statsfeeder]#  sudo update-alternatives --config java
There is 2 program that provides 'java'.
  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/bin/java
   2           /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el7_2.x86_64/jre/bin/java
Enter to keep the current selection[+], or type selection number: 2


[root@statsfeeder]# java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (rhel-2.6.4.0.el7_2-x86_64 u95-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
[root@lap001p statsfeeder]#