•  
      request #12790 Mediawiki for project cannot be found
    Infos
    #12790
    Leonid Terekhov (lterekhov)
    2021-04-06 09:55
    2019-01-18 15:03
    13629
    Details
    Mediawiki for project cannot be found
    I need help.

    I have tuleap installation on centos 7 in vmbox.

    In my projects plugin Mediawiki display a blank page with a message error:
    `Mediawiki for project [project_name]:/var/lib/tuleap/mediawiki/projects/103 cannot be found, please contact your system admininistrators.`

    I activated LocalSettings use this: https://tuleap.net/plugins/forumml/message.php?group_id=101&topic=36719&list=1 but its not working for me. I see analog messages.

    In nginx error log i have message:
    `2019/01/17 15:21:08 [error] 4255#0: *3 FastCGI sent in stderr: "PHP message: PHP Notice: Error encountered while retrieving data ==> CREATE DATABASE plugin_mediawiki_104 @@ /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php at line 181 in /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php on line 192" while reading response header from upstream, client: 192.168.141.5, server: 192.168.141.14, request: "POST /project/admin/servicebar.php?group_id=104 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.141.14", referrer: "https://192.168.141.14/project/admin/servicebar.php?group_id=104"`
    Mediawiki
    10.9
    EL7 (CentOS|RHEL)
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Reopen
    Empty
    Attachments
    Empty
    References
    Referencing request #12790

    Follow-ups

    User avatar

    But wouldn't that be better to make this automatically at the time we click to "install" in the admin page? Or is it impossible from app sandbox stand point?

    We try to make the things as automated as possible. When possible. There the nginx files belongs to root so they cannot be written by the application user.

    User avatar

    Yes it does. As mentioned in the documentation when you install a tuleap plugin you must run

    OK, should've been slipped from my sight. But wouldn't that be better to make this automatically at the time we click to "install" in the admin page? Or is it impossible from app sandbox stand point?

    User avatar

    Thanks for your write up, a few things for future reference:

    First things first. Current install script does not copy a necessary configuration file into the required path. I've seen the problematic part in the source code in Github, but as I'm pretty inexperienced about Tuleap and don't want to broke things, not sent a pull request

    Yes it does. As mentioned in the documentation when you install a tuleap plugin you must run

    /usr/share/tuleap/tools/utils/php73/run.php --module=nginx
    

    This will redeploy the nginx files, including the missing ones

    But installer script does not give Tuleap database user (tuleapadm) necessary privileges. We need to fix it by giving that.

    Yes it does If mediawiki is in the list of plugins that are there before your run the install script it should be transparent. Otherwise you will need to run again the install script with --reconfigure to force application of new permissions.

    User avatar
    last edited by: Murat Ursavaş (murat-ursavas) 2021-04-04 14:26

    OK, finally figured all out and would like to note here for a future reference:

    Important Note: This workarounds must be applied before activating a Wiki in any of the Projects. Mediawiki plugin only creates related database information at Wiki enable time and applies it only once. Further activations and deactivations would not help.

    First things first. Current install script does not copy a necessary configuration file into the required path. I've seen the problematic part in the source code in Github, but as I'm pretty inexperienced about Tuleap and don't want to broke things, not sent a pull request

    sudo cp /usr/share/tuleap/plugins/mediawiki/etc/nginx/mediawiki.conf /etc/nginx/conf.d/tuleap-plugins
    

    Mediawiki plugin creates databases for each project mediawiki entry. These are called as "plugin_mediawiki_101", ""plugin_mediawiki_102" and so on. But installer script does not give Tuleap database user (tuleapadm) necessary privileges. We need to fix it by giving that.

    Enter mysql system via following command (You'll be asked for root password)

    /opt/rh/rh-mysql57/root/bin/mysql -u root -p
    

    Then after seeing "mysql>" prompt, enter the following line and press enter.

    mysql> GRANT ALL PRIVILEGES ON `plugin_mediawiki_%`.* TO 'tuleapadm'@'%';
    

    Then you need to make Mysql aware of the new privileges via following command:

    mysql> flush privileges;
    

    Then exit from the mysql prompt via entering "exit" and pressing enter.

    mysql> exit
    

    Now you can enable Mediawiki in existing or newly created projects.

    P.S: If Tuleap is installed in Virtualbox virtual machine and guest additions are not installed, the disk access would be pretty slow, hence "Gateway Timeout" messages could be seen in the process. Track mysql activity in the background with tools like htop to make sure Tuleap finishes the task (Wiki DB creation takes a lot of time)

    User avatar

    Too bad. This problem still persists within version 12.7.99.29. And also I couldn't make it work with the proposed solution in one of the previous entries. This is the error message I'm getting from mysql:

    ERROR 1133 (42000): Can't find any matching row in the user table
    

    From the credentials file of Tuleap I suppose that the mysql username is a bit different which is tuleapadm. I tried it, too, but no luck. It didn't work either. Got the same error.

    Here's the list of users:

    mysql> SELECT user FROM user;
    +---------------+
    | user          |
    +---------------+
    | tuleapadm     |
    | mysql.session |
    | mysql.sys     |
    | root          |
    +---------------+
    4 rows in set (0,00 sec)
    

    And I made it work via following command but looks like it actually doesn't do anything even though I get no errors:

    mysql> GRANT ALL PRIVILEGES ON `plugin_mediawiki_%`.* TO 'tuleapadm'@'%';
    Query OK, 0 rows affected (0,00 sec)
    

    So what do you suggest to overcome this problem as of today (04/2021)?

    User avatar

    Please do not close, this should be fixed in installation script


    • Status changed from Closed to Reopen
    • Close date cleared
    User avatar
    Glad you solved your issue, and thanks for sharing how you fixed it.
    I'm closing the artifact.

    Best regards

    • Status changed from New to Closed
    • Close date set to 2019-01-29
    User avatar

    my problem fixed. need set more privilegion for user tuleap in mysql.

    solution:

    https://tuleap.slack.com/archives/C4A086HEY/p1546540421018200?thread_ts=1546437697.016100

    my road:

    1. login in mysql: /opt/rh/rh-mysql57/root/bin/mysql -p
    2. use command: GRANT ALL PRIVILEGES ON `plugin_mediawiki_%`.* TO 'tuleap'@'localhost';
    3. apply privileges: flush privileges

     

    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes