Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-427

sgcollect_info tool failed to collect log when SG_SSL is enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 25
    • 5

    Attachments

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

      Activity

        [root@localhost tools]# ./sgcollect_info /tmp/sgcollect_info.zip
        Using Sync Gateway URL: http://127.0.0.1:4985
        uname (uname -a) - OK
        time and TZ (date; date -u) - OK
        ntp time (ntpdate -q pool.ntp.org || nc time.nist.gov 13 || netcat time.nist.gov 13) - OK
        ntp peers (ntpq -p) - OK
        raw /etc/sysconfig/clock (cat /etc/sysconfig/clock) - Exit code 1
        raw /etc/timezone (cat /etc/timezone) - Exit code 1
        System Hardware (lshw -json || lshw) - Exit code 127
        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; echo '') - OK
        Taking sample 2 after 1.000000 seconds - OK
        Taking sample 3 after 1.000000 seconds - OK
        Taking sample 4 after 1.000000 seconds - OK
        Taking sample 5 after 1.000000 seconds - OK
        Taking sample 6 after 1.000000 seconds - OK
        Taking sample 7 after 1.000000 seconds - OK
        Taking sample 8 after 1.000000 seconds - OK
        Taking sample 9 after 1.000000 seconds - OK
        Taking sample 10 after 1.000000 seconds - 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) - OK
        Distro version (lsb_release -a) - Exit code 127
        Distro version (cat /etc/SuSE-release) - Exit code 1
        Distro version (cat /etc/issue) - OK
        Installed software (rpm -qa) - OK
        Installed software (COLUMNS=300 dpkg -l) - Exit code 127
        Extended iostat (iostat -x -p ALL 1 10 || iostat -x 1 10) - OK
        Core dump settings (find /proc/sys/kernel -type f -name '*core*' -print -exec cat '{}' ';') - OK
        sysctl settings (sysctl -a) - OK
        Relevant lsof output (echo sync_gateway | xargs -n1 pgrep | xargs -n1 -r -- lsof -n -p) - OK
        LVM info (lvdisplay) - OK
        LVM info (vgdisplay) - OK
        LVM info (pvdisplay) - OK
        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
        Raw /proc/net/dev (cat /proc/net/dev) - OK
        Network link statistics (ip -s link) - OK
        Network status (netstat -anp || netstat -an) - OK
        Network routing table (netstat -rn) - OK
        Network socket statistics (ss -an) - OK
        Extended socket statistics (ss -an --info --processes) - OK
        Arp cache (arp -na) - OK
        Iptables dump (iptables-save) - OK
        Raw /etc/hosts (cat /etc/hosts) - OK
        Raw /etc/resolv.conf (cat /etc/resolv.conf) - OK
        Raw /etc/nsswitch.conf (cat /etc/nsswitch.conf) - OK
        Filesystem (df -ha) - OK
        System activity reporter (sar 1 10) - OK
        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") - Exit code 1
        couchbase user limits (su couchbase -c "ulimit -a") - Exit code 1
        Interrupt status (intrstat 1 10) - Exit code 127
        Processor status (mpstat 1 10) - OK
        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 (echo sync_gateway | xargs -n1 pgrep | 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/task/*/sched; echo' --) - OK
        Processes' environment (echo sync_gateway | xargs -n1 pgrep | xargs -n1 -- sh -c 'echo $1; ( cat /proc/$1/environ | tr \\0 \\n ); 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 -H || 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) - OK
        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' --) - Exit code 123
        Traceback (most recent call last):
         File "<string>", line 816, in <module>
         File "<string>", line 759, in main
         File "<string>", line 584, in make_sg_tasks
         File "<string>", line 541, in get_paths_from_expvars
         File "json/__init__.py", line 290, in load
         File "json/__init__.py", line 338, in loads
         File "json/decoder.py", line 366, in decode
         File "json/decoder.py", line 384, in raw_decode
        ValueError: No JSON object could be decoded
        sgcollect_info returned -1

        hemant.rajput Hemant Rajput added a comment - [root @localhost tools]# ./sgcollect_info /tmp/sgcollect_info.zip Using Sync Gateway URL: http: //127.0.0.1:4985 uname (uname -a) - OK time and TZ (date; date -u) - OK ntp time (ntpdate -q pool.ntp.org || nc time.nist.gov 13 || netcat time.nist.gov 13 ) - OK ntp peers (ntpq -p) - OK raw /etc/sysconfig/clock (cat /etc/sysconfig/clock) - Exit code 1 raw /etc/timezone (cat /etc/timezone) - Exit code 1 System Hardware (lshw -json || lshw) - Exit code 127 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; echo '' ) - OK Taking sample 2 after 1.000000 seconds - OK Taking sample 3 after 1.000000 seconds - OK Taking sample 4 after 1.000000 seconds - OK Taking sample 5 after 1.000000 seconds - OK Taking sample 6 after 1.000000 seconds - OK Taking sample 7 after 1.000000 seconds - OK Taking sample 8 after 1.000000 seconds - OK Taking sample 9 after 1.000000 seconds - OK Taking sample 10 after 1.000000 seconds - 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) - OK Distro version (lsb_release -a) - Exit code 127 Distro version (cat /etc/SuSE-release) - Exit code 1 Distro version (cat /etc/issue) - OK Installed software (rpm -qa) - OK Installed software (COLUMNS= 300 dpkg -l) - Exit code 127 Extended iostat (iostat -x -p ALL 1 10 || iostat -x 1 10 ) - OK Core dump settings (find /proc/sys/kernel -type f -name '*core*' -print -exec cat '{}' ';' ) - OK sysctl settings (sysctl -a) - OK Relevant lsof output (echo sync_gateway | xargs -n1 pgrep | xargs -n1 -r -- lsof -n -p) - OK LVM info (lvdisplay) - OK LVM info (vgdisplay) - OK LVM info (pvdisplay) - OK 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 Raw /proc/net/dev (cat /proc/net/dev) - OK Network link statistics (ip -s link) - OK Network status (netstat -anp || netstat -an) - OK Network routing table (netstat -rn) - OK Network socket statistics (ss -an) - OK Extended socket statistics (ss -an --info --processes) - OK Arp cache (arp -na) - OK Iptables dump (iptables-save) - OK Raw /etc/hosts (cat /etc/hosts) - OK Raw /etc/resolv.conf (cat /etc/resolv.conf) - OK Raw /etc/nsswitch.conf (cat /etc/nsswitch.conf) - OK Filesystem (df -ha) - OK System activity reporter (sar 1 10 ) - OK 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" ) - Exit code 1 couchbase user limits (su couchbase -c "ulimit -a" ) - Exit code 1 Interrupt status (intrstat 1 10 ) - Exit code 127 Processor status (mpstat 1 10 ) - OK 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 (echo sync_gateway | xargs -n1 pgrep | 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/task/*/sched; echo' --) - OK Processes ' environment (echo sync_gateway | xargs -n1 pgrep | xargs -n1 -- sh -c ' echo $ 1 ; ( cat /proc/$ 1 /environ | tr \\ 0 \\n ); 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 -H || 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) - OK 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' --) - Exit code 123 Traceback (most recent call last): File "<string>" , line 816 , in <module> File "<string>" , line 759 , in main File "<string>" , line 584 , in make_sg_tasks File "<string>" , line 541 , in get_paths_from_expvars File "json/__init__.py" , line 290 , in load File "json/__init__.py" , line 338 , in loads File "json/decoder.py" , line 366 , in decode File "json/decoder.py" , line 384 , in raw_decode ValueError: No JSON object could be decoded sgcollect_info returned - 1
        adamf Adam Fraser added a comment - - edited

        Per the updates in slack channel, it looks like this has been addressed by targeting https when Sync Gateway is running w/ SSL enabled (by passing in the sync-gateway-url parameter).  

        Will review further to identify whether sg-collect can automatically attempt to connect to https by default when http is not available.  Need to check what Couchbase Server does in the same scenario.

        adamf Adam Fraser added a comment - - edited Per the updates in slack channel, it looks like this has been addressed by targeting https when Sync Gateway is running w/ SSL enabled (by passing in the sync-gateway-url parameter).   Will review further to identify whether sg-collect can automatically attempt to connect to https by default when http is not available.  Need to check what Couchbase Server does in the same scenario.

        Build sync_gateway-2.7.0-3 contains sync_gateway commit fb750be with commit message:
        CBG-427: SGCollect_info https try (#4178)

        build-team Couchbase Build Team added a comment - Build sync_gateway-2.7.0-3 contains sync_gateway commit fb750be with commit message: CBG-427 : SGCollect_info https try (#4178)

        People

          jacques.rascagneres Jacques Rascagneres
          hemant.rajput Hemant Rajput
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved:

            Gerrit Reviews

              There are no open Gerrit changes

              PagerDuty