Skip to content

Overly Verbose Error Logging When Processing Batch Uploads #577

Open
@SoftWyer

Description

@SoftWyer

Problem:

The error logging in the event of an unresolvable domain, generates over 1000 log messages every three seconds or so. Most of this seems to be irrelevant certificate information.

This completely swamps the Android logs and makes it virtually impossible to do any serious work. The only really relevant info is the stack trace in the last ~20 messages at the end of the log.

Expectation:

  • Limited logging, the stack trace and perhaps some cert info if necessary
  • Upload process should have an incremental back-off period to avoid continually trying every ~3 seconds
  • When the max back-off is reached, no further uploading should be attempted until there is a change in network status

SDK Version:

com.mparticle:android-appboy-kit:5.63.0
com.mparticle:android-kit-base:5.63.0
com.mparticle:android-core:5.63.0

Sample of error log

Note that cert data has been truncated

W/mParticle( 2312): Duplicate DomainMapping submitted, DomainMapping:
W/mParticle( 2312): {
W/mParticle( 2312):     "mType": 3,
W/mParticle( 2312):     "url": "nativesdks",
W/mParticle( 2312):     "mCertificates": [
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "godaddy_root_g2",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx\nEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "godaddy_root_class2",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----\nMIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh\nMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuCtWVYpoNz4iCxTIM5Cuf\nReYNnyicsbkqWletNw+vHX\/bvZ8=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x1",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----myPxgcYxn\/eR44\/KJ4EBs+lVDR3veyJm+kXQ99b21\/+jh5Xos1AnX5iItreGCc=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x2_self",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----vEi51mI38AjEAi\/V3bNTIZargCyzuFJ0nN6T5U6VR5CmD1\/iQMVtCnwr1\n\/q4AaOeMSQ+2b1tbFfLn\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x2_cross",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----RgNuzvpqfQbspDQGdNpT2Lm4xiN9qfgqLaSCpi4t\nEcrmzTFYeYXmchynn9NM0GbQp7s=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         }
W/mParticle( 2312):     ]
W/mParticle( 2312): }

<snipped 800 lines of similar cruft />

W/mParticle( 2312):  will overwrite DomainMapping:
W/mParticle( 2312): {
W/mParticle( 2312):     "mType": 3,
W/mParticle( 2312):     "url": "nativesdks",
W/mParticle( 2312):     "mCertificates": [
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "godaddy_root_g2",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----vTK33sefOT6jEm0pUBsV\/fdUID+Ic\/n4XuKxe9tQWskMJDE32p2u0mYRlynqI\n4uJEvlz36hz1\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "godaddy_root_class2",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----CtWVYpoNz4iCxTIM5Cuf\nReYNnyicsbkqWletNw+vHX\/bvZ8=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x1",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----myPxgcYxn\/eR44\/KJ4EBs+lVDR3veyJm+kXQ99b21\/+jh5Xos1AnX5iItreGCc=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x2_self",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----vEi51mI38AjEAi\/V3bNTIZargCyzuFJ0nN6T5U6VR5CmD1\/iQMVtCnwr1\n\/q4AaOeMSQ+2b1tbFfLn\n-----END CERTIFICATE-----"
W/mParticle( 2312):         },
W/mParticle( 2312):         {
W/mParticle( 2312):             "alias": "lets_encrypt_root_x2_cross",
W/mParticle( 2312):             "certificate": "-----BEGIN CERTIFICATE-----RgNuzvpqfQbspDQGdNpT2Lm4xiN9qfgqLaSCpi4t\nEcrmzTFYeYXmchynn9NM0GbQp7s=\n-----END CERTIFICATE-----"
W/mParticle( 2312):         }
W/mParticle( 2312):     ]
W/mParticle( 2312): }
E/mParticle( 2312): Error processing batch uploads in mParticle DB.
E/mParticle( 2312): java.net.ConnectException: Failed to connect to nativesdks.mparticle.com/0.0.0.0:443
E/mParticle( 2312): 	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:147)
E/mParticle( 2312): 	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
E/mParticle( 2312): 	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
E/mParticle( 2312): 	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
E/mParticle( 2312): 	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
E/mParticle( 2312): 	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
E/mParticle( 2312): 	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
E/mParticle( 2312): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
E/mParticle( 2312): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
E/mParticle( 2312): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
E/mParticle( 2312): 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
E/mParticle( 2312): 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
E/mParticle( 2312): 	at com.mparticle.v.b(SourceFile:3)
E/mParticle( 2312): 	at com.mparticle.networking.c.a(SourceFile:30)
E/mParticle( 2312): 	at com.mparticle.networking.c.a(SourceFile:10)
E/mParticle( 2312): 	at com.mparticle.networking.b.a(SourceFile:2)
E/mParticle( 2312): 	at com.mparticle.internal.f.a(SourceFile:142)
E/mParticle( 2312): 	at com.mparticle.internal.l.b(SourceFile:25)
E/mParticle( 2312): 	at com.mparticle.internal.l.b(SourceFile:13)
E/mParticle( 2312): 	at com.mparticle.internal.l.a(SourceFile:29)
E/mParticle( 2312): 	at com.mparticle.b.handleMessage(SourceFile:17)
E/mParticle( 2312): 	at android.os.Handler.dispatchMessage(Handler.java:110)
E/mParticle( 2312): 	at android.os.Looper.loopOnce(Looper.java:248)
E/mParticle( 2312): 	at android.os.Looper.loop(Looper.java:338)
E/mParticle( 2312): 	at android.os.HandlerThread.run(HandlerThread.java:85)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions