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

Replication actions do not work for primary replica on primary replica #15367

Closed
rolfjentsch opened this issue Jul 1, 2019 · 41 comments
Closed
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@rolfjentsch
Copy link

rolfjentsch commented Jul 1, 2019

I had some servers that used to replicate the fiine. I had to cut the repliication for a year or so.
I did an update to phpadmin 4.9.0.1 and tryed to reinitialise replication

getting the following result

Warning in ./libraries/classes/DatabaseInterface.php#311
Illegal offset type in isset or empty

Backtrace

./libraries/classes/DatabaseInterface.php#1782: PhpMyAdmin\DatabaseInterface->tryQuery(
string 'SHOW MASTER STATUS',
,
integer 0,
boolean false,
)
./libraries/classes/Replication.php#164: PhpMyAdmin\DatabaseInterface->fetchResult(
string 'SHOW MASTER STATUS',
NULL,
NULL,
,
)
./libraries/classes/ReplicationGui.php#997: PhpMyAdmin\Replication::slaveBinLogMaster()
./libraries/classes/ReplicationGui.php#916: PhpMyAdmin\ReplicationGui::handleRequestForSlaveChangeMaster()
./server_replication.php#52: PhpMyAdmin\ReplicationGui::handleControlRequest()

i retried it with an other Database and an other nas ..... same error

hwat shall i do .. ist it a bug ?
if so the next edition will adress it ?

@williamdes williamdes transferred this issue from phpmyadmin/error-reporting-server Jul 1, 2019
@williamdes
Copy link
Member

Param Value
Error Type Warning
Error Message Illegal offset type in isset or empty
Exception Type php
phpMyAdmin version 4.9.0.1
Incident count 4
Link Report#58426

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Jul 1, 2019
@williamdes williamdes added this to Needs triage in issues via automation Jul 1, 2019
@williamdes
Copy link
Member

@rolfjentsch Thanks for reporting, other users seem to have the same error.
We will have a look ASAP

@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jul 10, 2019
@rolfjentsch
Copy link
Author

any Progress on this ?

@p-rakowski89
Copy link

Hello.
I tested different phpmyadmin versions today because of the inability to run replication. The last version with the option working is phpmyAdmin-4.7.8 in newer versions the modules do not work correctly. When will you improve?

@williamdes
Copy link
Member

I am trying to reproduce this issue but for now I did not succeed

@williamdes
Copy link
Member

@rolfjentsch @p-rakowski89 I would be very happy to include a fix in the next version if someone can send screenshots and more instructions to reproduce the issue (step by step ?)

@williamdes
Copy link
Member

🏓

@p-rakowski89
Copy link

p-rakowski89 commented Nov 30, 2019 via email

@p-rakowski89
Copy link

replikacja

@williamdes williamdes self-assigned this Nov 30, 2019
@williamdes
Copy link
Member

@p-rakowski89 56e8ebd #15641
for the last screenshot

@p-rakowski89
Copy link

Ok, replication now starts normally. But skipping errors doesn't work well.
My guess is that this note is also missing.
But I report to help correct errors.

@williamdes
Copy link
Member

@rolfjentsch Can you help reproduce the issue so I can fix it ?

@p-rakowski89
Copy link

p-rakowski89 commented Dec 21, 2019

it seems to me that this is the solution to the problem

    public static function handleRequestForSlaveSkipError()
    {
        $count = 1;
        if (isset($_POST['sr_skip_errors_count'])) {
            $count = $_POST['sr_skip_errors_count'] * 1;
        }

<      $qStop = Replication::slaveControl("STOP");
>      $qStop = Replication::slaveControl("STOP", null, DatabaseInterface::CONNECT_USER);
        $qSkip = $GLOBALS['dbi']->tryQuery(
            "SET GLOBAL SQL_SLAVE_SKIP_COUNTER = " . $count . ";"
        );
<      $qStart = Replication::slaveControl("START");
>      $qStart = Replication::slaveControl("START", null, DatabaseInterface::CONNECT_USER);

        $result = ($qStop !== false && $qStop !== -1 &&
            $qSkip !== false && $qSkip !== -1 &&
            $qStart !== false && $qStart !== -1);

        return $result;
    }

@williamdes
Copy link
Member

774fc68

@kartik1000
Copy link
Contributor

@williamdes Hey why is this issue still opened? Has the last commit not fixed it?

@williamdes
Copy link
Member

@rolfjentsch Is this issue fixed ?

hey @kartik1000 I do not know :)

@kartik1000
Copy link
Contributor

@rolfjentsch If you can let us know how you reproduced it maybe, we can check. Else you can check and let us know :)

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 19, 2020 via email

@williamdes
Copy link
Member

Hi @rolfjentsch can you send the error, It seems that you tried to include it in the email but it got removed

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 19, 2020 via email

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 19, 2020 via email

@williamdes
Copy link
Member

@rolfjentsch Sorry but you can not use attachements you need to go to #15367 and post the screenshots or use an external service and post the link here

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 19, 2020 via email

@williamdes
Copy link
Member

Hi @rolfjentsch
Can you try version 5.0 of phpMyAdmin?
Also please post the new stack trace, it is very important for us to debug :)

@p-rakowski89
Copy link

Hi,
I keep watching this conversation about replication. I am sorry to say that no replication options work for phpmyadmin> 5.
I checked them all. It is strange that phpmyadmin does not report any error. As it was in version 4.9.1.
If necessary, I can test the changes. I have 5 master servers and 10 slaves.

@williamdes
Copy link
Member

@p-rakowski89 If you can try the download the latest version in development (phpMyAdmin 5.0+snapshot) and let me know what I should do
Because I tried after making a fix and everything was okay

@p-rakowski89
Copy link

I downloaded
1 - phpMyAdmin 5.1+snapshot Daily snapshot, generated 2020-02-19, from Git commit 922cd6bd69c1fff5cdbfe39faa50927454fa4ff3.Future version compatible with PHP 7.1 and newer and MySQL 5.5 and newer.
2- phpMyAdmin 5.0+snapshot Daily snapshot, generated 2020-02-19, from Git commit a4fcf79db08b38a3de8f4e06c59ebfb1665528fd.Current version compatible with PHP 7.1 and newer and MySQL 5.5 and newer.

They behave the same from my observations. No error whatsoever. The FULL STOP task does not work like any other.
I have installed:
Bez tytułu

@williamdes
Copy link
Member

williamdes commented Feb 20, 2020

Thank you, I will have a look once more

@williamdes williamdes moved this from to be fixed soon to High priority in issues Feb 20, 2020
@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 20, 2020 via email

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 20, 2020 via email

@rolfjentsch
Copy link
Author

rolfjentsch commented Feb 20, 2020 via email

@p-rakowski89
Copy link

Hi,
And how are you solving this problem?
Will it be touched?

@williamdes williamdes added this to the 5.0.3 milestone Jul 21, 2020
@williamdes
Copy link
Member

Hi
I have quite a lot issues to manage and appreciate that you asked for some news on this one :)
Assigned to the next milestone to try to fix this one as soon as possible.

@williamdes
Copy link
Member

@p-rakowski89 Could you please try 5.0 ?
I do not understand where is the issue and could not reproduce it ..

@williamdes williamdes moved this from High priority to Not reproduced in issues Jul 25, 2020
@p-rakowski89
Copy link

p-rakowski89 commented Jul 25, 2020 via email

@williamdes
Copy link
Member

Hi, So far while testing v5 and above, I have failed to stop, start or reset a slave from the replication menu. As if the button didn't work. If you need a more detailed description, I can record a video of this problem

Hi,

Could you please record a video, that would be helpful :)

@p-rakowski89
Copy link

p-rakowski89 commented Jul 26, 2020 via email

williamdes added a commit that referenced this issue Jul 28, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 28, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 28, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Member

Hi @p-rakowski89
Please try out 1f9ef1f I think this will fix all the issues you show in your video
Let me know :)

@p-rakowski89
Copy link

p-rakowski89 commented Jul 29, 2020 via email

@williamdes williamdes changed the title Replication fails during Install Replication actions do not work for primary replica on primary replica Jul 29, 2020
issues automation moved this from Not reproduced to Closed Jul 29, 2020
@abrenoch
Copy link

abrenoch commented Feb 11, 2021

This isn't working for me. Running 5.0.4.

PHP Fatal error:  Uncaught TypeError: Illegal offset type in isset or empty in C:\\Program Files\\xampp\\phpMyAdmin\\libraries\\classes\\DatabaseInterface.php:308
Stack trace:
#0 libraries\\classes\\DatabaseInterface.php(1869): PhpMyAdmin\\DatabaseInterface->tryQuery('SHOW MASTER STA...', Object(mysqli), 0, false)
#1 libraries\\classes\\Replication.php(188): PhpMyAdmin\\DatabaseInterface->fetchResult('SHOW MASTER STA...', NULL, NULL, Object(mysqli))
#2 libraries\\classes\\ReplicationGui.php(509): PhpMyAdmin\\Replication->slaveBinLogMaster(Object(mysqli))
#3 libraries\\classes\\ReplicationGui.php(425): PhpMyAdmin\\ReplicationGui->handleRequestForSlaveChangeMaster()
#4 server_replication.php(46): PhpMyAdmin\\ReplicationGui->handleControlRequest()
#5 {main}
  thrown in libraries\\classes\\DatabaseInterface.php on line 308

if (! isset($this->_links[$link])) {

@williamdes
Copy link
Member

Hi @abrenoch
Could you let us know what steps did you do in the interface to have this exception ?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
issues
  
Closed
Development

No branches or pull requests

5 participants