{"action":"created","issue":{"url":"https://api.github.com/repos/sharelatex/sharelatex/issues/348","labels_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/348/comments","events_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/348/events","html_url":"https://github.com/sharelatex/sharelatex/issues/348","id":106023426,"number":348,"title":"problem with redis client","user":{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-11T14:38:19Z","updated_at":"2015-09-21T07:49:36Z","closed_at":null,"body":"Hi \r\n\r\nwhen executing `node web/app.js` I get the following error:\r\n\r\n```\r\n{\"name\":\"web-sharelatex\",\"hostname\":\"myhost\",\"pid\":15953,\"level\":30,\"msg\":\"300 sockets enabled\",\"time\":\"2015-09-11T14:32:13.072Z\",\"v\":0}\r\nException: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED\r\n  at RedisClient.on_error (/var/www/sharelatex/web/node_modules/redis/index.js:185:24)\r\n  at Socket.<anonymous> (/var/www/sharelatex/web/node_modules/redis/index.js:95:14)\r\n  at Socket.EventEmitter.emit (events.js:95:17)\r\n  at net.js:441:14\r\n  at process._tickDomainCallback (node.js:459:13)\r\n\r\n```\r\n\r\nI followed the instructions you gave in issue #255 but that did not work for me.\r\n\r\nHere is my config file `settings.development.coffee`:\r\n\r\n```\r\nPath = require('path')\r\n\r\n# These credentials are used for authenticating api requests\r\n# between services that may need to go over public channels\r\nhttpAuthUser = \"sharelatex\"\r\nhttpAuthPass = \"ca131b8a43dfdcb4bd157c77b44493aa368945e55b6de80d25d5b1e90fb336a463ca4e65598cbc09bc7aa5a4c9a7150c3a8f1b06c1575a300cee572ab317cc02\" # Randomly generated for you\r\nhttpAuthUsers = {}\r\nhttpAuthUsers[httpAuthUser] = httpAuthPass\r\n\r\nDATA_DIR = Path.resolve(Path.join(__dirname, \"..\", \"data\"))\r\nTMP_DIR = Path.resolve(Path.join(__dirname, \"..\", \"tmp\"))\r\n\r\nmodule.exports =\r\n\t# Databases\r\n\t# ---------\r\n\r\n\t# ShareLaTeX's main persistant data store is MongoDB (http://www.mongodb.org/)\r\n\t# Documentation about the URL connection string format can be found at:\r\n\t#\r\n\t#    http://docs.mongodb.org/manual/reference/connection-string/\r\n\t# \r\n\t# The following works out of the box with Mongo's default settings:\r\n\tmongo:\r\n\t\turl : 'mongodb://127.0.0.1/sharelatex'\r\n\r\n\t# Redis is used in ShareLaTeX for high volume queries, like real-time\r\n\t# editing, and session management.\r\n\t#\r\n\t# The following config will work with Redis's default settings:\r\n\tredis:\r\n\t\tweb:\r\n\t\t\thost: \"redis\"\r\n\t\t\tport: \"6379\"\r\n\t\t\tpassword: \"\"\r\n\t\tfairy:\r\n\t\t\thost: \"redis\" # my custom host\r\n\t\t\tport: \"6379\"\r\n\t\t\tpassword: \"\" # nothing changed here\r\n\r\n\t# The compile server (the clsi) uses a SQL database to cache files and\r\n\t# meta-data. sqllite is the default, and the load is low enough that this will\r\n\t# be fine in production (we use sqllite at sharelatex.com).\r\n\t#\r\n\t# If you want to configure a different database, see the Sequelize documentation\r\n\t# for available options:\r\n\t#\r\n\t#    https://github.com/sequelize/sequelize/wiki/API-Reference-Sequelize#example-usage\r\n\t#\r\n\tmysql:\r\n\t\tclsi:\r\n\t\t\tdatabase: \"clsi\"\r\n\t\t\tusername: \"clsi\"\r\n\t\t\tpassword: \"\"\r\n\t\t\tdialect: \"sqlite\"\r\n\t\t\tstorage: Path.join(DATA_DIR, \"db.sqlite\")\r\n\r\n\t# File storage\r\n\t# ------------\r\n\r\n\t# ShareLaTeX can store binary files like images either locally or in Amazon\r\n\t# S3. The default is locally:\r\n\tfilestore:\r\n\t\tbackend: \"fs\"\t\r\n\t\tstores:\r\n\t\t\tuser_files: Path.join(DATA_DIR, \"user_files\")\r\n\t\t\t\r\n\t# To use Amazon S3 as a storage backend, comment out the above config, and\r\n\t# uncomment the following, filling in your key, secret, and bucket name:\r\n\t#\r\n\t#filestore:\r\n\t#\tbackend: \"s3\"\r\n\t#\tstores:\r\n\t#\t\tuser_files: \"BUCKET_NAME\"\r\n\t#\ts3:\r\n\t#\t\tkey: \"AWS_KEY\"\r\n\t#\t\tsecret: \"AWS_SECRET\"\r\n\t# \t\t\r\n\r\n\t# Local disk caching\r\n\t# ------------------\r\n\tpath:\r\n\t\t# If we ever need to write something to disk (e.g. incoming requests\r\n\t\t# that need processing but may be too big for memory), then write\r\n\t\t# them to disk here:\r\n\t\tdumpFolder:   Path.join(TMP_DIR, \"dumpFolder\")\r\n\t\t# Where to write uploads before they are processed\r\n\t\tuploadFolder: Path.join(TMP_DIR, \"uploads\")\r\n\t\t# Where to write the project to disk before running LaTeX on it\r\n\t\tcompilesDir:  Path.join(DATA_DIR, \"compiles\")\r\n\t\t# Where to cache downloaded URLs for the CLSI\r\n\t\tclsiCacheDir: Path.join(DATA_DIR, \"cache\")\r\n\r\n\t# Server Config\r\n\t# -------------\r\n\r\n\t# Where your instance of ShareLaTeX can be found publicly. This is used\r\n\t# when emails are sent out and in generated links:\r\n\tsiteUrl : 'http://localhost:3000'\r\n\t\r\n\t# The websocket layer of ShareLaTeX runs as separate service.\r\n\t# When running locally or in development, you can point the client to this\r\n\t# service directly on port 3026. If you are running behind a reverse proxy (Nginx, etc)\r\n\t# then websocketsUrl should be the same as siteUrl, with your reverse\r\n\t# proxy responible for sending websocket traffic to the websocket service\r\n\t# rather than connecting directly.\r\n\twebsocketsUrl: 'http://localhost:3026'\r\n\t\r\n\t# If provided, a sessionSecret is used to sign cookies so that they cannot be\r\n\t# spoofed. This is recommended.\r\n\tsecurity:\r\n\t\tsessionSecret: \"8c0162b8c626ac6ac8ce75bd536c9addc3d9685148c61d1f169601e67664a136272695fb828794cbd707ab3f32d8471a418407f28d9f4ddaa5f31f4744ca2f85\" # This was randomly generated for you\r\n\r\n\t# These credentials are used for authenticating api requests\r\n\t# between services that may need to go over public channels\r\n\thttpAuthUsers: httpAuthUsers\r\n\t\r\n\t# Should javascript assets be served minified or not. Note that you will\r\n\t# need to run `grunt compile:minify` within the web-sharelatex directory\r\n\t# to generate these.\r\n\tuseMinifiedJs: false\r\n\r\n\t# Should static assets be sent with a header to tell the browser to cache\r\n\t# them. This should be false in development where changes are being made,\r\n\t# but should be set to true in production.\r\n\tcacheStaticAssets: false\r\n\r\n\t# If you are running ShareLaTeX over https, set this to true to send the\r\n\t# cookie with a secure flag (recommended).\r\n\tsecureCookie: false\r\n\t\r\n\t# If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)\r\n\t# then set this to true to allow it to correctly detect the forwarded IP\r\n\t# address and http/https protocol information.\r\n\tbehindProxy: false\r\n\r\n\t# Sending Email\r\n\t# -------------\r\n\t#\r\n\t# You must configure a mail server to be able to send invite emails from\r\n\t# ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer\r\n\t# documentation for available options:\r\n\t#\r\n\t#     http://www.nodemailer.com/docs/transports\r\n\t#\r\n\t# email:\r\n\t#\tfromAddress: \"\"\r\n\t#\treplyTo: \"\"\r\n\t#\ttransport: \"SES\"\r\n\t#\tparameters:\r\n\t#\t\tAWSAccessKeyID: \"\"\r\n\t#\t\tAWSSecretKey: \"\"\r\n\r\n\t# Spell Check Languages\r\n\t# ---------------------\r\n\t#\r\n\t# You must have the corresponding aspell dictionary installed to \r\n\t# be able to use a language. Run `grunt check:aspell` to check which\r\n\t# dictionaries you have installed. These should be set for the `code` for\r\n\t# each language.\r\n\tlanguages: [\r\n\t\t{name: \"English\", code: \"en\"}\r\n\t]\r\n\t\r\n\t# Service locations\r\n\t# -----------------\r\n\r\n\t# ShareLaTeX is comprised of many small services, which each expose\r\n\t# an HTTP API running on a different port. Generally you\r\n\t# can leave these as they are unless you have some other services\r\n\t# running which conflict, or want to run the web process on port 80.\r\n\t#internal:\r\n\t#\tweb:\r\n\t#\t\tport: webPort = 3000\r\n\t#\t\thost: \"localhost\"\r\n\t#\tdocumentupdater:\r\n\t#\t\tport: docUpdaterPort = 3003\r\n\t#\t\thost: \"localhost\"\r\n\t#\tfilestore:\r\n\t#\t\tport: filestorePort = 3009\r\n\t#\t\thost: \"localhost\"\r\n\t#\tchat:\r\n\t#\t\tport: chatPort = 3010\r\n\t#\t\thost: \"localhost\"\r\n\t#\ttags:\r\n\t#\t\tport: tagsPort = 3012\r\n\t#\t\thost: \"localhost\"\r\n\t#\tclsi:\r\n\t#\t\tport: clsiPort = 3013\r\n\t#\t\thost: \"localhost\"\r\n\t#\ttrackchanges:\r\n\t#\t\tport: trackchangesPort = 3015\r\n\t#\t\thost: \"localhost\"\r\n\t#\tdocstore:\r\n\t#\t\tport: docstorePort = 3016\r\n\t#\t\thost: \"localhost\"\r\n\t#\tspelling:\r\n\t# \t\tport: spellingPort = 3005\r\n\t#\t\thost: \"localhost\"\r\n\t#\trealTime:\r\n\t#\t\tport: realTimeport = 3026\r\n\t#\t\thost: \"localhost\"\r\n\r\n\t# If you change the above config, or run some services on remote servers,\r\n\t# you need to tell the other services where to find them:\r\n\tapis:\r\n\t\tweb:\r\n\t\t\turl: \"http://localhost:3000\"\r\n\t\t\tuser: httpAuthUser\r\n\t\t\tpass: httpAuthPass\r\n\t#\tdocumentupdater:\r\n\t#\t\turl : \"http://localhost:#{docUpdaterPort}\"\r\n\t#\tclsi:\r\n\t#\t\turl: \"http://localhost:#{clsiPort}\"\r\n\t#\tfilestore:\r\n\t#\t\turl: \"http://localhost:#{filestorePort}\"\r\n\t#\ttrackchanges:\r\n\t#\t\turl: \"http://localhost:#{trackchangesPort}\"\r\n\t#\tdocstore:\r\n\t#\t\turl: \"http://localhost:#{docstorePort}\"\r\n\t#\ttags:\r\n\t#\t\turl: \"http://localhost:#{tagsPort}\"\r\n\t#\tspelling:\r\n\t#\t\turl: \"http://localhost:#{spellingPort}\"\r\n\t#\tchat:\r\n\t#\t\turl: \"http://localhost:#{chatPort}\"\r\n\t\r\n\r\n# With lots of incoming and outgoing HTTP connections to different services,\r\n# sometimes long running, it is a good idea to increase the default number\r\n# of sockets that Node will hold open.\r\nhttp = require('http')\r\nhttp.globalAgent.maxSockets = 300\r\nhttps = require('https')\r\nhttps.globalAgent.maxSockets = 300\r\n```  \r\n\r\nWhen I run `grunt run:all` I get:\r\n\r\n```\r\nRunning \"execute:clsi\" (execute) task\r\n-> executing /var/www/sharelatex/clsi/app.js\r\nconnect.multipart() will be removed in connect 3.0\r\nvisit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives\r\nconnect.limit() will be removed in connect 3.0\r\nDevelopment Enviroment\r\n\r\nevents.js:72\r\n        throw er; // Unhandled 'error' event\r\n              ^\r\nError: listen EADDRINUSE\r\n    at errnoException (net.js:901:11)\r\n    at Server._listen2 (net.js:1039:14)\r\n    at listen (net.js:1061:10)\r\n    at net.js:1143:9\r\n    at asyncCallback (dns.js:68:16)\r\n    at Object.onanswer [as oncomplete] (dns.js:121:9)\r\nWarning: -> error 8 /var/www/sharelatex/filestore/app.js (917ms) Use --force to continue.\r\n\r\nAborted due to warnings.\r\n    Warning:  Use --force to continue.\r\n        \r\n        Aborted due to warnings.\r\n\r\n```\r\n\r\nWould be great if you could give me some advice!"},"comment":{"url":"https://api.github.com/repos/sharelatex/sharelatex/issues/comments/141900595","html_url":"https://github.com/sharelatex/sharelatex/issues/348#issuecomment-141900595","issue_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/348","id":141900595,"user":{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T07:49:35Z","updated_at":"2015-09-21T07:49:35Z","body":"in my config file, the websocketsURl is defined:\r\n\r\n```\r\n# The websocket layer of ShareLaTeX runs as separate service.\r\n        # When running locally or in development, you can point the client to this\r\n        # service directly on port 3026. If you are running behind a reverse proxy (Nginx, etc)\r\n        # then websocketsUrl should be the same as siteUrl, with your reverse\r\n        # proxy responible for sending websocket traffic to the websocket service\r\n        # rather than connecting directly.\r\n        websocketsUrl: 'http://localhost:3026'\r\n\r\n```\r\n\r\nBut under http://localhost:3026 there is not service available. How do I set this service up?"}}