1

I have just started messing around with Mongrel2, all the tutorials went great until I started pointing a Mongrel2 Handlers send_spec and recv_spec to an address other than localhost, for example a second machine on the network.

I started getting these errors:

errno: Resource temporarily unavailable) Failed to bind send socket trying again for: tcp://xxx.xxx.xxx.xxx:49901

My question is when there are two nodes A and B, where A is the Mongrel2 server and B is a "worker" for one of A's handlers, what addresses would go into the send_spec and recv_spec of A's .conf file?

I'm sorry if this is a naive question, it just has me so confused.

crenegade
  • 11
  • 2

1 Answers1

0

The PUSH (send_spec) and SUB (recv_spec) ports on NodeA (Mongrel2 Server) are the binding sockets so you should use tcp://*:<port>. By using the * for the address you can received connections from any interface.

Your handler code is where the specific address is needed. I use docker containers to run my Python handlers so I am always needing to use the specific IP address for the container running the Mongrel2 Server tcp://172.16.1.?:<port>.

If all these are true:

  • The Docker containers are allowed to talk to each other
  • You are using the correct IP and PORTs
  • The PUSH and SUB specs are receiving from all interfaces

Your handler should be able to connect.

brisebom
  • 103
  • 10