rwthmoodle / Sync-my-L2P

DOWNLOAD HERE: https://github.com/rwthmoodle/Sync-my-L2P/releases/latest
http://www.syncmyl2p.de/
GNU Lesser General Public License v3.0
26 stars 6 forks source link

Show error when moodle unreachable #7

Open HarHarLinks opened 3 years ago

HarHarLinks commented 3 years ago

Describe the bug RWTHmoodle is currently not reachable:

Error: Database connection failed It is possible that the database is overloaded or otherwise not running properly. The site administrator should also check that the database details have been correctly specified in config.php

Yet, sync-my-l2p reports a successful login in the popup as well as the simple log. Setting log to advanced and restarting makes the application freeze for a minute or two before reporting an Error as below.

To Reproduce Steps to reproduce the behavior:

  1. Login to sync-my-l2p during moodle outage

Expected behavior Show that moodle is currently not reachable (due to ?)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

INFO  14:35:12.879 Set logging to "Advanced" 
INFO  14:35:12.879 switch language to  English 
DEBUG 14:35:12.879 Loaded RefreshToken:  redacted 
INFO  14:35:12.925 L2P Erreichbarkeitsrequest 
INFO  14:35:12.927 Moodle Erreichbarkeitsrequest 
INFO  14:35:13.046 L2P erreichbar 
INFO  14:35:13.046 Moodle erreichbar 
DEBUG 14:35:13.464 Access renewed through Refreshtoken 
DEBUG 14:35:13.464 Neuer accesstoken:  redacted 
DEBUG 14:35:13.503 Zugriff auf folgende Scopes:  l2p2013.rwth userinfo.rwth moodle.rwth anonymous.rwth 
DEBUG 14:35:15.006 Sende Request für Veranstaltungen 
DEBUG 14:35:15.006 Sende Request für Veranstaltungen von Moodle 
INFO  14:35:15.284 Veranstaltungen empfangen 
INFO  14:36:55.169 Moodle-Veranstaltungen empfangen 
ERROR 14:36:55.169 Status der Moodle-Kursinformationen nicht ok:  {
    "Data": null,
    "IsError": true,
    "StatusCode": -1,
    "StatusInfo": "error"
}
DEBUG 14:36:55.170 Aktualisierung beendet 
t-schroeder commented 3 years ago

Thanks for letting us know. The "Moodle erreichbar" message is a bit misleading because it only checks the accessibility of an API that lies between Sync-my-L2P an RWTHmoodle, running on a different machine. It doesn't actually mean RWTHmoodle is up. We should check if RWTHmoodle itself is accessible there. I've put this in our backlog.