From 59b41e29f47f72b4e9e83d9cd4ad4ae00d26e427 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 3 Oct 2019 12:15:45 -0700 Subject: [PATCH] Call out DS DS logging critical for Lilypad --- domain-server/src/DomainServer.cpp | 5 +++-- libraries/networking/src/AccountManager.cpp | 2 +- libraries/networking/src/LimitedNodeList.cpp | 14 +++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index d9c0a0a6b3..44ddf8373d 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -3450,8 +3450,9 @@ void DomainServer::randomizeICEServerAddress(bool shouldTriggerHostLookup) { // we ended up with an empty list since everything we've tried has failed // so clear the set of failed addresses and start going through them again - qCWarning(domain_server_ice) << "All current ice-server addresses have failed - re-attempting all current addresses for" - << _iceServerAddr; + qCWarning(domain_server_ice) << + "PAGE: All current ice-server addresses have failed - re-attempting all current addresses for" + << _iceServerAddr; _failedIceServerAddresses.clear(); candidateICEAddresses = _iceServerAddresses; diff --git a/libraries/networking/src/AccountManager.cpp b/libraries/networking/src/AccountManager.cpp index 7e76df7622..251ab819a4 100644 --- a/libraries/networking/src/AccountManager.cpp +++ b/libraries/networking/src/AccountManager.cpp @@ -1035,7 +1035,7 @@ void AccountManager::publicKeyUploadSucceeded(QNetworkReply* reply) { void AccountManager::publicKeyUploadFailed(QNetworkReply* reply) { // the public key upload has failed - qWarning() << "Public key upload failed from AccountManager" << reply->errorString(); + qWarning() << "PAGE: Public key upload failed from AccountManager to" << reply->url() << reply->errorString(); // we aren't waiting for a response any longer _isWaitingForKeypairResponse = false; diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index d92db8a5d4..e75fc07828 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -52,7 +52,7 @@ LimitedNodeList::LimitedNodeList(int socketListenPort, int dtlsListenPort) : _nodeSocket.bind(QHostAddress::AnyIPv4, port); quint16 assignedPort = _nodeSocket.localPort(); if (socketListenPort != INVALID_PORT && socketListenPort != 0 && socketListenPort != assignedPort) { - qCCritical(networking) << "NodeList is unable to assign requested port of" << socketListenPort; + qCCritical(networking) << "PAGE: NodeList is unable to assign requested port of" << socketListenPort; } qCDebug(networking) << "NodeList socket is listening on" << assignedPort; @@ -1155,6 +1155,7 @@ void LimitedNodeList::startSTUNPublicSocketUpdate() { void LimitedNodeList::possiblyTimeoutSTUNAddressLookup() { if (_stunSockAddr.getAddress().isNull()) { // our stun address is still NULL, but we've been waiting for long enough - time to force a fail + qCWarning(networking) << "PAGE: Failed to lookup address of STUN server" << STUN_SERVER_HOSTNAME; stopInitialSTUNUpdate(false); } } @@ -1170,7 +1171,7 @@ void LimitedNodeList::stopInitialSTUNUpdate(bool success) { if (!success) { // if we're here this was the last failed STUN request // use our DS as our stun server - qCDebug(networking, "Failed to lookup public address via STUN server at %s:%hu.", + qCWarning(networking, "PAGE: Failed to lookup public address via STUN server at %s:%hu.", STUN_SERVER_HOSTNAME, STUN_SERVER_PORT); qCDebug(networking) << "LimitedNodeList public socket will be set with local port and null QHostAddress."; @@ -1206,13 +1207,14 @@ void LimitedNodeList::updateLocalSocket() { } // attempt to use Google's DNS to confirm that local IP - static const QHostAddress RELIABLE_LOCAL_IP_CHECK_HOST = QHostAddress { "8.8.8.8" }; + static const QHostAddress RELIABLE_LOCAL_IP_CHECK_HOST = QHostAddress{ "8.8.8.8" }; static const int RELIABLE_LOCAL_IP_CHECK_PORT = 53; QTcpSocket* localIPTestSocket = new QTcpSocket; connect(localIPTestSocket, &QTcpSocket::connected, this, &LimitedNodeList::connectedForLocalSocketTest); - connect(localIPTestSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(errorTestingLocalSocket())); + connect(localIPTestSocket, static_cast(&QTcpSocket::error), + this, &LimitedNodeList::errorTestingLocalSocket); // attempt to connect to our reliable host localIPTestSocket->connectToHost(RELIABLE_LOCAL_IP_CHECK_HOST, RELIABLE_LOCAL_IP_CHECK_PORT); @@ -1242,6 +1244,8 @@ void LimitedNodeList::errorTestingLocalSocket() { // then use our possibly updated guessed local address as fallback if (!_hasTCPCheckedLocalSocket) { setLocalSocket(HifiSockAddr { getGuessedLocalAddress(), _nodeSocket.localPort() }); + qCWarning(networking) << "PAGE: Can't connect to Google DNS service, falling back to guessed local address" + << getLocalSockAddr(); } localIPTestSocket->deleteLater(); @@ -1325,7 +1329,7 @@ void LimitedNodeList::putLocalPortIntoSharedMemory(const QString key, QObject* p qCDebug(networking) << "Wrote local listening port" << localPort << "to shared memory at key" << key; } else { - qWarning() << "Failed to create and attach to shared memory to share local port with assignment-client children."; + qWarning() << "ALERT: Failed to create and attach to shared memory to share local port with assignment-client children."; } }