Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508434 - app-admin/webapp-config - Could not read settings from webapp-config!
Summary: app-admin/webapp-config - Could not read settings from webapp-config!
Status: RESOLVED DUPLICATE of bug 528752
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 17:08 UTC by qinghao
Modified: 2014-11-18 22:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.log,4.98 KB, text/plain)
2014-04-22 17:08 UTC, qinghao
Details
emerge phpmyadmin (emerge_phpmyadmin.log,2.78 KB, text/plain)
2014-04-24 12:05 UTC, qinghao
Details
/etc/vhosts/webapp-config (webapp-config,7.93 KB, text/plain)
2014-04-24 12:07 UTC, qinghao
Details
webapp-config --version (web-config_version.log,893 bytes, text/x-log)
2014-04-25 16:10 UTC, qinghao
Details
eix webapp-config (eix_webapp-config.log,456 bytes, text/x-log)
2014-04-25 16:14 UTC, qinghao
Details
/etc/apache2/vhosts.d/00_default_vhost.conf (00_default_vhost.conf,1.86 KB, text/plain)
2014-04-25 16:22 UTC, qinghao
Details
eix tomcat (eix_tomcat.log,1.02 KB, text/x-log)
2014-04-25 16:24 UTC, qinghao
Details
webapp-config --li (webapp-config_li.log,1.37 KB, text/x-log)
2014-04-25 17:20 UTC, qinghao
Details
sudo python-updater when set as 2.7 (python-updater_2.7.log,6.00 KB, text/x-log)
2014-04-26 18:12 UTC, qinghao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qinghao 2014-04-22 17:08:51 UTC
Created attachment 375494 [details]
emerge --info

when installing phpmyadmin i got the following error:
 * phpMyAdmin-4.1.8-all-languages.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...    [ ok ]
[31;01m* [39;49;00m[31;01mFatal error: [39;49;00mThe config file /etc/vhosts/webapp-config appears to be for an older version of webapp-config.
[31;01m* [39;49;00m[31;01mFatal error: [39;49;00mMaybe you need to etc-update?
[31;01m* [39;49;00m[31;01mFatal error: [39;49;00m/etc/vhosts/webapp-config needs updating!
[31;01m* [39;49;00m[31;01mFatal error(s) - aborting[39;49;00m
 * ERROR: dev-db/phpmyadmin-4.1.8::gentoo failed (setup phase):

full error log can be found here: http://bpaste.net/show/nP5dtuGFX6ijbp5DVM7X/. 
and my /etc/vhosts/webapp-config content here: http://bpaste.net/show/wWCQoZTnLXKwYdgKfmIJ/.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-23 23:54:06 UTC
1) Please attach the entire build log to this bug report.
2) Please attach /etc/vhosts/webapp-config to this bug report.
Comment 2 qinghao 2014-04-24 12:05:17 UTC
Created attachment 375602 [details]
emerge phpmyadmin
Comment 3 qinghao 2014-04-24 12:07:09 UTC
Created attachment 375606 [details]
/etc/vhosts/webapp-config
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-25 12:39:41 UTC
(In reply to qinghao from comment #3)
> Created attachment 375606 [details]
> /etc/vhosts/webapp-config

That appears to be the default. File permissions?
Comment 5 Anthony Basile gentoo-dev 2014-04-25 12:55:12 UTC
I'm not sure what's going on here.   What verison of webapp-config are you using?  I was not able to reproduce using webapp-config-1.52-r1 or 1.53.

Also, as jer suggested, what are the permissions on /etc/vhosts/webapp-config?
Comment 6 qinghao 2014-04-25 16:10:53 UTC
Created attachment 375690 [details]
webapp-config --version

run webapp-config individually always reports that error, no matter what options or arguments is given.

* Fatal error: The config file /etc/vhosts/webapp-config appears to be for an older version of webapp-config.
* Fatal error: Maybe you need to etc-update?
* Fatal error: /etc/vhosts/webapp-config needs updating!
* Fatal error(s) - aborting
Comment 7 Anthony Basile gentoo-dev 2014-04-25 16:11:57 UTC
(In reply to qinghao from comment #6)
> Created attachment 375690 [details]
> webapp-config --version
> 
> run webapp-config individually always reports that error, no matter what
> options or arguments is given.
> 
> * Fatal error: The config file /etc/vhosts/webapp-config appears to be for
> an older version of webapp-config.
> * Fatal error: Maybe you need to etc-update?
> * Fatal error: /etc/vhosts/webapp-config needs updating!
> * Fatal error(s) - aborting

What version are you using?
Comment 8 qinghao 2014-04-25 16:14:46 UTC
Created attachment 375692 [details]
eix webapp-config
Comment 9 qinghao 2014-04-25 16:22:22 UTC
Created attachment 375694 [details]
/etc/apache2/vhosts.d/00_default_vhost.conf
Comment 10 qinghao 2014-04-25 16:24:20 UTC
Created attachment 375696 [details]
eix tomcat
Comment 11 qinghao 2014-04-25 16:34:06 UTC
>Also, as jer suggested, what are the permissions on /etc/vhosts/webapp-config?
-rw-r--r-- 1 root root 8121 Apr 22 00:06 /etc/vhosts/webapp-config

>I'm not sure what's going on here.   What verison of webapp-config are you using?  I was not able to reproduce using webapp-config-1.52-r1 or 1.53.
i am using 1.52-r1 as attachment eix_webapp-config.log


=== does vhosts in apache matter? ===
i don't know what is webapp-config. but "vhosts" reminds me that i have configured several vhosts on my machine in Apache as listed attachment 00_default_vhost.conf. that's all the content of that file which have been overwritten be mis-typed edit command in vim accidentally.
Comment 12 Anthony Basile gentoo-dev 2014-04-25 16:43:36 UTC
(In reply to qinghao from comment #11)
> >Also, as jer suggested, what are the permissions on /etc/vhosts/webapp-config?
> -rw-r--r-- 1 root root 8121 Apr 22 00:06 /etc/vhosts/webapp-config
> 
> >I'm not sure what's going on here.   What verison of webapp-config are you using?  I was not able to reproduce using webapp-config-1.52-r1 or 1.53.
> i am using 1.52-r1 as attachment eix_webapp-config.log
> 
> 
> === does vhosts in apache matter? ===
> i don't know what is webapp-config. but "vhosts" reminds me that i have
> configured several vhosts on my machine in Apache as listed attachment
> 00_default_vhost.conf. that's all the content of that file which have been
> overwritten be mis-typed edit command in vim accidentally.

vhost in apache does not matter directly.

You're getting "No option 'wa_conf_version' in section: 'USER'" and yet in your config file you have WA_CONF_VERSION="7".  The caps shouldn't matter.  Try the following:

1) Edit /etc/vhosts/webapp-config and switch to upper to lower case so you have

   wa_conf_version="7"


2) If you still get "No option 'wa_conf_version' in section: 'USER'" then edit the following file:

   /usr/lib64/python3.3/site-packages/WebappConfig/config.py

replacing 3.3 with whatever version of python you are using.  Just above the lines that read:

        if (self.config.get('USER', 'wa_conf_version') !=
            self.config.get('USER', 'my_conf_version')):

add the following line

        print("DEBUG %s" % self.config.get('USER', 'wa_conf_version'))

Then run something like `webapp-config --li` (or any webapp-config command which causes the config file to be read) and you should see a line that looks like

        DEBUG 7

Please report what you get.
Comment 13 qinghao 2014-04-25 17:20:29 UTC
Created attachment 375710 [details]
webapp-config --li

have changed
WA_CONF_VERSION
to
wa_conf_version

it seems the script did not get that value correctly.
Comment 14 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-04-26 06:15:30 UTC
There's no need to add an attachment when you just want to show a few lines of output.
For reference:

[31;01m* [39;49;00m[31;01mFatal error: [39;49;00mThe config file /etc/vhosts/webapp-config appears to be for an older version of webapp-config.
[31;01m* [39;49;00m[31;01mFatal error: [39;49;00mMaybe you need to etc-update?
[31;01m* [39;49;00m[31;01mFatal error: [39;49;00m/etc/vhosts/webapp-config needs updating!
[31;01m* [39;49;00m[31;01mFatal error(s) - aborting[39;49;00m
[33;01m* [39;49;00m
[33;01m* [39;49;00mThere is a problem with your configuration file or an environment variable.
[33;01m* [39;49;00mwebapp-config tried to read the variable "wa_conf_version"
[33;01m* [39;49;00mand received the following error:
[33;01m* [39;49;00m
[33;01m* [39;49;00mNo option 'wa_conf_version' in section: 'USER'
[33;01m* [39;49;00mPlease note that webapp-config is not written in bash anymore
[33;01m* [39;49;00mand that you cannot use the bash scripting features.
DEBUG 
[33;01m* [39;49;00m
[33;01m* [39;49;00mThere is a problem with your configuration file or an environment variable.
[33;01m* [39;49;00mwebapp-config tried to read the variable "wa_conf_version"
[33;01m* [39;49;00mand received the following error:
[33;01m* [39;49;00m
[33;01m* [39;49;00mNo option 'wa_conf_version' in section: 'USER'
[33;01m* [39;49;00mPlease note that webapp-config is not written in bash anymore
[33;01m* [39;49;00mand that you cannot use the bash scripting features.

Have you tried running etc-update / dispatch-conf? Does it try to update the config file? If you have portage-utils and haven't cleaned /var/log/emerge.log, it could be interesting to check the output of "qlop -l webapp-config".
Another option is to backup the /etc/vhosts/webapp-config  file, remove it and reinstall webapp-config. Does this error go away? If so, a diff between the existing file and the one installed by webapp-config would also be interesting.
Comment 15 qinghao 2014-04-26 07:30:18 UTC
>Have you tried running etc-update / dispatch-conf? Does it try to update the config file? 
i tried both just now.  have run etc-update before merge config files
  sudo etc-update
  Scanning Configuration files...
  Exiting: Nothing left to do; exiting. :)

and run dispatch-conf the first time. it asked about the config about /etc/crontab. 

>If you have portage-utils and haven't cleaned /var/log/emerge.log, it could be >interesting to check the output of "qlop -l webapp-config".

qlop -l webapp-config given this prompt
  Wed Apr 16 00:43:52 2014 >>> [32;01mapp-admin/webapp-config-1.52-r1[00;00m
  Thu Apr 17 22:50:44 2014 >>> [32;01mapp-admin/webapp-config-1.52-r1[00;00m
  Tue Apr 22 00:08:04 2014 >>> [32;01mapp-admin/webapp-config-1.52-r1[00;00m

>Another option is to backup the /etc/vhosts/webapp-config  file, remove it and reinstall webapp-config. Does this error go away? 
have tried this. but errors are still there.
sudo rm /etc/vhosts/webapp-config
sudo emerge webapp-config
sudo emerge phpmyadmin <-- this failed same errors.

>If so, a diff between the existing file and the one installed by webapp-config would also be interesting.
nothing different.
Comment 16 Anthony Basile gentoo-dev 2014-04-26 12:58:18 UTC
(In reply to qinghao from comment #15)
> >Have you tried running etc-update / dispatch-conf? Does it try to update the config file? 

That's not what's going on.  We can tell from comment #3 that his config file is fine.  The problem is occurring around line 815 of WebappConfig/config.py, see my comment #12.  The if succeeds:

    self.config.get('USER', 'wa_conf_version') !=
    self.config.get('USER', 'my_conf_version')

meaning that wa_conf_version is not equal to my_conf_version which is set to '7' on line line 232 as part of __init__ for class Config.  In fact wa_conf_version is not set at all:

     No option 'wa_conf_version' in section: 'USER'

And yet, in his config file, he has:

    wa_conf_version="7"

Since I can't reproduce this and he can't get rid of it by re-emerging, it sounds to me like there some cruft laying around that is getting imported.



(In reply to qinghao from comment #15)

Can you try step 2 of comment #12.  Also, can I see what you get for `eselect python list`.  Finally, for good measure, try `python-updater`
Comment 17 qinghao 2014-04-26 18:12:19 UTC
Created attachment 375792 [details]
sudo python-updater when set as 2.7

>Can you try step 2 of comment #12.  Also, can I see what you get for `eselect >python list`.  Finally, for good measure, try `python-updater`

  sudo eselect python list

Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *
  [3]   python3.3

running `sudo python-updater` under 3.2 report error about no module portage.
  ImportError: No module named portage
and some subsequence errors.

the switch to 2.7
  sudo eselect python set python2.7
python-updater works with errors as python-updater_2.7.log
Comment 18 Lukasz Ligowski 2014-08-19 06:26:17 UTC
I seem to have similar problem. It goes away when setting default python to 3.3 and goes back when setting python 2.7
Comment 19 Devan Franchini (RETIRED) gentoo-dev 2014-10-14 18:03:54 UTC
Is this issue sill occurring? I can't seem to reproduce.
Comment 20 Devan Franchini (RETIRED) gentoo-dev 2014-11-18 22:53:16 UTC
(In reply to Lukasz Ligowski from comment #18)
> I seem to have similar problem. It goes away when setting default python to
> 3.3 and goes back when setting python 2.7

Seeing as this is the issue I'm fairly certain this has to do with dev-python/configparser being installed on the users' systems. This being the case is very likely so I'm going to mark this bug as a duplicate of bug #528752 which goes into more detail regarding the issue at hand.

*** This bug has been marked as a duplicate of bug 528752 ***