# Bug OP-17556 - openproject run bundle exec rake redmine:email:receive_imap delivers warnings to email every 5 minutes

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-17556

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | DevSecOps / Installer and packaging, Administration / Incoming emails |
| Target versions | 16.4.0 |
| Observed in versions | 15.5.0 |
| Sprint | 16.4.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 15.5.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

execute any rake task since 15.5.1, I think, I did honestly not check at 15.0.0 which was my upgrade path from 14.6.3 and only live for a very short time as intermediate step, delivers the following warniings. These warnings I also see in openproject configure and with any other rake task.

``` text
/opt/openproject/config/database.yml:30:in '<main>': already initialized constant DATABASE_OPTIONS (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:30:in '<main>': previous definition of DATABASE_OPTIONS was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:59:in '<main>': already initialized constant DATABASE_VARIABLES (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:59:in '<main>': previous definition of DATABASE_VARIABLES was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:63:in '<main>': already initialized constant DATABASE_DEFAULTS (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:63:in '<main>': previous definition of DATABASE_DEFAULTS was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:30:in '<main>': already initialized constant DATABASE_OPTIONS (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:30:in '<main>': previous definition of DATABASE_OPTIONS was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:59:in '<main>': already initialized constant DATABASE_VARIABLES (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:59:in '<main>': previous definition of DATABASE_VARIABLES was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:63:in '<main>': already initialized constant DATABASE_DEFAULTS (StructuredWarnings::BuiltInWarning)
/opt/openproject/config/database.yml:63:in '<main>': previous definition of DATABASE_DEFAULTS was here (StructuredWarnings::BuiltInWarning)
/opt/openproject/vendor/bundle/ruby/3.4.0/gems/grape-2.3.0/lib/grape/util/registry.rb:10:in 'Grape::Util::Registry#register': json is already registered with class Bim::Bcf::API::ErrorFormatter::Json (StructuredWarnings::StandardWarning)
```

<br>

### What is the buggy behavior?

While these are warnings and I have no problem in general with them I get them delivered via email every 5 minutes on the cron job for the receive\_imap task

### What is the expected behavior?

*Describe how the application should behave like. Example:*

1.  I mitigated this in the meanwhile by adding \> /dev/null 2\>&1 to my cronjob, the problem is that I won't be informed about any real errors as well this way

2.  Question: Are these warnings somehow mitigable in any other way so I can let the cronjob deliver real errors without getting 24x12 mails per day because of these warnings? 

### 

### Environment information

*Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs*

**OpenProject installation type**

  - Packaged installation
    
      - RHEL9
        
        <br>

**OpenProject version**

*15.5.1*

**Browser**

- [ ] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [ ] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [x] Linux RHEL9/Alma
- [ ] Chrome OS
- [ ] Other (please specify)

**Language**

*N/A*
