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

Default database instead of external database called when starting scheduler task via CLI #197

Open
h-e-l-l-o-w-o-r-l-d opened this issue Jul 19, 2021 · 4 comments

Comments

@h-e-l-l-o-w-o-r-l-d
Copy link

Hi there,

actually I wanted to open an issue on TYPO3-Forge but as it's external_import related I want to make sure it's really a core issue.

I have an environment with 2 configured external databases. All is fine, fetching data from these databases work as expected. Additionally there's EXT:external_import installed where in one of the custom steps I fetch data from an external database via Doctrine-Queries. The associated scheduler task fetches the data and it works if I manually run the task via backend scheduler.

Now the problem: This doesn't work if the task automatically starts via CLI/cronjob. Then the external database is not called but the default one, which of course can't work. In that case the following log message is stored in tx_externalimport_domain_model_log:

SELECT command denied to user 'username'@'localhost' for table 'pages' [0]

The current workaround is to bypass doctrine and directly connect to the database via pdo methods -> this works (with the same database configuration parameters). Is the behaviour a core bug or can I do anything about it?

Cheers

TYPO3 10.4.17
external_import 5.1.1

@fsuter
Copy link
Contributor

fsuter commented Jul 19, 2021

Hi,

I would say that it's a Core bug, but it's not a certainty, more of an elimination process: I do nothing special with the database in external_import, I always use the Core API. Furthermore, external_import's scheduler task does nothing special either (I mean nothing really different from any other scheduler task).

Have you tried running the import directly from the command line (not using the task)? I'm curious if the same error happens.

@h-e-l-l-o-w-o-r-l-d
Copy link
Author

Hi,

thanks for your fast response. I tried what you asked for and the error is the same when I manually start externalimport:sync from the command line.

So opening a core-issue is the best bet, right?

@fsuter
Copy link
Contributor

fsuter commented Jul 19, 2021

Yes, I would say so.

@h-e-l-l-o-w-o-r-l-d
Copy link
Author

Issue opened: https://forge.typo3.org/issues/94586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants