Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-10505

better to check permission on output file before collecting info with cbcollect_info

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 3.0
    • tools
    • Security Level: Public
    • None
    • 3.0.0-433
    • Untriaged
    • Ubuntu 64-bit
    • No

    Description

      my user is not sudo/root

      I'm able to launch cbcollect_info but don't have direct access to folder that I set for output zip-file

      andrey@baranouski:/opt/couchbase/bin$ ./cbcollect_info localhost.zip
      uname (uname -a) - OK
      Directory structure membase - previous versions (ls -lR /opt/membase /var/membase /var/opt/membase /etc/opt/membase) - Exit code 2
      Process list snapshot (export TERM=''; top -Hb -n1 || top -H n1) - OK
      Process list (ps -AwwL -o user,pid,lwp,ppid,nlwp,pcpu,maj_flt,min_flt,pri,nice,vsize,rss,tty,stat,wchan:12,start,bsdtime,command) - OK
      Raw /proc/vmstat (cat /proc/vmstat) - OK
      Raw /proc/mounts (cat /proc/mounts) - OK
      Raw /proc/partitions (cat /proc/partitions) - OK
      Raw /proc/diskstats (cat /proc/diskstats) - OK
      Raw /proc/interrupts (cat /proc/interrupts) - OK
      Swap configuration (free -t) - OK
      Swap configuration (swapon -s) - OK
      Kernel modules (lsmod) - OK
      Distro version (cat /etc/redhat-release) - Exit code 1
      Distro version (lsb_release -a) - OK
      Installed software (rpm -qa) - OK
      Installed software (COLUMNS=300 dpkg -l) - OK
      Extended iostat (iostat -x -p ALL 1 10 || iostat -x 1 10) - Exit code 127
      Core dump settings (find /proc/sys/kernel -type f -name 'core' -print -exec cat '{}' ';') - OK
      sysctl settings (sysctl -a) - OK
      relevant lsof output (echo moxi memcached vbucketmigrator beam couch_compact godu sigar_port | xargs -n1 pgrep | xargs -n1 -r – lsof -n -p) - OK
      LVM info (lvdisplay) - Exit code 127
      LVM info (vgdisplay) - Exit code 127
      LVM info (pvdisplay) - Exit code 127
      Network configuration (ifconfig -a) - OK
      Taking sample 2 after 10.000000 seconds -
      OK
      Network configuration (echo link addr neigh rule route netns | xargs -n1 – sh -x -c 'ip $1 list' --) - OK
      Network status (netstat -anp || netstat -an) - OK
      Network routing table (netstat -rn) - OK
      Arp cache (arp -na) - OK
      Filesystem (df -ha) - OK
      System activity reporter (sar 1 10) - Exit code 127
      System paging activity (vmstat 1 10) - OK
      System uptime (uptime) - OK
      couchbase user definition (getent passwd couchbase) - OK
      couchbase user limits (su couchbase -c "ulimit -a") - skipped (needs root privs)
      membase user definition (getent passwd membase) - Exit code 2
      couchbase user limits (su couchbase -c "ulimit -a") - skipped (needs root privs)
      membase user limits (su membase -c "ulimit -a") - skipped (needs root privs)
      Interrupt status (intrstat 1 10) - Exit code 127
      Processor status (mpstat 1 10) - Exit code 127
      System log (cat /var/adm/messages) - Exit code 1
      Raw /proc/uptime (cat /proc/uptime) - OK
      All logs (tar cz /var/log/syslog* /var/log/dmesg /var/log/messages* /var/log/daemon* /var/log/debug* /var/log/kern.log* 2>/dev/null) - Exit code 2
      Relevant proc data ((pgrep moxi; pgrep beam.smp; pgrep memcached; pgrep couch_compact; pgrep sigar_port ; pgrep godu) | xargs -n1 – sh -c 'echo $1; cat /proc/$1/status; cat /proc/$1/limits; cat /proc/$1/smaps; cat /proc/$1/numa_maps; cat /proc/$1/sched; echo' --) - OK
      NUMA data (numactl --hardware) - Exit code 127
      NUMA data (numactl --show) - Exit code 127
      NUMA data (cat /sys/devices/system/node/node*/numastat) - OK
      Kernel log buffer (dmesg) - OK
      Transparent Huge Pages data (cat /sys/kernel/mm/transparent_hugepage/enabled) - OK
      Transparent Huge Pages data (cat /sys/kernel/mm/transparent_hugepage/defrag) - OK
      Transparent Huge Pages data (cat /sys/kernel/mm/redhat_transparent_hugepage/enabled) - Exit code 1
      Transparent Huge Pages data (cat /sys/kernel/mm/redhat_transparent_hugepage/defrag) - Exit code 1
      Network statistics (netstat -s) - Exit code 1
      Full raw netstat (cat /proc/net/netstat) - OK
      CPU throttling info (echo /sys/devices/system/cpu/cpu*/thermal_throttle/* | xargs -n1 – sh -c 'echo $1; cat $1' --) - OK
      Checking for server guts in /opt/couchbase/var/lib/couchbase/initargs...
      Failed to read initargs:

      {error,eacces}
      Checking for server guts in /opt/couchbase/var/lib/couchbase/initargs...
      Failed to read initargs:{error,eacces}

      Checking for server guts in /home/andrey/Library/Application Support/Couchbase/var/lib/couchbase/initargs...
      Failed to read initargs:

      {error,enoent}

      Traceback (most recent call last):
      File "./cbcollect_info", line 558, in <module>
      main()
      File "./cbcollect_info", line 543, in main
      runner.zip(zip_filename, zip_node)
      File "./cbcollect_info", line 143, in zip
      zf = ZipFile(filename, mode='w', compression=ZIP_DEFLATED)
      File "/usr/lib/python2.7/zipfile.py", line 701, in _init_
      self.fp = open(file, modeDict[mode])
      IOError: [Errno 13] Permission denied: 'localhost.zip'

      andrey@baranouski:/opt/couchbase/bin$ touch CHECK.LOG
      touch: cannot touch `CHECK.LOG': Permission denied

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            iryna iryna
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty