Skip to content

Heroku problems: Error: failed to connect to [localhost:27017] #120

Closed
@randwa1k

Description

@randwa1k

I've been following tyler's tutorial. Everything has been going well so far until heroku open, which I ran in my dist directory, containing:

lib  package.json  Procfile  public  server.js  views

Here is the error message:

$ heroku open

 Opening rocky-sands-9303... failed
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError)
Backtrace:   /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:63:in `browser_cmdline'
             /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:67:in `cmd_and_args'
             /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:78:in `open'
             /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy.rb:29:in `open'
             /usr/local/heroku/lib/heroku/helpers.rb:328:in `block in launchy'
             /usr/local/heroku/lib/heroku/helpers.rb:227:in `action'
             /usr/local/heroku/lib/heroku/helpers.rb:326:in `launchy'
             /usr/local/heroku/lib/heroku/command/apps.rb:338:in `open'
             /usr/local/heroku/lib/heroku/command.rb:218:in `run'
             /usr/local/heroku/lib/heroku/cli.rb:28:in `start'
             /usr/local/heroku/bin/heroku:25:in `<main>'

Command:     heroku open
Version:     heroku-toolbelt/3.4.1 (x86_64-linux) ruby/1.9.3

Here are my heroku logs. I have two suspicions, though they both shouldn't be the case as heroku is hosting, instead of my machine.

  1. It might be something to do with "failed to connect to [localhost:27017]", perhaps related to a localhost problem I've encountered before on my machine. If this is the case, how can I fix it?

  2. It might have to do with the different ports Express server listens to. My machine only allows port numbers on its whitelist, so many of these server ports are not on the list (27017 is). If this is the case, how can I fix the Express server port number?

    Express server listening on port 19273 in production mode
    ...
    Express server listening on port 57183 in production mode
    ...
    Express server listening on port 18306 in production mode
    ...
    Express server listening on port 37805 in production mode
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions