Skip to content

cop failing to start - client.db is not a function #6

@stevewillson

Description

@stevewillson

I'm attempting to use cop on Ubuntu 18.04 and when I attempt to start cop after installing it I get the following error:

Below is text copied from journalctl -f -u cop

mongod is 'active'

Any advice is appreciated.

Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Scheduled restart job, restart counter is at 4. Dec 08 20:36:35 ubuntu systemd[1]: Stopped COP. Dec 08 20:36:35 ubuntu systemd[1]: Started COP. Dec 08 20:36:35 ubuntu node[2431]: {"level":30,"time":1575866195675,"pid":2431,"hostname":"ubuntu","msg":"Server listening on port 3000!","v":1} Dec 08 20:36:35 ubuntu node[2431]: /opt/cop/node_modules/sharedb-mongo/index.js:178 Dec 08 20:36:35 ubuntu node[2431]: self.mongo = client.db(); Dec 08 20:36:35 ubuntu node[2431]: ^ Dec 08 20:36:35 ubuntu node[2431]: TypeError: client.db is not a function Dec 08 20:36:35 ubuntu node[2431]: at finish (/opt/cop/node_modules/sharedb-mongo/index.js:178:27) Dec 08 20:36:35 ubuntu node[2431]: at mongo (/opt/cop/app.js:120:26) Dec 08 20:36:35 ubuntu node[2431]: at ShareDbMongo._connect (/opt/cop/node_modules/sharedb-mongo/index.js:184:5) Dec 08 20:36:35 ubuntu node[2431]: at new ShareDbMongo (/opt/cop/node_modules/sharedb-mongo/index.js:65:10) Dec 08 20:36:35 ubuntu node[2431]: at mongodb.connect (/opt/cop/app.js:119:17) Dec 08 20:36:35 ubuntu node[2431]: at result (/opt/cop/node_modules/mongodb/lib/operations/execute_operation.js:75:17) Dec 08 20:36:35 ubuntu node[2431]: at executeCallback (/opt/cop/node_modules/mongodb/lib/operations/execute_operation.js:68:9) Dec 08 20:36:35 ubuntu node[2431]: at err (/opt/cop/node_modules/mongodb/lib/operations/connect.js:193:7) Dec 08 20:36:35 ubuntu node[2431]: at connectCallback (/opt/cop/node_modules/mongodb/lib/operations/connect.js:343:5) Dec 08 20:36:35 ubuntu node[2431]: at topology.connect.err (/opt/cop/node_modules/mongodb/lib/operations/connect.js:475:7) Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Main process exited, code=exited, status=1/FAILURE Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Failed with result 'exit-code'. Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Service hold-off time over, scheduling restart. Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Scheduled restart job, restart counter is at 5. Dec 08 20:36:35 ubuntu systemd[1]: Stopped COP. Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Start request repeated too quickly. Dec 08 20:36:35 ubuntu systemd[1]: cop.service: Failed with result 'exit-code'. Dec 08 20:36:35 ubuntu systemd[1]: Failed to start COP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions