I have a new Oracle Autonomous Linux VM 7.9
I've installed httpd, made it available through firewall, started it, allowed port 80 and 443, and checked status to see that httpd & firewalld are running...
I go to my public IP in my browser, and it eventually reports: "took too long to respond"
No requests are reaching the server, as it says "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Is there any diagnostics I can do in the VM to see what's stuck?
from the error it looks like the firewall is not allowed at the OS level. Would you please elaborate which OCI service you mean by Oracle Autonomous Linux VM? For normal compute nodes you need to allow the port at OS level using IPTABLES command.
Related
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.
This is a specific question. I am running an Artemis MQ service on WSL2. I would like to access the service from an app running on the Windows side, but I got the following exception:
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.]
When I run both Artemis and the app on the same "side" (both on WSL or both on Windows, but not at the same time), they work correctly.
Before I installed artemis on WSL, the app running on Linux was able to access the MQ on Windows, so my guess is the problem connected to Artemis being installed on both platform. (However, I checked and no service is running automatically.) Because artemis is not "installed", but unzipped and a broker is created, uninstalling is not possible.
Any idea where the two install is interfering each other?
Note: The web console is also unavailable:
UPDATE 1
Some more information:
I tried to find out any port issue (changed the ports, for example), and to find any reference about port forwarding, but the only info I've found (on the official WSL FAQ), that the ports are shared and we can't talk about forwarding, because they are technically the same (that's why the two instances are conflicting when starting at the same time).
Also, the fact, that earlier (when there were only the Win version installed) I was able to access the Windows version from WSL, indicates some strange behavior other than a port forwarding issue. (And my collegues use this setup (Win -> WSL) at the moment without problem.)
I've even uninstalled (deleted, because Artemis is simply unzipped, not installed) the Windows version, but it didn't solve the problem.
Well, running some extra circles, I've found a solution for the problem, thanks to the suggestion of Justin Bertram.
Once a day, when connection (starting a bash) to WSL, it prints some statistics:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.19.104-microsoft-standard x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Thu Jul 16 08:58:33 CEST 2020
System load: 0.0 Processes: 8
Usage of /: 3.6% of 250.98GB Users logged in: 0
Memory usage: 0% IPv4 address for eth0: 172.20.246.243
Swap usage: 0%
Here I noticed a local IP address, which was different from the Windows IP address. When I changed my connection from localhost to this address, I was able to access the MQ.
This solved my initial problem. On the other hand, some questions still hold: What is this address? Why it is defined on this machine and not on my other? How could I get rid of this redirection of eth0?
UPDATE 1:
I've found some of the answers (although it brings up other questions). At the PC the connection worked by localhost, my Ubuntu uses the shares the IP of eth0 and Windows:
>ip addr
6: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
link/ether 10:7b:44:1b:1c:d8
inet 192.168.1.128/24 brd 192.168.1.255 scope global dynamic
valid_lft 86394sec preferred_lft 86394sec
(The address 192.168.1.128 is a static DHCP assigned address to the host Windows.)
On the other computer, where localhost doesn't work, the eth0 interface gets a different IP address.
The (new) question: why and how to make Ubuntu to share IP?
My machine is a regular laptop with Windows 7. I have a Virtualbox VM running Ubuntu Server 14.04.1 and I have apache2 installed. When I try to access the default webserver page (10.0.2.15) from my machine, it cannot find the page. I have disabled my machine's firewall so that isn't causing the issue. The network for my VM is NAT, but I also tried the bridged adapter setting to no avail. Any suggestions would help.
Can you ping the server? If so, try the netstat command in server terminal to determine if it listens to port 80. If you cannot ping it, check the network address, f.x with ifconfig
If you can ping apache from the server, you probably have a problem with the network.
Try to add an host only interface. Then, in your VM, sudo ifconfig. Use the eth1's ip.
I'm trying to get Apache working on a GCE instance.
Following GCE's Quickstart guide, I did the following:
Created instance "my-instance" in "my-project" (CentOS image)
Installed httpd, verified it's running
Added the following firewall rule:
gcutil addfirewall http2 --description="Incoming http allowed." --allowed="tcp:http"
and did the same for HTTPS and ICMP
Verified through gce gui that these rules were added to default network
I can ping my instance's IP address but I can't get an HTTP response. I've tried through the browser, from a curl command - no dice. And it works fine when on localhost so I know Apache is returning the index.html page.
When I use curl from a remote host, the error is:
curl: (7) Failed connect to (instance ip addr):80; Connection refused
Thoughts?
I did some experiments to replicate this. In short, I believe HTTP port 80 may be blocked by iptables firewall rules on the local Centos instance. This appears to be the default behavior.
I have a GCE firewall rule setup to allow port 80 traffic to all instances. I created a centos based image via the Cloud Console (which is indeed using the v1 API). Logged in via SSH and started a web server on port 80. I was not able to hit the web server from my laptop. However I was also not able to hit it from another instance in my project. This lead me to suspect a firewall local to the instance rather than Compute Engine's firewall.
I ran this command (which drops the default reject of all ports for testing - this is unsafe to do for machines which are directly exposed to the internet):
$ sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited
After running that, I was able to hit my webserver from both another instance and my laptop. Note that this change is lost after restarting the instance. I don't know the correct procedure for changing the default firewall rules on Centos.
Please try a similar experiment on your instances, especially try to hit the web server from another Compute Engine instance, since service level firewalls do not block traffic between instances on the same network.
I am attempting to install and run apache 2.4 on my windows 7 system
I went to the apache 2.4 bin directory and ran the following:
Note: I opened the cmd window as administrator.
C:\Apache24\bin>httpd.exe -k install
Its output was as follows:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
So it installed apache 2.4 as a service but it could not be started. It seems like the localhost port 80 is being used. Is this what "[::]:80" means?
I then stopped both the the apache 2.0 service which I had left running and the mysql service, hoping stopping one of them might free up localhost port 80.
I also run netstat -o to see if port 80 is being used. It was not.
But, I then found that a process was using the above socket it is a process that is listening on the above socket
TCP [::]:80 User-PC:0 LISTENING 4
I then ran tasklist and found out that System is using pid 4. 4 is under the pid column
System 4 Services 0 544 K
Finally, from the failed attempt to start the service
I got an error which was recorded in windows systems events.
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
The error from the attempt to start says that beacause of lack of access, make-sock could not bind to sockets which to me looked like localhost port 80. For example,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
Can anyone tell what I am doing wrong?
Sorry for the belabored question. To solve my problem I just told apache 2.4 to listen to a different port in httpd.conf. Since System was using pid 4 which was listening on port 80, I did not want to explore this any further.
I put the following into httpd.conf.
Listen 127.0.0.1:122
The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:
net stop was /y
or XP:
net stop iisadmin /y
read this
http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
I have the same problem too, after upgrading win7 to win10.
then I check services.msc and found "World Wide Web Publishing Service" was running automatically by default.
So then I disabled it, and running the Apache service again.
Port 80 maybe used by Microsoft HTTPAPI
Try to stop the following service:
Web Deployment Agent Service
SQL Server Reporting Service
SQL Server VSS Writer
I solved this issue finally, it was because of some systems like skype and system processes take that port 80, you can make check using netstat -ao for port 80
Kindly find the following steps
After installing your Apache HTTP go to the bin folder using cmd
Install it as a service using httpd.exe -k install even when you see the error never mind
Now make sure the service is installed (even if not started) according to your os
Restart the system, then you will find the Apache service will be the first one to take the 80 port,
Congratulations the issue is solved.
In my case, it was due to an IP address that Apache is listening to. Previously I have set it to 192.168.10.6 and recently Apache service is not running. I noticed that due to My laptop wifi changed recently and new IP is different. After fixing the wifi IP to laptop previous IP, Apache service is running again without any error.
Also if you don't want to change wifi IP then remove/comment that hardcode IP in httpd.conf file to resolve conflict.
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
So, that is why i do a two (or more) post.
I was having the same problem when starting the service (logs can not be opened).
I thought it was because i was trying to have htdocs inside a VeraCrypt encripted container, absurd since i hace such contained mounted and i use a juntion to not affect paths.
The i read the cause could be low ram: after some tests i get to the next conclusion.
Windows is not sending pages to virtual ram to free enough ram if it is a service, for applications it is doing it, i have more than 200GiB of pagefile ready to be used as virtual ram in a 4GiB 64 Bit windows 10.
My solution:
Run a free utility that free ram (512MiB in my test)
Inmediatly after start the service, it starts with no errors
Real Cause:
I was using a virtual machine that uses 1/2 physical free ram (1.5GiB)
Hope this help others.
I was also facing the same issue, then i tried restarting my system after every change and it worked for me:
Uninstall Apache2.4 in cmd prompt (run administrator) with the command:
httpd -k uninstall.
Restart the system.
open cmd prompt (run administrator) with the command:
httpd -k install.
Then httpd -k install.
Hope you find useful.
you can solve it
sudo nano /etc/apache2/ports.conf
and changed Listen to 8080
This may be because of shortage in physical RAM.
Check minimum system requirements in the docs and try to close unnecessary programs if possible.