Can't get SG to work on EC2

13 views
Skip to first unread message

Todd Freese

unread,
Jan 27, 2015, 1:35:12 PM1/27/15
to mobile-c...@googlegroups.com
For some reason I can not get SG to launch on my EC2 instance. It is on one of the nodes of my couchbase cluster.

Here is the error I get:

13:31:27.190250 Starting admin server on 54.153.0.112:4985

13:31:27.196218 Starting server on 54.153.0.112:4984 ...

13:31:27.196368 FATAL: Failed to start HTTP server on 54.153.0.112:4985: listen tcp 54.153.0.112:4985: bind: cannot assign requested address -- rest.(*ServerConfig).serve() at config.go:392

[ec2-user@ip-172-31-14-232 sync_gateway


This is a RedHat EC2 instance.


Here is my config.json:


{

        "interface":"54.153.0.112:4984",

        "adminInterface":"54.153.0.112:4985",

        "databases": {

                "shotbotdb": {

                        "server": "http://54.153.0.112:8091",

                       "bucket": "sync_gateway",

                        "log": ["HTTP", "REST+", "CRUD", "Access"],

                        "users": {

                                "GUEST": {"disabled": true},

                              "xxxx": {"password": "xxx", "all_channels": ["xxxx"] }

                        },

                        "sync":`

                        function(doc, oldDoc) {

                                if (doc._deleted) {

                                        if (oldDoc) {

                                                requireUser(oldDoc.owner);

                                        }

                                        return;

                                }

                        if (oldDoc) {

                                requireUser(oldDoc.owner);

                        }

                        requireUser(doc.owner);

                        channel(doc.owner);

                        access(doc.owner, doc.owner);

                        }`

                }

        }

}


ajres

unread,
Jan 27, 2015, 1:40:32 PM1/27/15
to mobile-c...@googlegroups.com

You will get that error if the server does not have a NIC configured with that IP address.


I'm not sure about EC2 but the 'ifconfig' command should show the configured interfaces.

Todd Freese

unread,
Jan 27, 2015, 1:50:19 PM1/27/15
to mobile-c...@googlegroups.com
Ahh yes!

Need to bind to NIC IP rather than the public mapped IP.

Thanks!

T
Reply all
Reply to author
Forward
0 new messages