Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple processes that open ports for localhost in Procfile
    text
    copied!<p>I'm trying to start multiple processes with my Procfile in Foreman that open a port on localhost. Here's my <code>Procfile</code>.</p> <pre><code>web: bundle exec puma mongo: mongod pubsub: bundle exec firehose server </code></pre> <p>Now, <code>web</code> and <code>pubsub</code> open ports <code>9292</code> and <code>7272</code>, respectively. However, when I run <code>foreman start</code>, Foreman starts the first process (<code>web</code>) and starts listening on port <code>9292</code>, but not <code>7272</code>. It's not until I quit the terminal process with <code>Ctrl + C</code> does the next process (<code>pubsub</code>) start.</p> <p>Here is my Terminal output. The line break is where I hit <code>Ctrl + C</code>.</p> <pre><code>tardis:clock[experimental]$ be foreman start 21:33:49 web.1 | started with pid 12870 21:33:49 mongo.1 | started with pid 12873 21:33:49 pubsub.1 | started with pid 12876 21:33:49 mongo.1 | /usr/lib/mongodb/mongod --help for help and startup options 21:33:49 mongo.1 | Thu Aug 2 21:33:49 Mongo DB : starting : pid = 12875 port = 27017 dbpath = /data/db/ master = 0 slave = 0 32-bit 21:33:49 mongo.1 | ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data 21:33:49 mongo.1 | ** see http://blog.mongodb.org/post/137788967/32-bit-limitations for more 21:33:50 mongo.1 | Thu Aug 2 21:33:50 db version v1.4.4, pdfile version 4.5 21:33:50 mongo.1 | Thu Aug 2 21:33:50 git version: nogitversion 21:33:50 mongo.1 | Thu Aug 2 21:33:50 sys info: Linux roseapple 2.6.24-28-server #1 SMP Wed Aug 18 21:17:51 UTC 2010 i686 BOOST_LIB_VERSION=1_42 21:33:50 mongo.1 | Thu Aug 2 21:33:50 waiting for connections on port 27017 21:33:50 mongo.1 | Thu Aug 2 21:33:50 web admin interface listening on port 28017 21:33:57 web.1 | Sass is in the process of being separated from Haml, 21:33:57 web.1 | and will no longer be bundled at all in Haml 3.2.0. 21:33:57 web.1 | Please install the 'sass' gem if you want to use Sass. 21:33:58 web.1 | DEBUG - MONGODB [DEBUG] Logging level is currently :debug which could negatively impact client-side performance. You should set your logging level no lower than :info in production. 21:33:58 mongo.1 | Thu Aug 2 21:33:58 connection accepted from 127.0.0.1:37172 #1 21:33:58 web.1 | DEBUG - 21:33:58 mongo.1 | Thu Aug 2 21:33:58 end connection 127.0.0.1:37172 21:34:01 web.1 | Puma 1.5.0 starting... 21:34:01 web.1 | * Min threads: 0, max threads: 16 21:34:01 web.1 | * Environment: development 21:34:01 web.1 | * Listening on tcp://0.0.0.0:9292 21:34:01 web.1 | Use Ctrl-C to stop ^C21:34:03 mongo.1 | Thu Aug 2 21:34:03 got kill or ctrl c signal 2 (Interrupt), will terminate after current cmd ends 21:34:03 mongo.1 | Thu Aug 2 21:34:03 now exiting 21:34:03 mongo.1 | Thu Aug 2 21:34:03 dbexit: 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: going to close listening sockets... SIGINT received 21:34:03 system | sending SIGTERM to all processes 21:34:03 mongo.1 | Thu Aug 2 21:34:03 going to close listening socket: 5 21:34:03 web.1 | - Gracefully stopping, waiting for requests to finishSIGTERM received 21:34:03 mongo.1 | Thu Aug 2 21:34:03 going to close listening socket: 6 21:34:03 web.1 | - Gracefully stopping, waiting for requests to finish 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: going to flush oplog... 21:34:03 web.1 | /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/server.rb:639:in `close': closed stream (IOError) 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: going to close sockets... 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/server.rb:639:in `stop' 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: waiting for fs preallocator... 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/cli.rb:447:in `block in run' 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: closing all files... 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/server.rb:642:in `call' 21:34:03 mongo.1 | Thu Aug 2 21:34:03 closeAllFiles() finished 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/server.rb:642:in `join' 21:34:03 mongo.1 | Thu Aug 2 21:34:03 shutdown: removing fs lock... 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/server.rb:642:in `stop' 21:34:03 mongo.1 | Thu Aug 2 21:34:03 dbexit: really exiting now 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/cli.rb:286:in `graceful_stop' 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/cli.rb:458:in `rescue in run' 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/lib/puma/cli.rb:455:in `run' 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/gems/puma-1.5.0/bin/puma:10:in `&lt;top (required)&gt;' 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/bin/puma:19:in `load' 21:34:03 web.1 | from /home/ethan/.rvm/gems/ruby-1.9.3-p0/bin/puma:19:in `&lt;main&gt;' 21:34:03 pubsub.1 | &gt;&gt; Thin web server (v1.4.1 codename Chromeo) 21:34:03 pubsub.1 | &gt;&gt; Maximum connections set to 1024 21:34:03 pubsub.1 | &gt;&gt; Listening on 0.0.0.0:7474, CTRL+C to stop 21:34:03 pubsub.1 | &gt;&gt; Stopping ... 21:34:03 pubsub.1 | &gt;&gt; Stopping ... 21:34:03 web.1 | terminated by SIGTERM 21:34:03 mongo.1 | terminated by SIGTERM 21:34:03 pubsub.1 | terminated by SIGTERM </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload