title: The error encountered was: dial tcp [::1]:3000: getsockopt: connection refused
body: <p>I am working on getting webhook to land in rails application. My rails server runs and I have already connected to ngrok and external application. But that errors to point out my application doesn't run.</p>
  
  <p><code>localhost:3000</code> runs and I can get webhooks to ngrok. What's the matter?</p>
  
  <hr>
  
  <p>The connection to <a href="http://9xxxxxx5.ngrok.io" rel="nofollow noreferrer">http://9xxxxxx5.ngrok.io</a> was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3000.</p>
  
  <p>Make sure that a web service is running on localhost:3000 and that it is a valid address.</p>
  
  <p>The error encountered was: dial tcp [::1]:3000: getsockopt: connection refused</p>
  
  <hr>
  
  <p>After I see localhost:3000, rails application runs. Why that could not connect....</p>
  
  <p>Here is the result <code>ps aux | grep ruby</code>.</p>
  
  <pre><code>user               63542   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/assets
  user               63541   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/channels
  user               63540   0.0  0.0  4298800     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/test/mailers/previews
  user               63539   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.04 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/uploaders
  user               63538   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/services
  user               63537   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/models
  user               63536   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/mailers
  user               63535   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/jobs
  user               63534   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/helpers
  user               63533   0.0  0.0  4306992     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/app/controllers
  user               63532   0.0  0.0  4298800     40 s000  S+    7:00PM   0:00.05 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/db
  user               63531   0.0  0.0  4298800     40 s000  S+    7:00PM   0:00.06 /Users/xxxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rb-fsevent-0.10.3/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/xxxxxx/Workspace/app/config/locales
  user               64927   0.0  0.0  4258736    192 s002  R+    7:42PM   0:00.00 grep ruby
  </code></pre>
  
  <h1>Update</h1>
  
  <p>I have tried to kill last one. But I couldn't because process number is random every time like below:</p>
  
  <p><img src="https://i.gyazo.com/00cf866566f0b03479568f6d4b8a2337.png" alt=""></p>
  
  <p>And I could not connect ngrok still ....</p>