Koozali.org: home of the SME Server

Error when you add a single IP at Remote Management/Access

Offline dalex

  • 17
  • +0/-0
Error when you add a single IP at Remote Management/Access
« on: September 23, 2004, 10:44:18 PM »
This "bug" appeared at 6.01 (worked ok in 6.0 final):

When you add a single ip (x.x.x.x, mask: 255.255.255.255) for remote management, the script adds /255.255.255.255 -somewhere near line 1065 in my case- to the /etc/httpd/conf/httpd.conf (should be the ip alone like all similar lines before...). Then the httpd cannot start (goodbye web...). I edit the file, remove the "/..." and restart the httpd, and back in business.

I tried to locate the wrong script but i don't know that much! Please help.
...

guest22

Error when you add a single IP at Remote Management/Access
« Reply #1 on: September 24, 2004, 08:59:50 AM »
Hi,

Please take a look at:
/etc/e-smith/templates/etc/httpd/httpd/conf/httpd.conf/01LocalAccessString

Try to remove the leading '/' from the template and expand httpd.conf. Remove and add the local access IP again and report your findings ;-)

RequestedDeletion

Offline dalex

  • 17
  • +0/-0
Error when you add a single IP at Remote Management/Access
« Reply #2 on: September 24, 2004, 06:46:55 PM »
Still the same:

Starting httpd: Syntax error on line 1065 of /etc/httpd/conf/httpd.conf:
syntax error in mask portion of network/netmask
                                                           [ FAILED ]

I am not sure if i followed you ok... I changed s#/255\.255\..... to s#255\.255\.... in line 13.
...

guest22

Error when you add a single IP at Remote Management/Access
« Reply #3 on: September 24, 2004, 11:11:15 PM »
Hi,

please post the EXACT line in httpd.conf that is giving you troubles.

guest

Offline mdo

  • *
  • 355
  • +0/-0
Error when you add a single IP at Remote Management/Access
« Reply #4 on: September 25, 2004, 11:43:47 AM »
I remember dark that this (?) was a problem at some stage with an (old) sarg contribution package in 2002. I would check whether you might be using an old contrib?

Regards,
Michael
...

Offline dalex

  • 17
  • +0/-0
Error when you add a single IP at Remote Management/Access
« Reply #5 on: September 25, 2004, 09:19:16 PM »
The whole section (after i manually corrected it and started httpd):

# Server resources access configuration

<Directory /home/e-smith/files/server-resources>
    Options +Indexes
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.5.0/255.255.255.0 212.54.223.21
</Directory>

the wrong line after entering a single ip as remote manag. becomes:

192.168.5.0/255.255.255.0 212.54.223.21/255.255.255.255

Of course httpd refuses to start!.

In many lines like this above, the syntax is correct!

thanks
...

Offline dalex

  • 17
  • +0/-0
Error when you add a single IP at Remote Management/Access
« Reply #6 on: September 30, 2004, 03:12:59 PM »
Trying to narrow down the problem, found the wrong template:

.../httpd.conf/85ServerResourcesAccess

External ip should NOT be included at all in this paragraph's output. After all we don't manage directly from internet but through redirection to a 2nd instance of httpd at port 980 (localhosted in "ProxyPass" paragraphs which are corectly syntaxed).

Now i must compare the template with an older version (6.0) cause i am not so advanced in programming...
...

msoulier

Re: Error when you add a single IP at Remote Management/Acce
« Reply #7 on: October 08, 2004, 07:37:05 PM »
Quote from: "dalex"
This "bug" appeared at 6.01 (worked ok in 6.0 final):

When you add a single ip (x.x.x.x, mask: 255.255.255.255) for remote management, the script adds /255.255.255.255 -somewhere near line 1065 in my case- to the /etc/httpd/conf/httpd.conf (should be the ip alone like all similar lines before...). Then the httpd cannot start (goodbye web...). I edit the file, remove the "/..." and restart the httpd, and back in business.


This was fixed ages ago by us. Sounds like this iso picked up the wrong rpm.

* Wed Jul  9 2003 Michael Soulier <msoulier@e-smith.com>
- [0.2.0-04]
- Fixed breakage in admin web server when a local network with a 32-bit subnet
  mask is used. [msoulier 9259]

This is the diff.

Index: root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/01localAccessString
===================================================================
RCS file: /home/e-smith/files/ibays/cvsroot/files/cvsroot-SMEServer/e-smith-apache/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/01localAccessString,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -r1.1.1.1 -r1.2
13a14
>     $localAccess =~ s#/255\.255\.255\.255##g;

What version of e-smith-apache do you have?

Mike

Offline dalex

  • 17
  • +0/-0
Error when you add a single IP at Remote Management/Access
« Reply #8 on: October 09, 2004, 10:33:23 AM »
Thank you Michael, this is not my problem, i checked and the line in "01localAccessString" is correct (like yours).

After a little research i found that the original "85ServerResourcesAccess" (in a virgin 6.01 installation) was also correct. The problem started as i installed a contrib, which changed the file to the following:

----- file as i found it, date: ?? APR 2004 -----
# Server resources access configuration

<Directory /home/e-smith/files/server-resources>
    Options +Indexes
    order deny,allow
    deny from all
{
    $OUT .= "    allow from $localAccess\n";
    # Add httpd-admin's ValidFrom list.
#    my @validfrom = split /,/, ${'httpd-admin'}{ValidFrom};
#    $OUT .= " @validfrom";
}
</Directory>
----- end of file -----

As you can see i commented out all the "extra" lines and now it works fine again!

I will search one by one the contribs i have installed and will post here which was the "faulty" one.

Thank you again.
...