New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0- sg collect info - Show message if sync gateway is not running #3526

Closed
sridevi-15 opened this Issue May 2, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@sridevi-15
Copy link

sridevi-15 commented May 2, 2018

Sync Gateway version

sg version -> 2.1.0-55

Operating system

Centos

Config file

    "interface":":4984",
    "adminInterface": "0.0.0.0:4985",
    "maxIncomingConnections": 0,
    "maxCouchbaseConnections": 16,
    "maxFileDescriptors": 90000,
    "slowServerCallWarningThreshold": 500,
    "compressResponses": false,
    "log": ["*"],
    "logging": {
        "redaction_level": "partial"
    },
    "databases":{
        "db":{


            "num_index_replicas": 0,
            "num_index_replicas_housekeeping": 0,
            "enable_shared_bucket_access": true,
            "server":"http://192.168.33.10:8091",
            "bucket":"data-bucket",
            "password": "password"
        }
    }
}

Log output

Provide a link to a GitHub Gist containing relevant Sync Gateway log output when
the error occured. Do NOT paste the log output in the issue, just paste the
link to the Gist.

Steps to reproduce

  1. Start sync_gateway
  2. Do some api calls to sync_gatway
  3. Verify sync_gateway logs
  4. Stop sync_gateway

Expected behavior

It should display a message that sync_gateway is running to let the user know

Actual behavior

It displays that it is unsuccessful and 'connection refused'. In addition to unsuccessful, it should display that sync_gateway is not running

logs :

https://gist.github.com/sridevi-15/b758724dcfd38101de491e14ad6ae8a9

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented May 3, 2018

I'm not aware of a requirement that SG be running in order to run sgcollect. sgcollect shouldn't be exiting with error if it's unable to reach the SG endpoints, but I'd expect it to attempt to retrieve from the default config/log locations.

@bbrks bbrks added the ready label May 3, 2018

@snej snej added in progress and removed ready labels May 3, 2018

@bbrks bbrks added the review label May 3, 2018

@bbrks bbrks closed this in #3528 May 3, 2018

bbrks added a commit that referenced this issue May 3, 2018

#3526 sgcollect_info continue even if sg is unreachable (#3528)
* Use positional args for string formatting (Python 2.6 compatability)

* Revert #3525 exit early

* Contine collection even when Sync Gateway is not running
@bbrks

This comment has been minimized.

Copy link
Member

bbrks commented May 3, 2018

@adamcfraser Turns out I'd made an incorrect assumption about that a while back! 😨 Properly fixed in #3528 !

@sridevi-15

This comment has been minimized.

Copy link

sridevi-15 commented May 3, 2018

So, what is the final fix, will sgcollect_info will redact though sync_gateaway is not reachable?

@sridevi-15

This comment has been minimized.

Copy link

sridevi-15 commented May 3, 2018

working fine with sg 2.1.0-71. it collects and redacts data without having sync_gateway running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment