Apache Bench - failed request - apache

I'm trying to test apache server from one VM on another.
Running command:
ab -n 1000 -c 50 -s 30 http://192.168.2.156:80/
and I get circa 900 failed requests
On server I have wordpress filled with content generated by "FakerPress" addon
When I'm tesing external servers (form hosting company) I have 0 failed requests.
Apache on my server has default configuration.
Server OS: CentOS7
Wordpress: 4.9.8

There was a problem with router between two computers and also VM's. When I connect computers directly with eachother and run apacheBench from native system everything works fine.

Related

Can't Connect to Apache Server on LAN

I have a very simple LAN setup and am trying to connect to an Apache server running on the LAN. The server IP is 192.168.1.178. I'm trying to connect from a box on same LAN with IP of 192.168.1.161. Attempting to connect from browser results in error saying site is unreachable. I can ping the server and SSH into the server. But, telnet and curl result in no route to host errors.
Both boxes are set up with static IPs. DNS for static connection is 192.168.1.1. Both boxes are running Manjaro and no firewalls are turned on. Apache access logs show no attempt to connect and there are no errors in the Apache error logs.
I also set up a test python server (sudo python -m http.server 80) to try that. Attempting to curl to that server results in 'connection refused' error as opposed to 'no route to host' error for the Apache server.
Traceroute results are:
traceroute 192.168.1.178
traceroute to 192.168.1.178 (192.168.1.178), 30 hops max, 60 byte packets
1 raptor (192.168.1.178) 0.434 ms !X 0.366 ms !X 0.400 ms !X
I discovered that a firewall daemon was running, which was causing the problem. Disabling the firewall solved the issue.

I cannot start Apache Web Server using XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5

I could install successfully XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5. The problem is that I cannot start Apache:
In the server events, I see this:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Stopping all servers...
Stopping MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql stopped
Restarting all servers...
Starting MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
2020-01-07 11:33:11,210 Jaimes-MacBook-Pro.local proftpd[24257]: warning: unable to determine IP address of 'Jaimes-MacBook-Pro.local'
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: error: no valid servers configured
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'
Do think think this is caused by an IP address conflict or something else?
UPDATE 1
Since I am not interested in ProFTPD, I am only trying to start Apache Web Server and this is what I see in the server events:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
That would make me think that Apache Web Server started successfully. Nonetheless, I still see its status as "Stopped".
UPDATE 2
See below the configurations that I have for Apache Web Server. I have not changed anything. I am using the default configurations.
Add to your hosts file:
127.0.0.1 Jaimes-MacBook-Pro.local
I installed Uniform Server Zero (a Portable WAMP Server) on Windows instead. Thank you.

Attunity Replicate sample installation

I am trying to install Attunity Replicate into a local virtual machine with CentOS 7 on it. I can see that it is running - using 'ps -ef | grep repctl', and I know that the 3552 port is open in the firewall, and the host is visible (using 'nc -zv 3552').
But I cannot connect my UI browser to Attunity server using 'https://:/AttunityReplicate' - the Safari answers that 'Safari can't open the page XXX becauseSafari cannot establish a secure connection to the server...', and Chrome answers with 'ERR_SSL_SERVER_CERT_BAD_FORMAT' error...
Any hints - what and where should I configure in the Attunity Server to resolve the security issue, please?
Kind regards,
Alex
On the Linux server where you installed Replicate Express, cd into /opt/Attunity/replicate/bin (this is the default location) and run the following command:
cd /opt/attunity/replicate/bin
source arep_login.sh
./repctl SETSERVERPASSWORD
./arep.ctl stop
./arep.ctl start
Ensure that your Linux server allows inbound TCP connections on port 3552
Open your browser and try to connect to the following URL: https://:3552/attunityreplicate replacing with the DNS name or IP address of the Linux Server where Replicate is installed.
When prompted, enter the Username: Admin and Password from Step 1.
You may have to allow the webpage on Chrome:
1- On your computer, open Chrome.
2- On the page where you see a warning, click Details.
3- Click Visit this unsafe site.
4- The page will load.
Reference: https://support.google.com/chrome/answer/99020?co=GENIE.Platform%3DDesktop&hl=en

Install Apache server on 4G Network

I have installed XAMPP to run Apache server on windows,So the Apache server run great on LAN (Local Area Network ).
But i need to run the server ,so the public can access it from WAN
(Wide Area Network) .
I have forward HTTP port 80 on 4G portable router ,but no device can access the Apache server from Public (WAN)
** I have tried DDNS solutions also with no success.
The issue is most likely the 4g network itself. It seems they don't allow servers to wait on their network.

Why is Apache unable to serve static content with high concurrency on Windows?

When testing Apache 2.4.16 on windows 7,8,2012 there is a severe limitation when serving static content. Apache can't serve more than 700 concurrent requests for static content with Keep Alive OFF.
When you attempt to do that one of two things will happen:
You will be able to server few thousand requests at first and then the remaining requests will take up to 10 seconds to complete.
OR
You will receive a connection refused error
Test method:
siege -b -c700 -t10s -v http://10.0.0.31/10k.txt (10KB file)
OR
ab -c 700 -n 40000 http://10.0.0.31/10k.txt
However, when testing with Apache bench on the localhost (bypassing the network) Apache works fine and can serve 1000 concurrent requests for 10K static file.
Apache has ThreadsPerChild 7000 (increasing it to 14000 didn't make any difference)
MaxConnectionsPerChild 0
Stack parameters:
MaxUserPort = 65534
TcpTimedWaitDelay = 30
Server has over 60,000 ephemeral ports available starting with port 5,000 to port 65534
My load testing server is Linux on a separate server and sends requests over the network to Apache Windows server over 10Gb/s network.
There are no errors in the Apache log and nothing in the system logs. The tasklist doesn't show anything unusual.
netstat shows few thousand (5,000) of open TCP connections and then Apache stops responding. However when testing with lower concurrency of 300 then the OS can open 60,000 of TCP connections and Apache works fine.
Potential Conclusions:
At first I thought this is OS stack tuning problem but serving php file with the same concurrency works fine.
ab -c 700 -n 10000 http://10.0.0.31/phpinfo.php
Then I tried Nginx for windows on the same machine and Nginx served this without a problem.
ab -c 700 -n 10000 http://10.0.0.31/10k.txt
Nginx was able to serve much higher concurrency up to 2000 requests per second (static content) and the OS opened about 40,000 TCP connections.
So this looks to me like a bug or a limitation in the way Apache communicates with the TCP/IP stack on windows.
When trying to duplicate this problem make sure Keep Alive is OFF and test it over the network (not on localhost).
Any answers or comments on this subject will be greatly appreciated.
Thanks to covener's suggestion here is the answer.
Keep Alive was intentionally disabled to simulate a large number of users connecting from different IP addresses and spawning new TCP connections.
Setting AcceptFilter http to "none" together with turning off MultiViews improved the performance on static content and allowed Apache on windows to serve with concurrency of 2000 and beyond untill all ephemeral ports get exhausted.