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

Cannot Connect to DC 1 in MadelineProto/Tools.php #698

Closed
djnotes opened this issue Sep 21, 2019 · 12 comments
Closed

Cannot Connect to DC 1 in MadelineProto/Tools.php #698

djnotes opened this issue Sep 21, 2019 · 12 comments

Comments

@djnotes
Copy link

djnotes commented Sep 21, 2019

I keep getting connection error on my DE server. The detailed error is as follows:

Fatal error: Uncaught danog\MadelineProto\Exception: Could not connect to DC 1 in /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php on line 218

Call Stack:
   56.0326   18572800   1. danog\MadelineProto\Exception::ExceptionHandler() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:0
   56.0332   18572800   2. danog\MadelineProto\Magic::shutdown() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:96

danog\MadelineProto\Exception: Could not connect to DC 1 in /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 567

Call Stack:
   56.0326   18572800   1. danog\MadelineProto\Exception::ExceptionHandler() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:0
   56.0332   18572800   2. danog\MadelineProto\Magic::shutdown() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:96
   56.0335   18576232   3. danog\MadelineProto\API->__destruct() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/API.php:0
   56.0335   18576232   4. danog\MadelineProto\API->init() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/API.php:195
   56.0335   18576232   5. danog\MadelineProto\Tools::wait() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Async/AsyncConstruct.php:37
   56.0335   18577000   6. Amp\Loop::run() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php:216
   56.0336   18577224   7. Amp\Loop\NativeDriver->run() /var/www/public_html/vendor/amphp/amp/lib/Loop.php:84
   56.0336   18577224   8. Amp\Loop\NativeDriver->tick() /var/www/public_html/vendor/amphp/amp/lib/Loop/Driver.php:72
   56.0336   18578120   9. Amp\Loop\NativeDriver->error() /var/www/public_html/vendor/amphp/amp/lib/Loop/Driver.php:130

Error: Loop exceptionally stopped without resolving the promise in /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php on line 218

Call Stack:
   56.0326   18572800   1. danog\MadelineProto\Exception::ExceptionHandler() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:0
   56.0332   18572800   2. danog\MadelineProto\Magic::shutdown() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php:96
   56.0335   18576232   3. danog\MadelineProto\API->__destruct() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/API.php:0
   56.0335   18576232   4. danog\MadelineProto\API->init() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/API.php:195
   56.0335   18576232   5. danog\MadelineProto\Tools::wait() /var/www/public_html/vendor/danog/madelineproto/src/danog/MadelineProto/Async/AsyncConstruct.php:37

My composer file MadelineProto dependencies are:

        "danog/madelineproto":"^4",
        "amphp/dns": "dev-master#aa1892bd as 0.9",
        "amphp/socket": "0.10.12 as 1",
        "amphp/websocket": "dev-master#db2da8c5b3ed22eae37da5ffa10ab3ea8de19342 as 1",
        "amphp/websocket-client": "dev-master#aff808025637bd705672338b4904ad03a4dbdc04 as 1"
@da411d
Copy link

da411d commented Nov 24, 2019

Same problem, but with DC 2

@danog
Copy link
Owner

danog commented Dec 26, 2019

Fixed

@danog danog closed this as completed Dec 26, 2019
@badwolf770
Copy link

@danog Hi! I have the same problem "HP Fatal error: Uncaught \danog\MadelineProto\Exception: Could not connect to DC 2 in /application/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 274"
how could i fix it?

@ejk99
Copy link

ejk99 commented Nov 25, 2020

Hi bro , i had same problem who to fix that ?

@homayoonprs
Copy link

Same problem, with DC 2, on production server

@danog
Copy link
Owner

danog commented May 14, 2021

Please send full logs.

@tigger-te
Copy link

i hadSame problem, with DC 2, on testing server, error log :
thrown in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 302
[15-Sep-2021 13:31:26 UTC] PHP Fatal error: Uncaught \danog\MadelineProto\Exception: Could not connect to DC 2 in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php:302

TL Trace:

MTProto.php(622): connectToAllDcs()
API.php(218): __construct_async()
API.php(218): initAsynchronously()
AbstractAPIFactory.php(185): internalInitAPI()
AbstractAPIFactory.php(185): initAsynchronously()
__call_async()

Previous TL trace:

dcConnect()
Coroutine.php(176): throw()
Coroutine.php(114): throw()
Failure.php(33): danog\MadelineProto{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Coroutine.php(137): fail()
Failure.php(33): Amp{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Deferred.php(66): fail()
functions.php(275): fail()
NativeDriver.php(142): Amp\Promise{closure}()
Driver.php(138): dispatch()
Driver.php(72): tick()
Loop.php(95): run()
Server.php(39): run()
server.php(101): __construct()
thrown in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 302

@tigger-te
Copy link

@danog

@danog
Copy link
Owner

danog commented Sep 15, 2021

Again, need full logs.

@tigger-te
Copy link

These are all the error logs:
TL Trace:

Start.php(71): login("+7 962 785 8597")
API.php(209): APIStart({})
AbstractAPIFactory.php(185): internalInitAPI()
AbstractAPIFactory.php(185): initAsynchronously()
__call_async()

Previous TL trace:

danog\MadelineProto{closure}()
Coroutine.php(176): throw()
Coroutine.php(114): throw()
Failure.php(33): danog\MadelineProto{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Coroutine.php(137): fail()
Failure.php(33): Amp{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Deferred.php(66): fail()
functions.php(275): fail()
NativeDriver.php(142): Amp\Promise{closure}()
Driver.php(138): dispatch()
Driver.php(72): tick()
Loop.php(95): run()
Server.php(39): run()
server.php(101): __construct()
thr in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/ContextConnector.php on line 69
[15-Sep-2021 14:46:41 UTC] PHP Fatal error: Uncaught \danog\MadelineProto\Exception: Could not connect to DC 2 in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php:302

TL Trace:

MTProto.php(622): connectToAllDcs()
API.php(218): __construct_async()
API.php(218): initAsynchronously()
AbstractAPIFactory.php(185): internalInitAPI()
AbstractAPIFactory.php(185): initAsynchronously()
__call_async()

Previous TL trace:

dcConnect()
Coroutine.php(176): throw()
Coroutine.php(114): throw()
Failure.php(33): danog\MadelineProto{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Coroutine.php(137): fail()
Failure.php(33): Amp{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Deferred.php(66): fail()
functions.php(275): fail()
NativeDriver.php(142): Amp\Promise{closure}()
Driver.php(138): dispatch()
Driver.php(72): tick()
Loop.php(95): run()
Server.php(39): run()
server.php(101): __construct()
thrown in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 302
[15-Sep-2021 15:00:38 UTC] PHP Fatal error: Uncaught \danog\MadelineProto\Exception: Could not connect to DC 2 in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php:302

TL Trace:

MTProto.php(622): connectToAllDcs()
API.php(218): __construct_async()
API.php(218): initAsynchronously()
AbstractAPIFactory.php(185): internalInitAPI()
AbstractAPIFactory.php(185): initAsynchronously()
__call_async()

Previous TL trace:

dcConnect()
Coroutine.php(176): throw()
Coroutine.php(114): throw()
Failure.php(33): danog\MadelineProto{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Coroutine.php(137): fail()
Failure.php(33): Amp{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Deferred.php(66): fail()
functions.php(275): fail()
NativeDriver.php(142): Amp\Promise{closure}()
Driver.php(138): dispatch()
Driver.php(72): tick()
Loop.php(95): run()
Server.php(39): run()
server.php(101): __construct()
thrown in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 302
[15-Sep-2021 15:04:35 UTC] PHP Fatal error: Uncaught \danog\MadelineProto\Exception: Could not connect to DC 2 in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php:302

TL Trace:

MTProto.php(622): connectToAllDcs()
API.php(218): __construct_async()
API.php(218): initAsynchronously()
AbstractAPIFactory.php(185): internalInitAPI()
AbstractAPIFactory.php(185): initAsynchronously()
__call_async()

Previous TL trace:

dcConnect()
Coroutine.php(176): throw()
Coroutine.php(114): throw()
Failure.php(33): danog\MadelineProto{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Coroutine.php(137): fail()
Failure.php(33): Amp{closure}()
Placeholder.php(143): onResolve()
Placeholder.php(177): resolve()
Deferred.php(66): fail()
functions.php(275): fail()
NativeDriver.php(142): Amp\Promise{closure}()
Driver.php(138): dispatch()
Driver.php(72): tick()
Loop.php(95): run()
Server.php(39): run()
server.php(101): __construct()
thrown in /home/wwwroot/TelegramApiServer/vendor/danog/madelineproto/src/danog/MadelineProto/DataCenter.php on line 302

@tigger-te
Copy link

run server.php in cli mode,Prompt these errors:
[2021-09-16 09:17:43] [error] CRC32 mismatch (29c1636d, 73f1f8dc) for msg_container#73f1f8dc messages:vector<%Message> = MessageContainer;
[2021-09-16 09:17:43] [warning] Filling database cache. This can take few minutes.
[2021-09-16 09:17:43] [warning] Cache filled.
[2021-09-16 09:17:43] [error] CRC32 mismatch (29c1636d, 73f1f8dc) for msg_container#73f1f8dc messages:vector<%Message> = MessageContainer;
[2021-09-16 09:17:43] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:43] [warning] Connecting to DC 2.0
[2021-09-16 09:17:43] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:45] [error] Connection failed (2): Operation timed out
[2021-09-16 09:17:45] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:45] [warning] Connecting to DC 2.0
[2021-09-16 09:17:45] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:47] [error] Connection failed (2): Operation timed out
[2021-09-16 09:17:47] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:47] [warning] Connecting to DC 2.0
[2021-09-16 09:17:47] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:49] [error] Connection failed (2): Operation timed out
[2021-09-16 09:17:49] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:49] [warning] Connecting to DC 2.0
[2021-09-16 09:17:49] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:51] [error] Connection failed (2): Operation timed out
[2021-09-16 09:17:51] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:51] [warning] Connecting to DC 2.0
[2021-09-16 09:17:51] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:51] [error] Connection failed (2): Connection to tcp://[2001:067c:04e8:f002:0000:0000:0000:000a]:443 failed: [Error #101] Network is unreachable
[2021-09-16 09:17:51] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:51] [warning] Connecting to DC 2.0
[2021-09-16 09:17:51] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:51] [error] Connection failed (2): Connection to tcp://[2001:067c:04e8:f002:0000:0000:0000:000a]:80 failed: [Error #101] Network is unreachable
[2021-09-16 09:17:51] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:51] [warning] Connecting to DC 2.0
[2021-09-16 09:17:51] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:51] [error] Connection failed (2): Connection to tcp://[2001:067c:04e8:f002:0000:0000:0000:000a]:88 failed: [Error #101] Network is unreachable
[2021-09-16 09:17:51] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:51] [warning] Connecting to DC 2.0
[2021-09-16 09:17:51] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:51] [error] Connection failed (2): Connection to tcp://[2001:067c:04e8:f002:0000:0000:0000:000a]:5222 failed: [Error #101] Network is unreachable
[2021-09-16 09:17:51] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:51] [warning] Connecting to DC 2.0
[2021-09-16 09:17:51] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:53] [error] Connection failed (2): Connecting to tcp://149.154.167.51:443 failed: timeout exceeded (2000 ms)
[2021-09-16 09:17:53] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:53] [warning] Connecting to DC 2.0
[2021-09-16 09:17:53] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:55] [error] Connection failed (2): Connecting to tcp://149.154.167.51:80 failed: timeout exceeded (2000 ms)
[2021-09-16 09:17:55] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:55] [warning] Connecting to DC 2.0
[2021-09-16 09:17:55] [warning] Resetting session in DC 2.0...
[2021-09-16 09:17:57] [error] Connection failed (2): Connecting to tcp://149.154.167.51:88 failed: timeout exceeded (2000 ms)
[2021-09-16 09:17:57] [warning] Connecting to DC 2 from scratch
[2021-09-16 09:17:57] [warning] Connecting to DC 2.0
[2021-09-16 09:17:57] [warning] Resetting session in DC 2.0...

@Amarie0509
Copy link

Amarie0509 commented Sep 16, 2021 via email

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

8 participants