Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leaf2nd Level Support
You are here:
  • Forums
  • General discussion

Content

creation of development table

Added by Mario Ganz almost 8 years ago

I’d like to create the development table because my cronjob is constantly mailing me mails complaining about this thing missing.
Ceredentials in my database.yml are inserted and I use this https://www.openproject.org/help/faq/development-questions/ to create the tables in the existing database:

RAILS_ENV=development rake db:create

This job then stops because it demands root@localhost login for the sql database. As said above there is a dev user and a dev table. The login via web frontend into the dev database works.

What am I missing?


Replies (9)

RE: creation of development table - Added by Martin Linkhorst almost 8 years ago

Hi Mario,

do you use our packaged (https://www.openproject.org/open-source/packaged-installation/) or manual installation (https://www.openproject.org/open-source/manual-installation/)?

please paste your config/database.yml (skip any sensitive data).

RE: creation of development table - Added by Mario Ganz almost 8 years ago

I tried the packaged installation but it failed so I used the manual installation. openproject is installed in the home directory of the openproject user.

    #MySQL (default setup).
    production:
      adapter: mysql2
      database: openproject
      host: localhost
      username: openproject
      password: foo
      encoding: utf8

    development:
      adapter: mysql2
      database: openproject_dev
      host: localhost
      username: openproject_dev
      password: foo
      encoding: utf8

        #Warning: The database defined as "test" will be erased and
        #re-generated from your development database when you run "rake".
        #Do not set this db to the same as development or production.
    test:
      adapter: mysql2
      database: openproject_test
      host: localhost
      username: root
      password:
      encoding: utf8

    #test_pgsql:
      #adapter: postgresql
      #encoding: unicode
      #database: openproject_test
      #pool: 5
      #username: openproject
      #password:

    #test_sqlite3:
      #adapter: sqlite3
      #database: db/test.sqlite3

RE: creation of development table - Added by Martin Linkhorst almost 8 years ago

looks like rails 3.2.21 wants to create the test database whenever you create the development database:

https://github.com/rails/rails/blob/v3.2.21/activerecord/lib/active_record/railties/databases.rake#L637

so the rake task wants to connect to your database server as root as specified in the test: block of your database.yml

your options:

  • create a valid configuration for the test database (use a user that’s allowed to connect)
  • drop the database key form the test database’s configuration (code looks like this should work but i didn’t test)
  • drop the test block entirely

give it a try and let us know how it goes.

RE: creation of development table - Added by Mario Ganz almost 8 years ago

Thanks for helping.
I added a comment on each line of the test config section and created the database and filled it. Everything worked fine.
Though I am still receiving a email per minute from the cron daemon containing this:

require 'rails/all'... 1.170s
Bundler.require... 4.170s
Application.initialize!... [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
5.580s
[Worker(host:foo_hostname_bar pid:16496)] Starting job worker [Worker(host:foo_hostname_bar pid:16496)] No more jobs available. Exiting

RE: creation of development table - Added by Mario Ganz almost 8 years ago

Okay, I eliminated this message by now, but I am still receiving an email every minute. Is that supposed to work like this?

RE: creation of development table - Added by Martin Linkhorst almost 8 years ago

please paste the contents of your crontab

RE: creation of development table - Added by Mario Ganz almost 8 years ago

Thats the crontab. I think its the default config.

*/1 * * * * cd /home/openproject/openproject; /home/openproject/.rvm/gems/ruby-2.1.4/wrappers/rake jobs:workoff

RE: creation of development table - Added by Mario Ganz almost 8 years ago

No idea?

RE: creation of development table - Added by Martin Linkhorst almost 8 years ago

hmm, difficult to say. looks to me like there’s a job stuck in the queue that happens to send that email.

could you please provide the last hundred or so lines of the logfiles:

  • production log (or development if you run it in dev). should be at RAILS_ROOT/log/production.log or under /var/log/openproject
  • the worker log if it’s there

if you’re familiar with sql or the rails console, we could confirm that there’s a job present and which one it is
SQL: select * from delayed_jobs;
Rails Console: Delayed::Job.all

before that you could remove the entry from the crontab to confirm that it’s triggered by the cronjob/delayed_job stuff.

  • (1 - 9/9)
Loading...