All,

We're new to Heroku, so forgive me if we're trying to do something
Completely Wrong or thinking about the problem The Wrong Way.

We have a piece of code that we'd like to run on a worker dyno on
Heroku.  Let's just say... it's an open-source piece of code I didn't
write, so if I can avoid opening it up and changing it, I'd like to --
instead, I'd like to work with it as it runs out-of-the-box.  Anyhow:

This process listens for information on a TCP port of my choosing.  We
want another process inside of our dyno to be able to communicate with
this process.

On our dev machines, this works great connecting to "localhost:12345"
or "127.0.0.1:12345".

However, it doesn't seem that Heroku allows me to do this.

We are doing this (to test, obviously for deployment we would put this
on our Procfile):

$ heroku run bash
~ $ ./run_listener_process -port 12345 &
(process starts and binds to port 12345)
~ $./run_other_process_that_sends_data -port 12345
Error: connection refused

To test the port itself (and not the code), I've issued the netcat
command:

~ $ nc localhost 12345 -w 1 </dev/null
localhost [127.0.0.1] 12345 (?) : Connection timed out

I understand that the system was probably not designed for me to run 2
processes on the same dyno, talking to each other, but is there a way
to do this?  Or is there a better way to do what I want to do?  (I
don't want the former, the "listener", to be publicly exposed.)

Should I be running 2 different dynos that are talking to each other?

Cheers

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to