Yubico Forum

Apache2 start FAILED! Invalid <If Version ....
Page 1 of 1

Author:  rcota [ Tue Sep 02, 2014 1:07 am ]
Post subject:  Apache2 start FAILED! Invalid <If Version ....

I received this error:
rad_recv: Access-Reject packet from host port 1812, id=68, length=181
Reply-Message = "Can't connect to localhost:80 (Connection refused)\n\nLWP::Protocol::http::Socket: connect: Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51.\n"

which led me to look into my apache2 and its failing at start up, my log states:

Syntax error on line 14 of /etc/apache2/conf.d/yubiauth.conf: Invalid command '<If Version ' perhaps misspelled or definded by a model not included in the server config

Action 'Configtest' fail

When i try to start the service:

*Starting web server apache2
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (operation not permitted)

if anyone has run into this please feel free to share your experience, i made no changes to yubix's files, everything has been managed through the web interface. its almost as if the localhost on my yubix vm isnt working correctly...

im running my Yubix VM in windows 2008 server on Virtualbox.

thanks, i hope this makes it to the right person.

Author:  dain [ Tue Sep 02, 2014 7:11 pm ]
Post subject:  Re: Apache2 start FAILED! Invalid <If Version ....

There shouldn't be a space between If and Version. In other words, it should be "IfVersion" and not "If Version" which your error message seems to indicate. Can you double check the file to see if there is a space there and if so remove it? I've checked our files, and the configuration file we provide does not have a space there, so I'm not sure where it would have come from.

Author:  jerichod505 [ Sat Sep 27, 2014 12:48 am ]
Post subject:  FIXED - Re: Apache2 start FAILED! Invalid <If Version ....

i encountered this same problem today, when i upgraded to python-yubiauth 0.3.9-1.

CAVEAT - this is on the YubixVM that i built (see the YubixVM howto). so it is Linux / ubuntu 12.04. I cannot answer about windows, but perhaps a similar issue is occurring?

here is what i figured out and did to fix the problem.
the file /etc/yubico/auth/apache.conf has new directives in it.
stanzas were added such as:
<IfVersion >= 2.3>
Require local
(and dain is right - there is no space between If and Version)
the problem was that my version of apache did not have the mod_version module enabled. it was not enabled at compile time, and not linked in at run time.
therefore apache was unable to process the IfVersion directive.

on Linux fixing this consisted of running a2enmod and at the prompt entering version to enable the version module. restart apache and all was working again.
here is the exact dialog (input in bold)

root@yubixvmc:/etc/apache2# /usr/sbin/apache2 -l
Compiled in modules:
root@yubixvmc:/etc/apache2# a2enmod
Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dump_io env expires ext_filter file_cache filter headers ident imagemap include info ldap log_forensic mem_cache mime mime_magic negotiation php5 proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif speling ssl status substitute suexec unique_id userdir usertrack version vhost_alias wsgi
Which module(s) do you want to enable (wildcards ok)?
Enabling module version.
To activate the new configuration, you need to run:
service apache2 restart
root@yubixvmc:/etc/apache2# service apache2 start
* Starting web server apache2
[ OK ]

Hope this helps.

rcota: please post here how to fix the windows version if indeed this is the same issue?



Author:  dain [ Sat Sep 27, 2014 7:13 pm ]
Post subject:  Re: Apache2 start FAILED! Invalid <If Version ....

Thanks for pointing out that mod_version needs to be enabled, I hadn't realized that this functionality was provided by a module which might not be enabled by default. I've created an issue to track this here: https://github.com/Yubico/yubiauth-dpkg/issues/1

EDIT: There's a new version out now which doesn't require mod_version to be enabled.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group