Skip to content

Instantly share code, notes, and snippets.

@kuelshammer
Created February 7, 2017 19:33
Show Gist options
  • Save kuelshammer/a0557dbba75b4d35939c25d607329424 to your computer and use it in GitHub Desktop.
Save kuelshammer/a0557dbba75b4d35939c25d607329424 to your computer and use it in GitHub Desktop.
SMC error message while creating admin
mk@Linux smc]$ sudo docker start smc
smc
[mk@Linux smc]$ sudo docker exec -it smc bash
root@b8b7013674c4:/# coffee
coffee> require 'c'; db()
db() -- sets global variable db to a database
gcloud() -- sets global variable g to gcloud instance
setting global variable g to a gcloud interface and vms to vm manager
vms() -- sets vms to gcloud VM manager (and g to gcloud interface)
compute_server() -- sets global variable s to compute server
project 'project_id' -- set p = project, s = compute server
activity() -- makes activity the activity monitor object
delete_account 'email@foo.bar' -- marks an account deleted
close_unused_projects('hostname') -- closes all projects on that host not used in the last 60 days
close_unused_free_projects() -- closes all projects on all free hosts not used in the last 60 days
active_students() -- stats about student course projects during the last 30 days
stripe [account_id] -- update stripe info about user
2017-02-07T19:28:34.152Z - debug: PostgreSQL.constructor: {"host":"/projects/postgres/data/socket","database":"smc","user":"smc","debug":true,"connect":true,"cache_expiry":3000,"cache_size":100,"concurrent_warn":500}
2017-02-07T19:28:34.156Z - debug: PostgreSQL.connect: "will try to connect"
2017-02-07T19:28:34.156Z - debug: PostgreSQL.connect: "until successful"
2017-02-07T19:28:34.157Z - debug: PostgreSQL.connect: "retry_until_success() -- try 1"
2017-02-07T19:28:34.157Z - debug: PostgreSQL._do_connect: undefined
2017-02-07T19:28:34.158Z - debug: PostgreSQL._do_connect: "first make sure db exists"
2017-02-07T19:28:34.159Z - debug: PostgreSQL._ensure_database_exists: "ensure database 'smc' exists"
2017-02-07T19:28:34.159Z - debug: PostgreSQL._ensure_database_exists: "psql --user smc --host /projects/postgres/data/socket --port 5432 --list --tuples-only"
2017-02-07T19:28:34.162Z - debug: PostgreSQL.connect: "already trying to connect"
Expression assignment to _ now disabled.
undefined
coffee> 2017-02-07T19:28:34.182Z - debug: PostgreSQL._ensure_database_exists: "database 'smc' already exists"
2017-02-07T19:28:34.183Z - debug: PostgreSQL._do_connect: "create client and start connecting..."
2017-02-07T19:28:34.188Z - debug: PostgreSQL._do_connect: "now connected; disabling nestloop query planning."
2017-02-07T19:28:34.191Z - debug: PostgreSQL._do_connect: "connected!"
2017-02-07T19:28:34.191Z - debug: PostgreSQL.connect: "retry_until_success() -- success"
coffee> db.make_user_admin('m.kuelshammer@rhein-gymnasium-sinzig.de', cb:done())
(obj1="m.kuelshammer@rhein-gymnasium-sinzig.de", obj2={"cb":"__!!!!!!this is a required property!!!!!!__"})
BUG -- Traceback -- misc.defaults -- TypeError: function takes inputs as an object (obj1="m.kuelshammer@rhein-gymnasium-sinzig.de", obj2={"cb":"__!!!!!!this is a required property!!!!!!__"})
Trace
at exports.defaults (/smc/src/smc-util/misc.coffee:171:15)
at PostgreSQL.exports.PostgreSQL.PostgreSQL.make_user_admin (/smc/src/smc-hub/postgres-server-queries.coffee:484:14)
at PostgreSQL.make_user_admin (/smc/src/smc-hub/postgres-server-queries.coffee:14:59)
at repl:1:8
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.exports.runInThisContext (vm.js:77:17)
at runInContext (/smc/src/node_modules/coffee-script/lib/coffee-script/repl.js:58:17)
at REPLServer.eval (/smc/src/node_modules/coffee-script/lib/coffee-script/repl.js:47:25)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at repl.js:545:10
at REPLServer.<anonymous> (/smc/src/node_modules/coffee-script/lib/coffee-script/repl.js:87:9)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:188:7)
at REPLServer.Interface._onLine (readline.js:239:10)
at REPLServer.Interface._line (readline.js:585:8)
at REPLServer.Interface._ttyWrite (readline.js:862:14)
at REPLServer.self._ttyWrite (repl.js:618:7)
at ReadStream.onkeypress (readline.js:126:10)
at emitTwo (events.js:111:20)
at ReadStream.emit (events.js:191:7)
at emitKeys (internal/readline.js:389:14)
at undefined.next (native)
at ReadStream.onData (readline.js:972:36)
at emitOne (events.js:96:13)
at ReadStream.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at ReadStream.Readable.push (_stream_readable.js:134:10)
at TTY.onread (net.js:548:20)
undefined
coffee>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment