APE on server can't be reached. How can I find why?

45 views
Skip to first unread message

Nicolas

unread,
May 11, 2016, 2:27:46 PM5/11/16
to APE Project
While I was playing with HaProxy on my staging environment (which is the same as the production environment), something wrong happened.

My staging APE is launched and configured exactly the same way as the production APE, so exactly as it was before I started experiments with HaProxy.

However, I can't reach it all...

What can I do to find out why I get this error?

Connecting to staging.xxxxxxxx.com|83.170.xx.xxx|:80... failed: Connection refused.

Is there a tracing tool that will tell me where the request went and where it stopped?


PS: I have uninstalled HaProxy completely. I suspect that some configurations made by HaProxy when I was testing are still operating... But what? Where?

Pablo Tejada

unread,
May 11, 2016, 2:38:50 PM5/11/16
to APE Project

Assuming you had to update the Apache listening port to something other than 80. Did you revert that back to 80 after removing the proxy server?


--
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to
ape-project...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

---
You received this message because you are subscribed to the Google Groups "APE Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ape-project...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Sincerely,

Pablo Tejada

From Mobile

Nicolas

unread,
May 11, 2016, 3:27:19 PM5/11/16
to APE Project
Thanks Pablo,

No I did not change anything on the Apache config on the staging-prod machine.

I had to change 80 to 8080 on the dev machine, but that's not needed on the prod-staging environment because Apache, staging APE and prod APE each have a different IP.

Nicolas

unread,
May 11, 2016, 5:01:03 PM5/11/16
to APE Project
I have found something.

I ran:
sudo netstat -tnlp | grep :80

to find out who was listening to port 80

tcp        0      0 255.255.255.255:80      0.0.0.0:*               LISTEN      13571/aped_staging
tcp        0      0 83.170.71.xxx:80        0.0.0.0:*               LISTEN      12757/aped

As you can see, aped_staging is listening on port 80, but instead of listening on its IP, it listens 255.255.255.255. Does that mean the IP is not working??? It visibly could not connect to it... 

The production server is listening its IP fine.

Any clue? 


On Wednesday, May 11, 2016 at 8:38:50 PM UTC+2, Pablo wrote:

Louis Charette

unread,
May 11, 2016, 6:10:17 PM5/11/16
to ape-p...@googlegroups.com
I never used two IP on the same server, so I couldn't tell. How do you defined the ip to use for the staging ape?
Envoyé de mon iPhone

Nicolas

unread,
May 11, 2016, 6:15:51 PM5/11/16
to APE Project
It is set like this, exactly like for the production ape.

Server {

        port = 80
        daemon = yes
        ip_listen = 83.170.xx.xxx
        domain = auto
        rlimit_nofile = 10000
        pid_file = /ape/aped.pid
}

Nicolas

unread,
May 11, 2016, 6:18:12 PM5/11/16
to APE Project
It does not make a difference for that purpose that I have 2 IPs or one. The IP used for production just helps me compare with the setting for the staging environment. For you I don't think it matters other than knowing that it works on the production side with a different IP.

I suspect something is wrong with the port now. But...

John Kettlekey

unread,
May 11, 2016, 6:37:49 PM5/11/16
to ape-p...@googlegroups.com
Binding to a port is per IP address.

Most of the time you bind to a port on all available IP addresses at once and then you can't bind anything else to that port.

But you can bind to a port on a specific IP and allow something else to bind to the same port on a different IP.

Remember that local host (127.0.0.1) counts as a separate IP so even a machine with just one real/public IP can end up with two things bound to a port; one on the real/public IP and one on the localhost interface.

From the netstat output it looks like something has bound to port 80 of the real/public IP and the other process has bound to port 80 for every remaining address (255.255.255.255) which will probably just be localhost.

-JK

Nicolas

unread,
May 11, 2016, 6:57:03 PM5/11/16
to APE Project


On Thursday, May 12, 2016 at 12:37:49 AM UTC+2, John Kettlekey wrote:
Binding to a port is per IP address.

Most of the time you bind to a port on all available IP addresses at once and then you can't bind anything else to that port.

But you can bind to a port on a specific IP and allow something else to bind to the same port on a different IP.

Agreed.
 

Remember that local host (127.0.0.1) counts as a separate IP so even a machine with just one real/public IP can end up with two things bound to a port; one on the real/public IP and one on the localhost interface.

From the netstat output it looks like something has bound to port 80 of the real/public IP and the other process has bound to port 80 for every remaining address (255.255.255.255) which will probably just be localhost.

The thing that is bound to an IP in the netstat output is the production APE process (aped). This is correct.
The other process (aped_staging) should bind to the other IP but binds to 255.255.. instead. And I wonder why...


 
-JK

Pablo Tejada

unread,
May 12, 2016, 12:58:31 AM5/12/16
to APE Project

Check that the IP in your config file is still attached to your sever. Like John mentioned, the IP 255.255.255.255 is the broadcast IP.


--
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to
ape-project...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

---
You received this message because you are subscribed to the Google Groups "APE Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ape-project...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicolas

unread,
May 12, 2016, 3:58:17 AM5/12/16
to APE Project
I will try to do that. I have no clue how. But I am sure I will find a way. 

It definitely looks as if the requested IP is already bound. 

But thinking of it, I am not sure actually, because when a port is already used, APE displayed a message first thing saying it could not bind. Here it does not display this message. So we are in a special case... Or maybe the fact that it is an IP issue not a port one leads to no message when the problem is the same.

Speak to you later!

Thanks for helping guys!

Nicolas

unread,
May 13, 2016, 6:44:53 AM5/13/16
to APE Project
Mystery solved.

In my config file, I had listen instead of ip_listen...

I had to check the config file carefully many times to see the difference with the production config.

Conclusion: if you see your APE binding to 255.255.255.255 instead of the intended IP, you probably have ip_listen badly written or missing.

ezeej...@googlemail.com

unread,
Sep 17, 2017, 7:09:36 AM9/17/17
to APE Project
Hey Pablo,

I was wondering whether you would be interested in assisting in an Ape project that I'm working on?

I need help installing and modifying ape chat. I have a budget of $300.

The project is quite urgent so please respond if you are interested.

Hope to hear from you soon.

Eze 

Pablo Tejada

unread,
Sep 23, 2017, 10:13:04 PM9/23/17
to APE Project
Hey,

Unfortunately I don't have free time to work on another project. I do suggest to try find another solution since this project is no longer been maintained. 
Reply all
Reply to author
Forward
0 new messages