You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mahmood N <nt...@yahoo.com.INVALID> on 2016/06/21 18:29:04 UTC

[users@httpd] find IP and PORT in use by Apache

Hi,How can I find which IP:PORT Apache web server is monitoring? There are some network commands (netstat -pat), but they show the TCP port in use. The machine has multiple network interfaces and the Listen section in httpd.conf is commented. So, one of the is used by default and I don't know which one is set as default.
Any idea to find that? The linux is Cenos-6.1 running rocks.
  Regards,
Mahmood

Re: [users@httpd] find IP and PORT in use by Apache

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mahmood,

On 6/21/16 2:29 PM, Mahmood N wrote:
> How can I find which IP:PORT Apache web server is monitoring? There
> are some network commands (netstat -pat), but they show the TCP
> port in use. The machine has multiple network interfaces and the
> |Listen| section in |httpd.conf| is commented. So, one of the is
> used by default and I don't know which one is set as default.

netstat will show the interface in use as well as the port number.

> Any idea to find that? The linux is Cenos-6.1 running rocks.

The only directive that causes Apache to listen on a network interface
is "Listen".

Remember that "Include" can be used to include other configuration
files, so if you are searching only httpd.conf, you may need to look
in other files as well.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXaYlsAAoJEBzwKT+lPKRYHPMQAJlXoJsitHD46+DHSzl1sHrQ
HzLY/K3nkA8xPfZU9rwhvxUXsXDjsoLPSx+egGkJzu+DMJQVVRzJBtPNdxc46ERO
/YgJGAJzLgAZ0Z/HZQO/TBRcuQltH0xYidbsPezCJyH7le7Voih2N20E3jrqqXIZ
ZYlc6HhqhRZ3lV3GZBqlM3PNtf5gzadxCIpBiMQeSH/Rrhaq6y3J3a+O7RfqwIlO
rit5GWYDd5P3GIFgo7nrr3quKXl8qyVB/Zq1cfZzVOWLR2JKIp2QhqOK/Q5eWIvg
pqex2ztpMVJdCM8hVT3B6kcx4Zkfo2gvg/UjTW2QLsMJos6L83GO5w7/bWagYc6Y
Y3MJp2R3aqHS/kRieVVN+Bn6c5VF8cIBS1tQvEaZXM/elG2IALY01PxJrYatE5QO
+AegdtizKyqk22p2weCYL08MJXH6GR6XzSlWuQmwxvFCeDcK2GtFqUfy8MvE7Ak+
rn5ejV7pFJ+ywhaj3JmYogefckvS4Tr+4HqgIHhJsLkszMFWdWCeMKTWILhNBnVL
7FzcvBXsg/ryOS9LS8WAawnYSHQJK3a3G5+ADDRFJtsFJ4nRDYJlI8gi6YfVYh0y
IFXzn1WT/2UEl2yRJ87L7hTMFF8mftFBH5JGlWPR5MrJeEcMiMisoR8hBLJqUBv2
OLXp5MWIyoj38sSZQ7JG
=COPy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] find IP and PORT in use by Apache

Posted by Mahmood N <nt...@yahoo.com.INVALID>.
OK. I found what was the problem. The default httpd.conf only specifies the "Listen" option for port number 80. That means, all interfaces with :80.
While I was testing the web server, I commented the "Listen 80". So, uncommenting that line again, resolved the problem. 
Now, the compute node can retrieve install.img.
 Regards,
Mahmood 





    On Wednesday, June 22, 2016 7:40 PM, Richard <li...@listmail.innovate.net> wrote:
You appear to be showing your system "messages" log, rather than
anything specific to the apache server that isn't delivering the
requested resource.

I think I would start by looking at the apache error (and access)
logs for the apache server that you are hitting for:

  http://10.10.10.1/install/rocks-dist/x86_64/images/install.imgᅠ

See first if the issue is that the resource isn't there, an access or
permissions problem, etc., then move deeper if that doesn't give
enough information to resolve this.

Your "the compute node, says 'Unable to retrieve'" description of the
problem is rather non-specific.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


  

Re: [users@httpd] find IP and PORT in use by Apache

Posted by Richard <li...@listmail.innovate.net>.

> Date: Tuesday, June 21, 2016 22:20:20 +0000
> From: Mahmood N <nt...@yahoo.com.INVALID>
>
> The folder permission is root:root with 755.
> Regarding the symlink option in httpd.conf, I see<Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> 
> I looked at the logs, but didn't find any useful error! to follow.
> Do you have any idea?
> 
> Jun 21 11:47:34 cluster dhcpd: DHCPDISCOVER from 00:e0:81:c6:31:77
> via eth0 
> Jun 21 11:47:34 cluster dhcpd: DHCPOFFER on 10.10.10.251
> to 00:e0:81:c6:31:77 via eth0 
> ...

You appear to be showing your system "messages" log, rather than
anything specific to the apache server that isn't delivering the
requested resource.

I think I would start by looking at the apache error (and access)
logs for the apache server that you are hitting for:

   http://10.10.10.1/install/rocks-dist/x86_64/images/install.imgᅠ

See first if the issue is that the resource isn't there, an access or
permissions problem, etc., then move deeper if that doesn't give
enough information to resolve this.

Your "the compute node, says 'Unable to retrieve'" description of the
problem is rather non-specific.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] find IP and PORT in use by Apache

Posted by Mahmood N <nt...@yahoo.com.INVALID>.
The folder permission is root:root with 755.
Regarding the symlink option in httpd.conf, I see<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>




I looked at the logs, but didn't find any useful error! to follow. Do you have any idea?

Jun 21 11:47:34 cluster dhcpd: DHCPDISCOVER from 00:e0:81:c6:31:77 via eth0
Jun 21 11:47:34 cluster dhcpd: DHCPOFFER on 10.10.10.251 to 00:e0:81:c6:31:77 via eth0
Jun 21 11:47:34 cluster dhcpd: DHCPREQUEST for 10.10.10.251 (10.10.10.1) from 00:e0:81:c6:31:77 via eth0
Jun 21 11:47:34 cluster dhcpd: DHCPACK on 10.10.10.251 to 00:e0:81:c6:31:77 via eth0
Jun 21 11:47:35 cluster rockscommand[8655]: user apache called "report host attr localhost attr=Kickstart_PrivateNetwork"
Jun 21 11:47:35 cluster rockscommand[8658]: user apache called "report host attr localhost attr=Kickstart_PrivateNetmask"
Jun 21 11:47:35 cluster rockscommand[8661]: user apache called "set host attr compute-0-3 arch x86_64"
Jun 21 11:47:36 cluster rockscommand[8664]: user apache called "set host attr compute-0-3 os linux"
Jun 21 11:47:36 cluster rockscommand[8668]: user apache called "list host xml arch=x86_64 os=linux compute-0-3"
Jun 21 11:47:36 cluster rockscommand[8668]: user apache called "list node xml compute attrs={'Kickstart_PublicHostname': 'cluster.scu.ac.edu', 'dhcp_filename': 'pxelinux.0', 'Condor_PortHigh': '50000', 'Kickstart_PublicAddress': '172.16.48.70', 'Kickstart_PrivateKickstartBasedir': 'install', 'ksmac': '00:e0:81:c6:31:77', 'Kickstart_Keyboard': 'us', 'Kickstart_DistroDir': '/export/rocks', 'Kickstart_Langsupport': 'en_US', 'rank': 3L, 'sge': 'true', 'Info_ClusterURL': 'http://www.pardasa.com/', 'Kickstart_PublicBroadcast': '172.16.63.255', 'Condor_PasswordAuth': 'no', 'Kickstart_PrivateDNSServers': '10.10.10.1', 'Kickstart_PrivateNetmask': '255.255.255.0', 'tripwire_mail': 'root@cluster.scu.ac.edu', 'Kickstart_PrivateNTPHost': '10.10.10.1', 'Kickstart_PrivateNetwork': '10.10.10.0', 'Kickstart_PublicInterface': 'eth1', 'Kickstart_PrivateHostname': 'cluster', 'Condor_EnableMPI': 'no', 'Condor_HostAllow': '+', 'Info_ClusterName': 'Pardasa-Cluster', 'Condor_PortLow': '40000', 'Condor_Master': 'cluster.scu.ac.edu', 'Kickstart_PrivateAddress': '10.10.10.1', 'hostname': 'compute-0-3', 'Kickstart_PrivateKickstartHost': '10.10.10.1', 'Kickstart_PrivateDNSDomain': 'local', 'submit_host': 'false', 'HttpRoot': '/var/www/html', 'Kickstart_PrivateBroadcast': '10.10.10.255', 'Condor_Network': 'private', 'hostaddr': '10.10.10.251', 'Kickstart_Timezone': 'Asia/Tehran', 'Kickstart_PublicDNSServers': '192.168.168.4', 'RootDir': '/root', 'Kickstart_Multicast': '225.152.120.159', 'kickstartable': 'yes', 'Kickstart_PrivateSyslogHost': '10.10.10.1', 'Kickstart_PrivateInterface': 'eth0', 'managed': 'true', 'Kickstart_PublicNTPHost': 'pool.ntp.org', 'Info_GoogleOTPRoot': 'yes', 'Server_Partitioning': 'manual', 'rocks_version_major': '6', 'Info_CertificateState': 'Khoozestan', 'Kickstart_PublicGateway': '172.16.48.1', 'Condor_Client': 'true', 'HttpConfigDirExt': '/etc/httpd/conf.d', 'Info_CertificateOrganization': 'Shahid Chamran Univesity', 'Kickstart_PublicDNSDomain': 'scu.ac.edu', 'Kickstart_PublicKickstartHost': 'central.rocksclusters.org', 'm
Jun 21 11:47:36 cluster rockscommand[8668]: user apache called "report distro"
Jun 21 11:47:36 cluster rockscommand[8678]: user apache called "config host interface compute-0-3 iface=eth0,eth1,eth2 mac=00:e0:81:c6:26:3b,00:e0:81:c6:31:76,00:e0:81:c6:31:77 module=none,none,none flag=,,ks"
Jun 21 11:47:36 cluster rockscommand[8678]: user apache called "set host interface iface compute-0-3 iface=eth0 mac=00:e0:81:c6:26:3b"
Jun 21 11:47:36 cluster rockscommand[8678]: user apache called "set host interface iface compute-0-3 iface=eth1 mac=00:e0:81:c6:31:76"
Jun 21 11:47:36 cluster rockscommand[8678]: user apache called "set host interface iface compute-0-3 iface=eth2 mac=00:e0:81:c6:31:77"
Jun 21 11:47:36 cluster rockscommand[8682]: user apache called "report host network compute-0-3"
Jun 21 11:47:36 cluster rockscommand[8686]: user apache called "report host interface compute-0-3"
Jun 21 11:47:36 cluster rockscommand[8696]: user apache called "report host condor config compute-0-3"
Jun 21 11:47:36 cluster rockscommand[8696]: user apache called "report host condor interface compute-0-3 private"
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_shared_secret.Plugin instance at 0x1b042d8>
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_login_appliance.Plugin instance at 0x1b03170>
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_sample.Plugin instance at 0x1b03560>
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_mpi.Plugin instance at 0x1b03050>
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_exec_submit.Plugin instance at 0x1b03368>
Jun 21 11:47:36 cluster rockscommand[8696]: run <rocks.commands.report.host.condor.config.plugin_submit_ec2.Plugin instance at 0x1b03440>
Jun 21 11:47:36 cluster rockscommand[8701]: user apache called "report host route compute-0-3"
Jun 21 11:47:37 cluster rockscommand[8723]: user apache called "report host firewall compute-0-3"
Jun 21 11:47:37 cluster rockscommand[8727]: user apache called "report host bootflags compute-0-3"
Jun 21 11:47:37 cluster rockscommand[8736]: user apache called "report host config411 compute-0-3"
Jun 21 11:47:37 cluster rockscommand[8736]: run <rocks.commands.report.host.config411.plugin_group.Plugin instance at 0x10ccc20>
Jun 21 11:47:37 cluster rockscommand[8736]: run <rocks.commands.report.host.config411.plugin_os.Plugin instance at 0x10ccd40>
Jun 21 11:47:37 cluster rockscommand[8736]: run <rocks.commands.report.host.config411.plugin_master.Plugin instance at 0x10cc950>
Jun 21 11:47:37 cluster rockscommand[8736]: run <rocks.commands.report.host.config411.plugin_appliance.Plugin instance at 0x10ccb00>
Jun 21 11:47:37 cluster rockscommand[8740]: user apache called "report dbhost"
Jun 21 11:47:37 cluster rockscommand[8751]: user apache called "report host ganglia gmond compute-0-3"
Jun 21 11:47:37 cluster rockscommand[8759]: user apache called "report resolv private"
Jun 21 11:47:38 cluster rockscommand[8778]: user apache called "report host sge config compute-0-3"
Jun 21 11:47:38 cluster rockscommand[8782]: user apache called "list host attr compute-0-3.local"
Jun 21 11:47:38 cluster rockscommand[8788]: user apache called "list host attr compute-0-3.local"
Jun 21 11:47:38 cluster rockscommand[8794]: user apache called "list host attr compute-0-3.local"
 Regards,
Mahmood 


  

Re: [users@httpd] find IP and PORT in use by Apache

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mahmood,

On 6/21/16 5:43 PM, Christopher Schultz wrote:
> Mahmood,
> 
> On 6/21/16 2:54 PM, Mahmood N wrote:
>> You know, the problem is that compute nodes in Rocks
>> distribution use Apache web server to locate the install image.
>> Currently, the compute node, says Unable to retrieve 
>> http://10.10.10.1/install/rocks-dist/x86_64/images/install.img 
>> <http://10.10.10.1/install/rocks-dist/x86_64/images/install.img>
> 
>> The guys on Rocks mailing list suggested that
> 
> 
> 
>> the root of webserver tree is: /var/www/html the install 
>> subdirectory is soft-linked to /export/rocks/install if the 
>> webserver can't find the install.img, then your distro is likely
>>  corrupted. To fix that problem: # cd /export/rocks/install;
>> rocks create distro If you have somehow changed the configuration
>> of the webserver on your frontend, you need to figure out what
>> was changed.
> 
> 
> 
>> However, the soft link is present
> 
>> root@cluster:~# ls -l /var/www/html/ total 36 lrwxrwxrwx  1 root 
>> root   30 Apr 29  2014 blast -> /opt/bio/ncbi/network/wwwblast 
>> drwxr-xr-x  2 root root 4096 May  2 15:46 download drwxr-xr-x 17 
>> root root 4096 Apr 29  2014 ganglia drwxr-xr-x  4 root root 4096 
>> Apr 29  2014 gromacs drwxr-xr-x  2 root root 4096 Apr 29  2014 
>> images -rw-r--r--  1 root root    0 May  1 14:28 index.h
>> lrwxrwxrwx 1 root root   21 Apr 29  2014 install ->
>> /export/rocks/install drwxr-xr-x  2 root root 4096 Apr 29  2014
>> misc drwxr-xr-x  9 root root 4096 Apr 29  2014 phpsysinfo
>> -rw-r--r--  1 root root    0 Apr 29  2014 robots.txt drwxr-xr-x
>> 14 root root 4096 Apr 29  2014 roll-documentation drwxr-xr-x  3
>> root root 4096 Apr 29  2014 rss drwxr-xr-x 24 root root 4096 Jun
>> 1 03:09 tripwire
> 
>> root@cluster:~# ls -l /export/rocks/install total 20 drwxr-xr-x
>> 3 root root 4096 Apr 29  2014 contrib drwxr-xr-x  3 root root
>> 4096 Apr 29  2014 rocks-dist drwxr-xr-x 17 root root 4096 Apr 29
>> 2014 rolls drwxr-xr-x  2 root root 4096 Apr 29  2014 sbin
>> drwxr-xr-x  3 root root 4096 Apr 29  2014 site-profiles
> 
> 
> 
>> The front end (the head node) has not been rebooted for more
>> than 2 months, and I have some how configured the httpd for some
>> tests!
> 
>> Now I see that something went wrong.
> 
>> Do you have any idea?
> 
> $ ls -l /var/www/html/install/rocks-dist/x86_64/images/install.img
> 
> If there is a file there, check:
> 
> 1. Directory read-permissions for all directories in the above
> path (ensure that the httpd user/group can execute)
> 
> 2. Symlinks are allowed in /var/www/html (this will be an
> "Options" directive in httpd.conf)

Also, log files are good things to look at.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXabc1AAoJEBzwKT+lPKRYnpAP/R3/kGwyZVdG1uRANEHJ3oyH
ef4RlGAtqwxA6o/whFlF5SDoHSod+MoRQbJDL1uopm3bNUg0jpzzELNFV9/IK598
MmVScQg4xhvGT9Z/hf0PYr+1Ytbz7lu8xQp9rLxjZn5W8jHbcYuhA8oZTB7ws2vD
lzyZAi952G37bzBknz5FKNgf9ztzDGAkypB4kiiAzEXXwuUy36F2RZNX9Tm0cQ7Z
MV/m94Ezx2FDdHwowtJfvvSYvy/knxNT8cVyzZ9kmFOteUM7MlUBJBZCAqvxZCk1
hhV7V8qbIjC/A9J87Ir+Kg8yia+FuJ0KTxMa50OGn8kJL3J3c9sR/JcCeAKlMilv
LiyZjWf1cCbyRG1vTNC7xdtJ0Pl+wnZdp8u5XsKjA5luqI1JKLeufGmaOK+UaZOd
2OHZWaGIiYLg+1UTt7TUVj7BVsQ/W1lSEAeaxXp7gpmC3M9C1IE4jhD1lkARDV9H
Gfvf/aNxHDVYo9vPI0jrudan4TWjTdcVGmFnAQ2RQ+HW4xggwfu+jzLN2J9vXK18
4axBcoSJ1hr4k7ABXGKHiwToifW/Qd75i2kYRDh9AzXYzu1KkABSRkoQqYXfj7sg
baI4XUJRedldHSh1HynDc7LSBa2joPboDsXuKjVXkKBRWWgu7VWey901auy3NQGe
alqDWj+lqmnLhU5799oN
=MgJp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] find IP and PORT in use by Apache

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mahmood,

On 6/21/16 2:54 PM, Mahmood N wrote:
> You know, the problem is that compute nodes in Rocks distribution
> use Apache web server to locate the install image. Currently, the
> compute node, says Unable to retrieve 
> http://10.10.10.1/install/rocks-dist/x86_64/images/install.img 
> <http://10.10.10.1/install/rocks-dist/x86_64/images/install.img>
> 
> The guys on Rocks mailing list suggested that
> 
> 
> 
> the root of webserver tree is: /var/www/html the install
> subdirectory is soft-linked to /export/rocks/install if the
> webserver can't find the install.img, then your distro is likely 
> corrupted. To fix that problem: # cd /export/rocks/install; rocks
> create distro If you have somehow changed the configuration of the
> webserver on your frontend, you need to figure out what was
> changed.
> 
> 
> 
> However, the soft link is present
> 
> root@cluster:~# ls -l /var/www/html/ total 36 lrwxrwxrwx  1 root
> root   30 Apr 29  2014 blast -> /opt/bio/ncbi/network/wwwblast 
> drwxr-xr-x  2 root root 4096 May  2 15:46 download drwxr-xr-x 17
> root root 4096 Apr 29  2014 ganglia drwxr-xr-x  4 root root 4096
> Apr 29  2014 gromacs drwxr-xr-x  2 root root 4096 Apr 29  2014
> images -rw-r--r--  1 root root    0 May  1 14:28 index.h lrwxrwxrwx
> 1 root root   21 Apr 29  2014 install -> /export/rocks/install 
> drwxr-xr-x  2 root root 4096 Apr 29  2014 misc drwxr-xr-x  9 root
> root 4096 Apr 29  2014 phpsysinfo -rw-r--r--  1 root root    0 Apr
> 29  2014 robots.txt drwxr-xr-x 14 root root 4096 Apr 29  2014
> roll-documentation drwxr-xr-x  3 root root 4096 Apr 29  2014 rss 
> drwxr-xr-x 24 root root 4096 Jun  1 03:09 tripwire
> 
> root@cluster:~# ls -l /export/rocks/install total 20 drwxr-xr-x  3
> root root 4096 Apr 29  2014 contrib drwxr-xr-x  3 root root 4096
> Apr 29  2014 rocks-dist drwxr-xr-x 17 root root 4096 Apr 29  2014
> rolls drwxr-xr-x  2 root root 4096 Apr 29  2014 sbin drwxr-xr-x  3
> root root 4096 Apr 29  2014 site-profiles
> 
> 
> 
> The front end (the head node) has not been rebooted for more than
> 2 months, and I have some how configured the httpd for some tests!
> 
> Now I see that something went wrong.
> 
> Do you have any idea?

$ ls -l /var/www/html/install/rocks-dist/x86_64/images/install.img

If there is a file there, check:

1. Directory read-permissions for all directories in the above path
(ensure that the httpd user/group can execute)

2. Symlinks are allowed in /var/www/html (this will be an "Options"
directive in httpd.conf)

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXabUZAAoJEBzwKT+lPKRYIHoP/jeLeM+/Su0rOD8QzclHtJVl
nuAryFKjTyo3JtcemNhfJ3u8/htRxyJJYfuBSt0qbStKr/pTl8r2E7fS5SjAM9A6
+/sndQaFcWXpRkikr1y8Axax30V8iXp6oml0zp0Y5ztGQTHe9mZqRwY9bXcB5Uar
8H1GZGUC17EoqAD9qKeCuDYMOIddukweNFKQnyv0oOFHjzOyfpiF9rJ9aeHXVi03
/BwRirVypackvs1qah+fqcswg9qsjQ66mel+H1DjMTzBf8sk0ZISHNO64dd57BIq
RJS/oJiTf82aS7UCJAUkB7QG8pBc3b2wTbkXQNYLevM9KDt88c2bYUPqP9HNxsTb
eIRPIVqqOlgKuAJhI1zGDalnCEGXuXPm2HEhSaoBXw6gaBTzIbTi3YGLGTJDY6+x
DrM37Iz/iiqRohiH2YJG4yZ9/poqc7LcGqDhfaRoIDTFadjDJ0JsHDJ7rWyxSwko
DkXkIkqnmGM5Wl9Q7SmhsNEq7walwmH2BwiGA7K0XhlguRajep8MvtyAyJWsPR4l
NbuFlN92gdjtMHU+7WHqT53gFnSaq5Bs475W/WprXlBUOpNlLvW2fdF1ChuYzFLu
h3w2QSyoBWYxw3iFnEOTyJHGe1Dt2csWvb4KbhrgDKHf+bEg3plIJC8dHlBsKK+5
SBuf4PdMQqjQhV3Tql/1
=d0RY
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] find IP and PORT in use by Apache

Posted by Mahmood N <nt...@yahoo.com.INVALID>.
You know, the problem is that compute nodes in Rocks distribution use Apache web server to locate the install image. Currently, the compute node, says 
Unable to retrieve http://10.10.10.1/install/rocks-dist/x86_64/images/install.img The guys on Rocks mailing list suggested that


the root of webserver tree is: /var/www/html the install subdirectory is soft-linked to /export/rocks/installif the webserver can't find the install.img, then your distro is likely corrupted. To fix that problem: # cd /export/rocks/install; rocks create distroIf you have somehow changed the configuration of the webserver on your frontend, you need to figure out what was changed.



However, the soft link is present
root@cluster:~# ls -l /var/www/html/
total 36
lrwxrwxrwx  1 root root   30 Apr 29  2014 blast -> /opt/bio/ncbi/network/wwwblast
drwxr-xr-x  2 root root 4096 May  2 15:46 download
drwxr-xr-x 17 root root 4096 Apr 29  2014 ganglia
drwxr-xr-x  4 root root 4096 Apr 29  2014 gromacs
drwxr-xr-x  2 root root 4096 Apr 29  2014 images
-rw-r--r--  1 root root    0 May  1 14:28 index.h
lrwxrwxrwx  1 root root   21 Apr 29  2014 install -> /export/rocks/install
drwxr-xr-x  2 root root 4096 Apr 29  2014 misc
drwxr-xr-x  9 root root 4096 Apr 29  2014 phpsysinfo
-rw-r--r--  1 root root    0 Apr 29  2014 robots.txt
drwxr-xr-x 14 root root 4096 Apr 29  2014 roll-documentation
drwxr-xr-x  3 root root 4096 Apr 29  2014 rss
drwxr-xr-x 24 root root 4096 Jun  1 03:09 tripwire

root@cluster:~# ls -l /export/rocks/install
total 20
drwxr-xr-x  3 root root 4096 Apr 29  2014 contrib
drwxr-xr-x  3 root root 4096 Apr 29  2014 rocks-dist
drwxr-xr-x 17 root root 4096 Apr 29  2014 rolls
drwxr-xr-x  2 root root 4096 Apr 29  2014 sbin
drwxr-xr-x  3 root root 4096 Apr 29  2014 site-profiles



The front end (the head node) has not been rebooted for more than 2 months, and I have some how configured the httpd for some tests!
Now I see that something went wrong.
Do you have any idea?

Regards,
Mahmood



  

Re: [users@httpd] find IP and PORT in use by Apache

Posted by rw...@ropeguru.com.
So in your case, the "*" means all interfaces and all IP's.

So you would be able to hit https on eth0 with IP 10.10.10.1 and on eth1 
with IP 172.20.54.10.


On Tue, 21 Jun 2016 18:45:15 +0000 (UTC)
  Mahmood N <nt...@yahoo.com> wrote:
>> tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 28122/xinetd> Shows the port, 5666, the PID, 28122, and the program name, xinetdSo, you still don't know what is the IP address (network interface)? I mean eth0, eth1 and ...
> Mine is different!
> root@cluster:~# netstat -pat | grep httpd
> tcp ������ 0����� 0 *:ulistproc���������������� *:*������������������������ LISTEN����� 3940/httpd
> tcp ������ 0����� 0 *:https�������������������� *:*������������������������ LISTEN����� 3940/httpd
>
>>The only directive that causes Apache to listen on a network interface
>>is "Listen".
> As I said, that section is commented. So, there should be a default ethX and port.The port number can be found, but the ethX is not visible. At least for me...
> root@cluster:~# ifconfig
> eth0 ���� Link encap:Ethernet� HWaddr 00:E0:81:C6:D5:35
>  �������� inet addr:10.10.10.1� Bcast:10.10.10.255� Mask:255.255.255.0
> eth1 ���� Link encap:Ethernet� HWaddr 00:E0:81:C6:D5:34
>  �������� inet addr:172.20.54.10� Bcast:172.20.54.255� Mask:255.255.255.0
>
>
>  Regards,
> Mahmood
>

Re: [users@httpd] find IP and PORT in use by Apache

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mahmood,

On 6/21/16 2:45 PM, Mahmood N wrote:
>> tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 28122/xinetd Shows the
>> port, 5666, the PID, 28122, and the program name, xinetd
> So, you still don't know what is the IP address (network
> interface)? I mean eth0, eth1 and ...
> 
> Mine is different!
> 
> root@cluster:~# netstat -pat | grep httpd tcp        0      0
> *:ulistproc *:*                         LISTEN      3940/httpd tcp
> 0      0 *:https *:*                         LISTEN
> 3940/httpd

It helps if you don't grep-out the header line that tells you what the
fields mean:

$ sudo netstat -pat | grep '\(^Proto\|httpd\)'
Proto Recv-Q Send-Q Local Address               Foreign Address
      State       PID/Program name
tcp        0      0 *:http                      *:*
      LISTEN      1362/httpd
tcp        0      0 *:81                        *:*
      LISTEN      1362/httpd
tcp        0      0 *:https                     *:*
      LISTEN      1362/httpd

The fourth column tells you the local address, and the "*" means "all
interfaces".

If you use the "-n" switch, you'll get:

tcp        0      0 :::80                       :::*
      LISTEN      1362/httpd
tcp        0      0 :::81                       :::*
      LISTEN      1362/httpd
tcp        0      0 :::443                      :::*
      LISTEN      1362/httpd

So you can see the IP address is "::" (IPv6 "unspecified address")
which means the same thing.

>> The only directive that causes Apache to listen on a network
>> interface is "Listen".
> 
> As I said, that section is commented. So, there should be a default
> ethX and port.

The default interface is always "all interfaces". IF you want to
listen on a specific interface, then do:

Listen 172.20.54.10:80

https://httpd.apache.org/docs/current/mod/mpm_common.html#listen

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXaY5AAAoJEBzwKT+lPKRY3Z8QAJrvzXMBShddQxhIGcfRoWf0
kRHTCT1MF8tDK8xClJQzq/gDXO2Zcvdc6HGWU5Kdx+3si0RLlHi9bOpZL/jzJBuu
Bu3QtveAfEeoh+BIZuIrgLK5QLVRkE+jZGXK82xeDdFQSHAMVz078JysDJha1rCK
AnPf28NMJ4SJaKv1j1ai/8rzFNYO5/uYWQdfcl1job07Je0msdbcfPAw+aG4FV+z
Y1XFzhhFn0nAXZvLSMB+IQYiQHpsE7Mre7LKXlkpi/M4930pBauWjaFiPULgVTHu
dqJxLyTUsw3eCZ+56dcWz2bqh6sOUrk16rUezG0WCZW3piOgS98AG29s7aBuzm2X
n1FAteifWHaHULw28neX49cfpqQlYOvt97nFUaBqH1wcVpIprXA3sldzwe7BYz6S
SpyeRziG7slQD5y68t+Zo2/spJbu/jnIptywGAJyinvhcq/RvsuXo0vHHPwPzIAW
E65qqHNN1BFinlkRQWN1SbJ14xQO/EziPa/RN9qmlhz8tMweSQrpb2iHG/tIij2R
1V6umfjGYZQth5POcI8QaCnx+yMMP1gCh4HXp2wxVUDLgw1GN40PSqPGdezjaWfr
Zj3jif53qvN1Qj57SEETWF3x1Qfff68Un1GM+t8nsEicfnhBcUYePmN+DCHxCNsh
5LixcYjFtA3KfmimkJi7
=N1l5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] find IP and PORT in use by Apache

Posted by Mahmood N <nt...@yahoo.com.INVALID>.
> tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 28122/xinetd> Shows the port, 5666, the PID, 28122, and the program name, xinetdSo, you still don't know what is the IP address (network interface)? I mean eth0, eth1 and ...
Mine is different!
root@cluster:~# netstat -pat | grep httpd
tcp        0      0 *:ulistproc                 *:*                         LISTEN      3940/httpd
tcp        0      0 *:https                     *:*                         LISTEN      3940/httpd


>The only directive that causes Apache to listen on a network interface
>is "Listen".
As I said, that section is commented. So, there should be a default ethX and port.The port number can be found, but the ethX is not visible. At least for me...
root@cluster:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:81:C6:D5:35
          inet addr:10.10.10.1  Bcast:10.10.10.255  Mask:255.255.255.0
eth1      Link encap:Ethernet  HWaddr 00:E0:81:C6:D5:34
          inet addr:172.20.54.10  Bcast:172.20.54.255  Mask:255.255.255.0


 Regards,
Mahmood



  

Re: [users@httpd] find IP and PORT in use by Apache

Posted by rw...@ropeguru.com.
Not sure what you are actually looking for.
You stated, "There are some network commands (netstat -pat), but they show 
the TCP port in use." Last I checked, Apache only used TCP ports. So the 
netstat command that you referenced should show exactly what you need.

Here is an example from a Red Hat workstation:

tcp  0  0 0.0.0.0:5666  0.0.0.0:*  LISTEN  28122/xinetd

Shows the port, 5666, the PID, 28122, and the program name, xinetd

Robert

On Tue, 21 Jun 2016 18:29:04 +0000 (UTC)
  Mahmood N <nt...@yahoo.com.INVALID> wrote:
> Hi,How can I find which IP:PORT Apache web server is monitoring? There are some network commands (netstat -pat), but they show the TCP port in use. The machine has multiple network interfaces and the Listen section in httpd.conf is commented. So, one of the is used by default and I don't know which one is set as default.
> Any idea to find that? The linux is Cenos-6.1 running rocks.
>  Regards,
> Mahmood