Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/suitecrm] SuiteCRM 8.x mail configuration not working #47482

Open
tldev-de opened this issue Sep 6, 2023 · 11 comments
Open

[bitnami/suitecrm] SuiteCRM 8.x mail configuration not working #47482

tldev-de opened this issue Sep 6, 2023 · 11 comments
Labels
on-hold Issues or Pull Requests with this label will never be considered stale suitecrm tech-issues The user has a technical issue about an application

Comments

@tldev-de
Copy link

tldev-de commented Sep 6, 2023

Name and Version

bitnami/suitecrm:8

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Start a fresh docker compose stack with this config:
version: "2"

services:
  db:
    image: mariadb:10.5
    restart: unless-stopped
    environment:
      - MYSQL_DATABASE=suitecrm
      - MYSQL_USER=suitecrm
      - MYSQL_PASSWORD=suitecrm
      - MYSQL_ROOT_PASSWORD=suitecrm
    volumes:
      - db_data:/var/lib/mysql

  suitecrm:
    image: docker.io/bitnami/suitecrm:8
    restart: unless-stopped
    environment:
      - SUITECRM_DATABASE_HOST=db
      - SUITECRM_DATABASE_PORT_NUMBER=3306
      - SUITECRM_DATABASE_NAME=suitecrm
      - SUITECRM_DATABASE_USER=suitecrm
      - SUITECRM_DATABASE_PASSWORD=suitecrm
      - [email protected]
      - SUITECRM_PASSWORD=ooj6jah3XXXXeiS7
      - [email protected]
      - SUITECRM_SMTP_HOST=mail.XXX.XXX
      - SUITECRM_SMTP_PORT=587
      - [email protected]
      - SUITECRM_SMTP_PASSWORD=XXXXXXXXXXX
      - SUITECRM_SMTP_PROTOCOL=tls
      - SUITECRM_SMTP_NOTIFY_NAME=suitecrm
      - [email protected]
    ports:
      - '8080:8080'
      - '8443:8443'
    volumes:
      - 'data:/bitnami/suitecrm'
    depends_on:
      - db

volumes:
  db_data:
  data:

What is the expected behavior?

SuiteCRM should start and configure SMTP

What do you see instead?

there is an error configuring SMTP in the application

suitecrm-suitecrm-1  | suitecrm 09:29:49.30 INFO  ==> Running setup wizard
suitecrm-suitecrm-1  | suitecrm 09:29:55.61 INFO  ==> Starting apache in background
suitecrm-suitecrm-1  | suitecrm 09:30:00.73 INFO  ==> apache started
suitecrm-suitecrm-1  | suitecrm 09:30:00.73 INFO  ==> Configuring SMTP
suitecrm-suitecrm-1  | suitecrm 09:30:01.11 ERROR ==> An error occurred while trying to login to configure SMTP
suitecrm-suitecrm-1 exited with code 1
@tldev-de tldev-de added the tech-issues The user has a technical issue about an application label Sep 6, 2023
@tldev-de tldev-de changed the title SuiteCRM mail configuration not working [bitnami/suitecrm:8] SuiteCRM mail configuration not working Sep 6, 2023
@github-actions github-actions bot added the triage Triage is needed label Sep 6, 2023
@javsalgar javsalgar changed the title [bitnami/suitecrm:8] SuiteCRM mail configuration not working [bitnami/suitecrm] SuiteCRM mail configuration not working Sep 7, 2023
@javsalgar javsalgar changed the title [bitnami/suitecrm] SuiteCRM mail configuration not working [bitnami/suitecrm] SuiteCRM 8.x mail configuration not working Sep 7, 2023
@javsalgar
Copy link
Contributor

Hi,

Could you launch it with BITNAMI_DEBUG=true env var to see if it provide more insight on the issue?

@tldev-de
Copy link
Author

tldev-de commented Sep 7, 2023

with this environment variable set this is the log:

suitecrm-suitecrm-1  | suitecrm 11:07:05.02 
suitecrm-suitecrm-1  | suitecrm 11:07:05.02 Welcome to the Bitnami suitecrm container
suitecrm-suitecrm-1  | suitecrm 11:07:05.02 Subscribe to project updates by watching https://github.com/bitnami/containers
suitecrm-suitecrm-1  | suitecrm 11:07:05.02 Submit issues and feature requests at https://github.com/bitnami/containers/issues
suitecrm-suitecrm-1  | suitecrm 11:07:05.03 
suitecrm-suitecrm-1  | suitecrm 11:07:05.03 INFO  ==> ** Starting SuiteCRM setup **
suitecrm-suitecrm-1  | suitecrm 11:07:05.04 DEBUG ==> Validating settings in APACHE_* environment variables
suitecrm-suitecrm-1  | suitecrm 11:07:05.07 INFO  ==> Generating sample certificates
suitecrm-suitecrm-1  | Generating RSA private key, 4096 bit long modulus (2 primes)
suitecrm-suitecrm-1  | ...................................................................................................................................................++++
suitecrm-suitecrm-1  | ............................................................................................................................................................................................++++
suitecrm-suitecrm-1  | e is 65537 (0x010001)
suitecrm-suitecrm-1  | Signature ok
suitecrm-suitecrm-1  | subject=CN = example.com
suitecrm-suitecrm-1  | Getting Private key
suitecrm-suitecrm-1  | realpath: /bitnami/apache/conf: No such file or directory
suitecrm-suitecrm-1  | suitecrm 11:07:06.24 INFO  ==> Configuring Apache ServerTokens directive
suitecrm-suitecrm-1  | suitecrm 11:07:06.24 DEBUG ==> Configuring ServerTokens Prod on file /opt/bitnami/apache/conf/httpd.conf
suitecrm-suitecrm-1  | suitecrm 11:07:06.28 INFO  ==> Configuring PHP options
suitecrm-suitecrm-1  | suitecrm 11:07:06.28 INFO  ==> Setting PHP expose_php option
suitecrm-suitecrm-1  | suitecrm 11:07:06.29 INFO  ==> Setting PHP output_buffering option
suitecrm-suitecrm-1  | suitecrm 11:07:06.32 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
suitecrm-suitecrm-1  | suitecrm 11:07:06.34 DEBUG ==> Validating settings in SUITECRM_* environment variables...
suitecrm-suitecrm-1  | suitecrm 11:07:06.40 INFO  ==> Ensuring SuiteCRM directories exist
suitecrm-suitecrm-1  | suitecrm 11:07:06.42 INFO  ==> Trying to connect to the database server
suitecrm-suitecrm-1  | suitecrm 11:07:06.42 DEBUG ==> Executing SQL command:
suitecrm-suitecrm-1  | SELECT 1
suitecrm-suitecrm-1  | 1
suitecrm-suitecrm-1  | suitecrm 11:07:06.45 INFO  ==> Running setup wizard
suitecrm-suitecrm-1  | [07-Sep-2023 11:07:06 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /opt/bitnami/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
suitecrm-suitecrm-1  | [07-Sep-2023 11:07:06 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /opt/bitnami/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
suitecrm-suitecrm-1  | [07-Sep-2023 11:07:06 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /opt/bitnami/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 131
suitecrm-suitecrm-1  | [07-Sep-2023 11:07:06 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /opt/bitnami/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 141
suitecrm-suitecrm-1  | 
suitecrm-suitecrm-1  | SuiteCRM Silent Install
suitecrm-suitecrm-1  | ============
suitecrm-suitecrm-1  | 
suitecrm-suitecrm-1  | Running: check-install-lock
suitecrm-suitecrm-1  | step: check-install-lock | status: done
suitecrm-suitecrm-1  | Installer not locked. Proceeding with install
suitecrm-suitecrm-1  | Running: check-db-connection
suitecrm-suitecrm-1  | step: check-db-connection | status: done
suitecrm-suitecrm-1  | DB credentials ok
suitecrm-suitecrm-1  | Running: install-system-checks
suitecrm-suitecrm-1  | step: install-system-checks | status: done
suitecrm-suitecrm-1  | Running: create-config
suitecrm-suitecrm-1  | step: create-config | status: done
suitecrm-suitecrm-1  | Created silent install config: config_si.php
suitecrm-suitecrm-1  | Running: create-env
suitecrm-suitecrm-1  | step: create-env | status: done
suitecrm-suitecrm-1  | Created .env.local
suitecrm-suitecrm-1  | Running: run-legacy-install
suitecrm-suitecrm-1  | step: run-legacy-install | status: done
suitecrm-suitecrm-1  | Legacy install successful
suitecrm-suitecrm-1  | 
suitecrm-suitecrm-1  | ============
suitecrm-suitecrm-1  | suitecrm 11:07:13.18 INFO  ==> Starting apache in background
suitecrm-suitecrm-1  | suitecrm 11:07:18.29 INFO  ==> apache started
suitecrm-suitecrm-1  | suitecrm 11:07:18.29 INFO  ==> Configuring SMTP
suitecrm-suitecrm-1  | suitecrm 11:07:18.78 ERROR ==> An error occurred while trying to login to configure SMTP
suitecrm-suitecrm-1 exited with code 1

I think the problem is, that the auth endpoint changed from suitecrm 7 to suitecrm 8. The new endpoint is at POST /login and expects the username and password as json {"username":"will","password":"will"}.

Maybe this curl command helps:

curl 'https://suite8demo.suiteondemand.com/login' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'content-type: application/json' \
  -H 'cookie: LEGACYSESSID=498c4f5560240e4dc48924fcfee096a6; PHPSESSID=59ac7d66274aa262851a3e2dda19d0eb; XSRF-TOKEN=iVdOEqfoV9bb--_Hg1eNrvjNuQ1e38LajjDBUbVpGgc' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
  -H 'x-xsrf-token: iVdOEqfoV9bb--_Hg1eNrvjNuQ1e38LajjDBUbVpGgc' \
  --data-raw '{"username":"will","password":"will"}'

@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Sep 8, 2023
@bitnami-bot bitnami-bot assigned andresbono and unassigned javsalgar Sep 8, 2023
@github-actions github-actions bot added triage Triage is needed in-progress and removed in-progress triage Triage is needed labels Sep 8, 2023
@bitnami-bot bitnami-bot assigned andresbono and unassigned andresbono Sep 8, 2023
@andresbono
Copy link
Contributor

Hi @tldev-de, thanks for sharing these details. Have you tried configuring SMTP for SuiteCRM 7? To confirm that it is a regression. Or maybe configuring mailing via UI?

@tldev-de
Copy link
Author

With the SuiteCRM 7 image everything works fine, manual configuration as well as environment variables. Manual configuration in the suitecrm 8 (no env variables set, but manual configuration in the browser after everything runs) works as well. So the problem is related to suitecrm 8 and the configuration over environment variables.

@andresbono
Copy link
Contributor

Hi @tldev-de, thank you very much for confirming it. This is definitely a bug in the way we configure SuiteCRM 8. Thank you for reporting it.

We will try to allocate some time to investigate the issue.

In the meantime, could you please set the email configuration manually via web browser?

@andresbono andresbono added on-hold Issues or Pull Requests with this label will never be considered stale and removed in-progress labels Sep 26, 2023
@lazyest
Copy link

lazyest commented Feb 28, 2024

I've reported same bug a bit earlier

@Kudze
Copy link

Kudze commented May 10, 2024

How come the issue is not fixed after half a year has gone by? 🤷

@carrodher
Copy link
Member

Unfortunately and due to other priorities we didn't have the bandwidth to work on this issue. Since the code is open source and available in this repo, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

@JoshMcCullough
Copy link
Contributor

I'm working on fixing this locally and will supply a PR if/when I resolve it.

@JoshMcCullough
Copy link
Contributor

I'm not even able to hit the API. Seeking help here: https://community.suitecrm.com/t/v4-1-api-call-not-working-params-not-received/97318/11

@arcassia
Copy link

I haven't used SuiteCRM v7 (or v8 either), but trying it recently I got the same error. I worked around mine using port 465 (plain TLS), instead of 587 (starttls). That might be provider/mailserver-specific though, and if this is the same problem, I don't know why it worked for you before.

Also: Based on "Example 2: Add SuiteCRM API support" on Docker Hub I assumed that this image didn't support the API by default - but maybe that's out of date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Issues or Pull Requests with this label will never be considered stale suitecrm tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

8 participants