Obfusticator cause exception to my j2me program - Error verifying method - java-me

After I Obfuscate my jar file I can install my jar file on the cell phone but it does not run! It gives me Exception:
Error verifying method mainPackage/mainClass notifyIncomingMessage(Ljavax/wireless/messaging/MessageConnection;)
I used ProGuard with just obfuscate option.
Do you have any idea about what is the cause of the problem?
This is what "Sony Erricson sdk" gives me after unsuccessful execution of my program:
TRY(1): env: 0x12faa0, throwable: 0x12ffb0, tmpRootsCount: 0
Garbage collecting...
Collected 0 bytes of garbage (2093048/2097152 bytes free)
TRY(2): env: 0x12f798, throwable: 0x1, tmpRootsCount: 2
CATCH(2): env: 0x12f798, throwable: 0x1, tmpRootsCount: 2
TRY(2): env: 0x12f7f0, throwable: 0x361f7a0, tmpRootsCount: 0
CATCH(2): env: 0x12f7f0, throwable: 0x361f7a0, tmpRootsCount: 0
TRY(2): env: 0x12f7f8, throwable: 0x12f840, tmpRootsCount: 0
Initializing class: 'java/lang/System'
TRY(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/cldc/i18n/Helper'
TRY(3): env: 0x12f728, throwable: 0x23, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x23, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/j2me/storage/File'
TRY(3): env: 0x12f728, throwable: 0x15, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x15, tmpRootsCount: 1
Initializing class: 'java/lang/Math'
TRY(3): env: 0x12f728, throwable: 0x8, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x8, tmpRootsCount: 1
Initializing class: 'java/lang/Double'
TRY(3): env: 0x12f6dc, throwable: 0x361fa04, tmpRootsCount: 2
Loading class 'com/sun/cldc/i18n/j2me/CP1256_Writer'
THROW(3): env: 0x12f6dc, throwable: 0x361fa04, tmpRootsCount: 2
CATCH(3): env: 0x12f6dc, throwable: 0x361e9d4, tmpRootsCount: 2
THROW(2): env: 0x12f7f8, throwable: 0x12f840, tmpRootsCount: 0
CATCH(2): env: 0x12f7f8, throwable: 0x361e9d4, tmpRootsCount: 0
Exception: java/lang/ClassNotFoundException
TRY(2): env: 0x12f7f8, throwable: 0x361e9d4, tmpRootsCount: 0
TRY(3): env: 0x12f728, throwable: 0x1040e194, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x1040e194, tmpRootsCount: 1
Initializing class: 'com/sun/kvem/cldc/i18n/j2me/GenericWriter'
Initializing class: 'com/sun/midp/main/Main'
TRY(3): env: 0x12f728, throwable: 0x27, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x27, tmpRootsCount: 1
Initializing class: 'com/sun/midp/lcdui/Resource'
TRY(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
Initializing class: 'com/sun/midp/security/SecurityToken'
TRY(3): env: 0x12f728, throwable: 0x41, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x41, tmpRootsCount: 1
Initializing class: 'com/sun/midp/security/Permissions'
TRY(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'javax/microedition/rms/RecordStore'
THROW(2): env: 0x12f7f8, throwable: 0x361e9d4, tmpRootsCount: 0
CATCH(2): env: 0x12f7f8, throwable: 0x361e220, tmpRootsCount: 0
Exception: java/lang/NullPointerException
TRY(2): env: 0x12f7f8, throwable: 0x361e220, tmpRootsCount: 0
TRY(3): env: 0x12f728, throwable: 0x47, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x47, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/j2me/http/Protocol'
TRY(3): env: 0x12f728, throwable: 0x1e, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x1e, tmpRootsCount: 1
Initializing class: 'java/lang/Integer'
TRY(3): env: 0x12f728, throwable: 0x48, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x48, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/j2me/https/Protocol'
TRY(3): env: 0x12f728, throwable: 0x4a, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x4a, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/j2me/datagram/Protocol'
TRY(3): env: 0x12f728, throwable: 0x64, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x64, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/NetworkConnectionBase'
TRY(3): env: 0x12f728, throwable: 0x4b, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x4b, tmpRootsCount: 1
Initializing class: 'com/sun/midp/lcdui/DefaultInputMethodHandler'
TRY(3): env: 0x12f728, throwable: 0x4d, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x4d, tmpRootsCount: 1
Initializing class: 'com/sun/midp/midlet/MIDletState'
TRY(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/tcpobex/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/irdaobex/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/btgoep/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/kvem/jsr082/impl/bluetooth/SecurityTokenHandler'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/kvem/io/j2me/tcpobex/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
TRY(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/mmedia/BasicPlayer'
Initializing class: 'com/sun/mmedia/JavaMPEG1Player2'
TRY(3): env: 0x12f728, throwable: 0xba, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xba, tmpRootsCount: 1
Initializing class: 'com/sun/kvem/DeviceConfiguration'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/push/PushRegistryImpl'
TRY(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/kvem/jsr082/impl/JSR082PushAdaptor'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/mms/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/jcrmi/Protocol'
TRY(3): env: 0x12f728, throwable: 0xc0, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xc0, tmpRootsCount: 1
Initializing class: 'com/sun/kvem/environment/NetMon'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
TRY(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/j2me/global/AppResourceManagerFactory'
Initializing class: 'com/sun/j2me/global/DevResourceManagerFactory'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
TRY(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/j2me/global/AppResourceBundleReader'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/amms/control/camera/SnapshotCtrl'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/mmedia/protocol/CommonDS'
THROW(2): env: 0x12f7f8, throwable: 0x361e220, tmpRootsCount: 0
CATCH(2): env: 0x12f7f8, throwable: 0x361c5f0, tmpRootsCount: 0
Exception: java/lang/ClassCastException
TRY(2): env: 0x12f7f8, throwable: 0x361c5f0, tmpRootsCount: 0
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/mmedia/MmapiTuner'
TRY(3): env: 0x12f728, throwable: 0x93, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x93, tmpRootsCount: 1
Initializing class: 'com/sun/mmedia/Configuration'
TRY(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
Initializing class: 'com/sun/mmedia/DefaultConfiguration'
Initializing class: 'com/sun/mmedia/WtkQSoundAmmsConfig'
TRY(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/mmedia/QSoundHiddenManager'
Exception: java/lang/NumberFormatException
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/mmedia/protocol/FileConnectionSubstitute'
TRY(3): env: 0x12f728, throwable: 0x4f, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x4f, tmpRootsCount: 1
Initializing class: 'com/sun/midp/security/SecurityInitializer'
TRY(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'javax/microedition/content/Registry'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/content/RegistryImpl'
TRY(3): env: 0x12f728, throwable: 0xa0, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xa0, tmpRootsCount: 1
Initializing class: 'com/sun/midp/content/AppProxy'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/content/InvocationImpl'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/j2me/global/NormalizationTableImpl'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/j2me/global/CollationElementTableImpl'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
TRY(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/j2me/payment/PaymentModule'
Initializing class: 'com/sun/kvem/payment/KvemPaymentModule'
TRY(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x2, tmpRootsCount: 1
Initializing class: 'com/sun/kvem/payment/CreditCardAdapter'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/perseus/platform/ResourceHandler'
TRY(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f6e4, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/perseus/builder/DefaultFontFace'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/io/j2me/file/Protocol'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/kvem/jsr082/impl/bluetooth/SDDBStorageImpl'
TRY(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
CATCH(3): env: 0x12f710, throwable: 0x1026d4dc, tmpRootsCount: 2
Initializing class: 'com/sun/midp/wma/WMASecurityInitializer'
TRY(3): env: 0x12f728, throwable: 0x3, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x3, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/j2me/sms/Protocol'
TRY(3): env: 0x12f728, throwable: 0x5, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x5, tmpRootsCount: 1
TRY(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
Initializing class: 'com/sun/midp/io/Properties'
TRY(3): env: 0x12f728, throwable: 0x5, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x5, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/Display'
TRY(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
Initializing class: 'com/sun/midp/lcdui/Text'
TRY(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/Item'
TRY(3): env: 0x12f728, throwable: 0xb2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb2, tmpRootsCount: 1
TRY(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
CATCH(3): env: 0x12f714, throwable: 0x1010524e, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/Displayable'
TRY(3): env: 0x12f728, throwable: 0x4b, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x4b, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/Font'
Initializing class: 'javax/microedition/lcdui/Screen'
Initializing class: 'javax/microedition/lcdui/ImageItem'
TRY(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb3, tmpRootsCount: 1
Initializing class: 'com/sun/midp/lcdui/DisplayDeviceAccess'
THROW(2): env: 0x12f7f8, throwable: 0x361c5f0, tmpRootsCount: 0
CATCH(2): env: 0x12f7f8, throwable: 0x3594a88, tmpRootsCount: 0
Exception: java/lang/NullPointerException
TRY(2): env: 0x12f7f8, throwable: 0x3594a88, tmpRootsCount: 0
Exception: java/lang/NullPointerException
TRY(3): env: 0x12f728, throwable: 0xd, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xd, tmpRootsCount: 1
Initializing class: 'com/sun/midp/content/InvocationStore'
TRY(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x1003d69f, tmpRootsCount: 1
Initializing class: 'javax/microedition/midlet/MIDletProxy'
TRY(3): env: 0x12f728, throwable: 0x35957b4, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0x35957b4, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/List'
TRY(3): env: 0x12f728, throwable: 0xb2, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb2, tmpRootsCount: 1
Initializing class: 'javax/microedition/lcdui/ChoiceGroup'
TRY(3): env: 0x12f708, throwable: 0x361fa04, tmpRootsCount: 2
Loading class 'com/sun/cldc/i18n/j2me/CP1256_Writer'
THROW(3): env: 0x12f708, throwable: 0x361fa04, tmpRootsCount: 2
CATCH(3): env: 0x12f708, throwable: 0x3593ba0, tmpRootsCount: 2
THROW(2): env: 0x12f7f8, throwable: 0x3594a88, tmpRootsCount: 0
CATCH(2): env: 0x12f7f8, throwable: 0x3593ba0, tmpRootsCount: 0
Exception: java/lang/ClassNotFoundException
TRY(2): env: 0x12f7f8, throwable: 0x3593ba0, tmpRootsCount: 0
TRY(3): env: 0x12f728, throwable: 0xb4, tmpRootsCount: 1
CATCH(3): env: 0x12f728, throwable: 0xb4, tmpRootsCount: 1
Initializing class: 'com/sun/kvem/cldc/i18n/j2me/GenericReader'
Garbage collecting...
Collected 511776 bytes of garbage (2017472/2097152 bytes free)
TRY(3): env: 0x12f708, throwable: 0x361f81c, tmpRootsCount: 2
Loading class 'mainPackage/mainClass'
Garbage collecting...
Collected 3268 bytes of garbage (1950216/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1946120/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1944072/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1942024/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1939976/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1937928/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1935880/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1933832/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1931784/2097152 bytes free)
Garbage collecting...
Collected 8144 bytes of garbage (1937880/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1935832/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1933784/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1931736/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1929688/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1927640/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1925592/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1923544/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1921496/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1919448/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1917400/2097152 bytes free)
Garbage collecting...
Collected 0 bytes of garbage (1915352/2097152 bytes free)
Class loaded ok
Linking class: 'mainPackage/mainClass'
Class linked ok
CATCH(3): env: 0x12f708, throwable: 0x361f81c, tmpRootsCount: 2
Error verifying method mainPackage/mainClass notifyIncomingMessage(Ljavax/wireless/messaging/MessageConnection;)V
Method............: 1024a748 'com/sun/midp/midlet/MIDletState.createMIDlet (static)'
Stack Chunk.......: 342102c
Frame Pointer.....: 3421084
Approximate bytecode offset 4: Inconsistent or missing stackmap at target
Current IP........: 1035d4e7 = 1035d4ca + offset 29
Previous Frame....: 342104c
Previous IP.......: 103f6e20 (offset 22)
Frame size........: 7 (1 arguments, 6 local variables)
Argument[0].......: 3421964
Local[1]..........: 0
Local[2]..........: 35909ec
Local[3]..........: 3432534
Local[4]..........: 3590a00
Local[5]..........: 1028f4ac
Local[6]..........: 35909cc
Operand[1]........: 361f7e0
Method............: 102b14c8 'com/sun/midp/midlet/Selector.run (virtual)'
Stack Chunk.......: 342102c
Frame Pointer.....: 342104c
Current IP........: 103f6e20 = 103f6e0a + offset 22
Previous Frame....: 0
Previous IP.......: 1
Frame size........: 6 (1 arguments, 5 local variables)
Argument[0].......: 3421b68
Local[1]..........: 343261c
Local[2]..........: 3421964
Local[3]..........: 0
Local[4]..........: 0
Local[5]..........: 0
Operand[1]........: 343261c
VM status:
Instruction pointer.: 1035d4e7 (offset within invoking method: 29)
Next instruction....: 0x4c
Frame pointer.......: 3421084
Local pointer.......: 3421068
Stack size..........: 128; sp: 342109c; ranges: 3421034-3421234;
Contents of the current stack frame:
3421068: 3421964 (lp)
342106c: 0
3421070: 35909ec
3421074: 3432534
3421078: 3590a00
342107c: 1028f4ac
3421080: 35909cc
3421084: 342104c (fp)
3421088: 103f6e20
342108c: 3421064
3421090: 1024a748
3421094: 342102c
3421098: 0 (end of frame)
342109c: 361f7e0 (sp)
Execution stack contains 108 items:
3421b68
343261c
3421964
0
0
0
0
1
35909d0
102b14c8
342102c
0
343261c
3421964
0
35909ec
3432534
3590a00
1028f4ac
35909cc
342104c
103f6e20
3421064
1024a748
342102c
0
361f7e0
Execution completed.
3690964 bytecodes executed
285 thread switches
1770 classes in the system (including system classes)
19842 dynamic objects allocated (658096 bytes)
23 garbage collections (523188 bytes collected)
CATCH(2): env: 0x12f7f8, throwable: 0x3593ba0, tmpRootsCount: 0
ALERT: java/lang/VerifyError: mainPackage/mainClass.
Execution completed.
3690964 bytecodes executed
285 thread switches
1770 classes in the system (including system classes)
19842 dynamic objects allocated (658096 bytes)
23 garbage collections (523188 bytes collected)

"Inconsistent or missing stackmap at target" means that the preverification information inside a class file is incorrect.
Make sure that you specify -microedition, so ProGuard preverifies the code for JME, not JSE.
Don't specify -dontpreverify. You do want ProGuard to preverify the code. Alternatively, you could apply the external JME preverifier, but that is less efficient.
Cfr. ProGuard manual > Troubleshooting > Verification error

Be sure to not create your jar file with javax packages in it. java and javax must be available only by Virtual Machine classpath.

Related

I get Error 500 Forwarding Error in my microservice infrastructure in Azure Kubernetes Service

I wrote a microservice infrastructure with Java Spring Boot. This infrastructure includes a discovery service, an API gateway and a microservice that sends messages to customers. In the meantime I have provided the microservices in Azure Kubernetes Service. All services are registered in the Discovery Service and for the routes I use the Cluster IP of the SendMessage Microservice.
application.properties
zuul.routes.contacts.path=/contacts/**
zuul.routes.contacts.url=http://10.0.205.4:8100
So far everything went well. After I started a request to my API gateway, a message was also sent. But now I get an error message even though I haven't made any changes. After I now start a request to send a message, I receive an error code of 500 Internal Server Error, but the message will still be sent.
{
"timestamp": "2020-07-10T08:48:37.621+00:00",
"status": 500,
"error": "Internal Server Error",
"message": ""
}
When I look at the logs from the API Gateway, it says the following:
2020-07-10 08:05:37.136 WARN 1 --- [nio-8800-exec-3] o.s.c.n.z.filters.post.SendErrorFilter : Error during filtering
com.netflix.zuul.exception.ZuulException: Forwarding error
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.handleException(SimpleHostRoutingFilter.java:261) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:241) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:118) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116) ~[zuul-core-1.3.1.jar!/:1.3.1]
at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81) ~[zuul-core-1.3.1.jar!/:1.3.1]
at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:166) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:45) [spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at sendMessage.ApiGateway.JwtRequestFilter.doFilterInternal(JwtRequestFilter.java:52) [classes!/:0.0.1-SNAPSHOT]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) [spring-security-web-5.3.2.RELEASE.jar!/:5.3.2.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93) [spring-boot-actuator-2.3.0.RELEASE.jar!/:2.3.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.6.RELEASE.jar!/:5.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_212]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.35.jar!/:9.0.35]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_212]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_212]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_212]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_212]
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) ~[httpcore-4.4.13.jar!/:4.4.13]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) ~[httpclient-4.5.12.jar!/:4.5.12]
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forwardRequest(SimpleHostRoutingFilter.java:422) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forward(SimpleHostRoutingFilter.java:341) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:236) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
... 92 common frames omitted
Can someone tell me what's going wrong?
UPDATE 1
apiVersion: apps/v1
kind: Deployment
metadata:
name: apigateway-front
spec:
replicas: 1
selector:
matchLabels:
app: apigateway-front
template:
metadata:
labels:
app: apigateway-front
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: apigateway-front
image: containerregistry.azurecr.io/apigateway:28
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
ports:
- containerPort: 8800
name: apigateway
---
apiVersion: v1
kind: Service
metadata:
name: apigateway-front
spec:
type: LoadBalancer
ports:
- port: 8800
selector:
app: apigateway-front
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: contacts-back
spec:
replicas: 1
selector:
matchLabels:
app: contacts-back
template:
metadata:
labels:
app: contacts-back
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: contacts-back
image: containerregistry.azurecr.io/contacts:26
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
ports:
- containerPort: 8100
name: contacts-back
---
apiVersion: v1
kind: Service
metadata:
name: contacts-back
spec:
ports:
- port: 8100
selector:
app: contacts-back
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: templates-back
spec:
replicas: 1
selector:
matchLabels:
app: templates-back
template:
metadata:
labels:
app: templates-back
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: templates-back
image: containerregistry.azurecr.io/templates:25
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
ports:
- containerPort: 8200
name: templates-back
---
apiVersion: v1
kind: Service
metadata:
name: templates-back
spec:
ports:
- port: 8200
selector:
app: templates-back
apiVersion: apps/v1
kind: Deployment
metadata:
name: discoveryservice-front
spec:
replicas: 1
selector:
matchLabels:
app: discoveryservice-front
template:
metadata:
labels:
app: discoveryservice-front
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: discoveryservice-front
image: containerregistry.azurecr.io/discoveryservice:16
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
ports:
- containerPort: 8762
name: discovery
---
apiVersion: v1
kind: Service
metadata:
name: eureka
spec:
type: LoadBalancer
ports:
- port: 8762
selector:
app: discoveryservice-front
okay problem solved. it is always advisable to look at the logs of the second microservice. It was due to an outdated SQL connection that issued the error. And I was looking for the bug in Discovery Service all the time.

Getting "Rejecting deliver request for IP:port because of consenter" error with raft

I'm running a multi-org setup on cloud consists of 2 Orgs, 4 Peers(2 peers per Org) and 3 ordering nodes. All the peer nodes and the node orderer0 are running on DigitalOcean droplet. orderer2 and orderer3 nodes are running on AWS and GCP respectively. For ordering service I'm using Raft and orderer2 was selected as a Leader. For creating the channel, installing/instantiating/querying the chaincode, I'm executing a scripts.sh(present in byfn under scripts directory) on the peer. The script executed successfully i.e channel was created(using orderer0 node), joined by all the peers and installation/instantiation/query of chaincode executed successfully. But when I checked the orderer0 logs I found below errors.
2019-11-15 13:33:08.814 UTC [common.deliver] deliverBlocks -> WARN 04a [channel: mychannel] Rejecting deliver request for 139.59.7.201:59304 because of consenter error
2019-11-15 13:33:08.815 UTC [comm.grpc.server] 1 -> INFO 04b streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=139.59.7.201:59304 grpc.code=OK grpc.call_duration=201.373401ms
After a few seconds
2019-11-15 13:33:09.654 UTC [orderer.consensus.etcdraft] run -> INFO 058 raft.node: 1 elected leader 2 at term 2 channel=mychannel node=1
2019-11-15 13:33:09.657 UTC [orderer.consensus.etcdraft] serveRequest -> INFO 059 Raft leader changed: 0 -> 2 channel=mychannel node=1
2019-11-15 13:33:09.865 UTC [common.deliver] Handle -> WARN 05a Error reading from 139.59.7.201:59314: rpc error: code = Canceled desc = context canceled
docker-compose-orderer.yaml
version: '2'
networks:
byfn:
services:
orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer:1.4.3
restart: always
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- ORDERER_HOST=orderer.example.com
- ORDERER_GENERAL_LOGLEVEL=info
- FABRIC_LOGGING_SPEC=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_GENESISPROFILE=OrdererOrg
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_LOGGING_SHIM=DEBUG
- ORDERER_TLS_CLIENTROOTCAS_FILES=/var/hyperledger/users/Admin#example.com/tls/ca.crt
- ORDERER_TLS_CLIENTCERT_FILE=/var/hyperledger/users/Admin#example.com/tls/client.crt
- ORDERER_TLS_CLIENTKEY_FILE=/var/hyperledger/users/Admin#example.com/tls/client.key
- GODEBUG=netdns=go
extra_hosts:
- "peer0.org1.example.com:139.59.13.3"
- "peer1.org1.example.com:139.59.13.119"
- "peer0.org2.example.com:139.59.7.201"
- "peer1.org2.example.com:139.59.24.225"
- "orderer2.example.com:3.14.67.48"
- "orderer3.example.com:34.69.118.13"
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ./channel-artifacts/:/var/hyperledger/configs
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
- ./crypto-config/ordererOrganizations/example.com/users:/var/hyperledger/users
#- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
networks:
- byfn
docker-compose-orderer2.yaml
version: '2'
networks:
byfn:
services:
orderer2.example.com:
container_name: orderer2.example.com
image: hyperledger/fabric-orderer:1.4.3
restart: always
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- ORDERER_HOST=orderer2.example.com
- ORDERER_GENERAL_LOGLEVEL=info
- FABRIC_LOGGING_SPEC=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_GENESISPROFILE=OrdererOrg
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_LOGGING_SHIM=DEBUG
- ORDERER_TLS_CLIENTROOTCAS_FILES=/var/hyperledger/users/Admin#example.com/tls/ca.crt
- ORDERER_TLS_CLIENTCERT_FILE=/var/hyperledger/users/Admin#example.com/tls/client.crt
- ORDERER_TLS_CLIENTKEY_FILE=/var/hyperledger/users/Admin#example.com/tls/client.key
- GODEBUG=netdns=go
extra_hosts:
- "peer0.org1.example.com:139.59.13.3"
- "peer1.org1.example.com:139.59.13.119"
- "peer0.org2.example.com:139.59.7.201"
- "peer1.org2.example.com:139.59.24.225"
- "orderer.example.com:139.59.1.164"
- "orderer2.example.com:3.14.67.48"
- "orderer3.example.com:34.69.118.13"
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ./channel-artifacts/:/var/hyperledger/configs
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/:/var/hyperledger/orderer/tls
- ./crypto-config/ordererOrganizations/example.com/users:/var/hyperledger/users
#- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
networks:
- byfn
docker-compose-orderer3.yaml
version: '2'
networks:
byfn:
services:
orderer3.example.com:
container_name: orderer3.example.com
image: hyperledger/fabric-orderer:1.4.3
restart: always
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- ORDERER_HOST=orderer3.example.com
- ORDERER_GENERAL_LOGLEVEL=info
- FABRIC_LOGGING_SPEC=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_GENESISPROFILE=OrdererOrg
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_LOGGING_SHIM=DEBUG
- ORDERER_TLS_CLIENTROOTCAS_FILES=/var/hyperledger/users/Admin#example.com/tls/ca.crt
- ORDERER_TLS_CLIENTCERT_FILE=/var/hyperledger/users/Admin#example.com/tls/client.crt
- ORDERER_TLS_CLIENTKEY_FILE=/var/hyperledger/users/Admin#example.com/tls/client.key
- GODEBUG=netdns=go
extra_hosts:
- "peer0.org1.example.com:139.59.13.3"
- "peer1.org1.example.com:139.59.13.119"
- "peer0.org2.example.com:139.59.7.201"
- "peer1.org2.example.com:139.59.24.225"
- "orderer.example.com:139.59.1.164"
- "orderer2.example.com:3.14.67.48"
- "orderer3.example.com:34.69.118.13"
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ./channel-artifacts/:/var/hyperledger/configs
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/:/var/hyperledger/orderer/tls
- ./crypto-config/ordererOrganizations/example.com/users:/var/hyperledger/users
#- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
networks:
- byfn
docker-compose-orderer.yaml
version: '2'
networks:
byfn:
services:
orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer:1.4.3
restart: always
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- ORDERER_HOST=orderer.example.com
- ORDERER_GENERAL_LOGLEVEL=info
- FABRIC_LOGGING_SPEC=info
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_GENESISPROFILE=OrdererOrg
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
#- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
#- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_LOGGING_SHIM=DEBUG
- ORDERER_TLS_CLIENTROOTCAS_FILES=/var/hyperledger/users/Admin#example.com/tls/ca.crt
- ORDERER_TLS_CLIENTCERT_FILE=/var/hyperledger/users/Admin#example.com/tls/client.crt
- ORDERER_TLS_CLIENTKEY_FILE=/var/hyperledger/users/Admin#example.com/tls/client.key
- GODEBUG=netdns=go
extra_hosts:
- "peer0.org1.example.com:139.59.13.3"
- "peer1.org1.example.com:139.59.13.119"
- "peer0.org2.example.com:139.59.7.201"
- "peer1.org2.example.com:139.59.24.225"
- "orderer2.example.com:3.14.67.48"
- "orderer3.example.com:34.69.118.13"
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ./channel-artifacts/:/var/hyperledger/configs
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
- ./crypto-config/ordererOrganizations/example.com/users:/var/hyperledger/users
#- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
networks:
- byfn
orderer(orderer0) node logs
https://justpaste.it/49a1n
Orderer2 node logs ae huge hence sharing the link
https://justpaste.it/6ro0v
orderer3 logs
https://justpaste.it/5e4j8
peer0org1 logs
https://justpaste.it/33rm5
peer1org1 logs
https://justpaste.it/1s2uz
peer0org2 logs
https://justpaste.it/6emlk
peer1org2 logs
https://justpaste.it/53fna

How to fix "Failed creating puller config from bootstrap block: unable to decode TLS certificate PEM" in HLF with Raft Cluster

I am trying to set up a Hyperledger Fabric network with the orderer as Raft (3 nodes in the cluster). I am using Kubernetes with Helm in Cloud.
Everything works fine when it is a single node Raft set up. However, for a multi-node setup, I am getting the following error.
[orderer.common.cluster] createReplicator -> PANI 3f4 Failed creating puller config from bootstrap block: unable to decode TLS certificate PEM:
panic: Failed creating puller config from bootstrap block: unable to decode TLS certificate PEM:
goroutine 15 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000f1ce0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000140158, 0x4, 0x1047e13, 0x36, 0xc000289c50, 0x1, 0x1, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc000140158, 0x1047e13, 0x36, 0xc000289c50, 0x1, 0x1)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(0xc000140160, 0x1047e13, 0x36, 0xc000289c50, 0x1, 0x1)
/opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74 +0x60
github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).createReplicator(0xc0001c8ba0, 0xc0003ce340, 0xc00031a9a0, 0xb)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:60 +0x30c
github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).ReplicateChains(0xc0001c8ba0, 0xc0003ce340, 0xc00031a000, 0x1, 0x1, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:117 +0x1ca
github.com/hyperledger/fabric/orderer/common/server.(*inactiveChainReplicator).replicateDisabledChains(0xc0003701e0)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:224 +0x1f5
github.com/hyperledger/fabric/orderer/common/server.(*inactiveChainReplicator).run(0xc0003701e0)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:202 +0x42
created by github.com/hyperledger/fabric/orderer/common/server.initializeEtcdraftConsenter
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:637 +0x3fc
Other configs as follows
configtx.yaml
MultiNodeEtcdRaft:
<<: *ChannelDefaults
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer.example.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
Consenters:
- Host: orderer2.example.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
Consenters:
- Host: orderer3.example.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
Addresses:
- myorg-orderer-hlf-ord:7050
- myorg-orderer2-hlf-ord:7050
- myorg-orderer3-hlf-ord:7050
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *myorg
I found the solution to this problem.
I had to fix two issues inorder to get this working.
I was missing a few environment variables for TLS in my helm setup for orderer.
ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE: "/var/hyperledger/tls/server/pair/tls.crt"
ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY: "/var/hyperledger/tls/server/pair/tls.key"
ORDERER_GENERAL_CLUSTER_ROOTCAS: "/var/hyperledger/tls/server/cert/cacert.pem"
Syntax error in configtx.yaml YAML config. I was repeating Consenters key multiple times.

failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed

When trying to install and instantiate the chaincode I'm getting below error:
error coming on WSL(Windows subsystem for Linux)
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed
error on Ubuntu 16.04
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: no channel peers configured for channel [mychannel]
I'm following the chainHero example. below is the complete output after running make command.
Build done
Start environment ...
Creating network "firstproject-network_default" with the default driver
Creating orderer.firstproject.com ... done
Creating ca.org1.firstproject.com ... done
Creating peer0.org1.firstproject.com ... done
Creating peer1.org1.firstproject.com ... done
Docker environment up
Start app and initializing skd with local network...
SDK created
Resource management client created
value of req is: {mychannel <nil> /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/artifacts/channel.tx [0xc0001d4fa0]}
Value of setup.Orderer is: orderer.firstproject.com
Channel created
Channel joined
Initialization Successful
ccPkg created
Chaincode installed
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed
config.yaml
name: "firstproject-network"
version: 1.0.0
client:
organization: org1
logging:
level: info
peer:
timeout:
connection: 10s
response: 180s
discovery:
greylistExpiry: 10s
eventService:
timeout:
connection: 15s
registrationResponse: 15s
orderer:
timeout:
connection: 15s
response: 15s
cryptoconfig:
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config
credentialStore:
path: /tmp/firstproject-store
cryptoStore:
path: /tmp/firstproject-msp
BCCSP:
security:
enabled: true
default:
provider: "SW"
hashAlgorithm: "SHA2"
softVerify: true
level: 256
tlsCerts:
systemCertPool: false
client:
keyfile:
certfile:
channels:
OneOrgChannel:
peers:
peer0.org1.firstproject.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer1.org1.firstproject.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
policies:
queryChannelConfig:
minResponses: 1
maxTargets: 1
retryOpts:
attempts: 5
initialBackoff: 500ms
maxBackoff: 5s
backoffFactor: 2.0
# list of participating organizations in this network
organizations:
org1:
mspid: Org1MSP
cryptoPath: peerOrganizations/org1.firstproject.com/users/{userName}#org1.firstproject.com/msp
peers:
- peer0.org1.firstproject.com
- peer1.org1.firstproject.com
certificateAuthorities:
- ca.org1.firstproject.com
orderers:
orderer.firstproject.com:
url: grpcs://localhost:7050
grpcOptions:
ssl-target-name-override: orderer.firstproject.com
keep-alive-time: 0s
keep-alive-timeout: 20s
keep-alive-permit: false
fail-fast: false
allow-insecure: false
tlsCACerts:
# Certificate location absolute path
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem
peers:
peer0.org1.firstproject.com:
# this URL is used to send endorsement and query requests
url: grpcs://localhost:7051
# eventUrl is only needed when using eventhub (default is delivery service)
eventUrl: grpcs://localhost:7053
grpcOptions:
ssl-target-name-override: peer0.org1.firstproject.com
keep-alive-time: 0s
keep-alive-timeout: 20s
keep-alive-permit: false
fail-fast: false
allow-insecure: false
tlsCACerts:
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/peerOrganizations/org1.firstproject.com/tlsca/tlsca.org1.firstproject.com-cert.pem
peer1.org1.firstproject.com:
url: grpcs://localhost:8051
eventUrl: grpcs://localhost:8053
grpcOptions:
ssl-target-name-override: peer1.org1.firstproject.com
keep-alive-time: 0s
keep-alive-timeout: 20s
keep-alive-permit: false
fail-fast: false
allow-insecure: false
tlsCACerts:
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/peerOrganizations/org1.firstproject.com/tlsca/tlsca.org1.firstproject.com-cert.pem
certificateAuthorities:
ca.org1.firstproject.com:
url: http://localhost:7054
httpOptions:
verify: false
registrar:
enrollId: admin
enrollSecret: adminpw
caName: ca.org1.firstproject.com
tlsCACerts:
path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/peerOrganizations/org1.firstproject.com/ca/ca.org1.firstproject.com-cert.pem
entityMatchers:
peer:
- pattern: (\w*)peer0.org1.firstproject.com(\w*)
urlSubstitutionExp: grpcs://localhost:7051
eventUrlSubstitutionExp: grpcs://localhost:7053
sslTargetOverrideUrlSubstitutionExp: peer0.org1.firstproject.com
mappedHost: peer0.org1.firstproject.com
- pattern: (\w*)peer1.org1.firstproject.com(\w*)
urlSubstitutionExp: grpcs://localhost:8051
eventUrlSubstitutionExp: grpcs://localhost:8053
sslTargetOverrideUrlSubstitutionExp: peer1.org1.firstproject.com
mappedHost: peer1.org1.firstproject.com
orderer:
- pattern: (\w+).firstproject.(\w+):(\d+)
urlSubstitutionExp: grpcs://localhost:7050
sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com
mappedHost: orderer.firstproject.com
- pattern: (\w+).firstproject.(\w+)
urlSubstitutionExp: grpcs://localhost:7050
sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com
mappedHost: orderer.firstproject.com
certificateAuthorities:
- pattern: (\w*)ca.org1.firstproject.com(\w*)
urlSubstitutionExp: http://localhost:7054
mappedHost: ca.org1.firstproject.com
docker-compose.yaml
version: '2'
networks:
default:
services:
orderer.firstproject.com:
container_name: orderer.firstproject.com
extends:
file: peer-base.yaml
service: orderer-base
volumes:
- ./crypto-config/ordererOrganizations/firstproject.com/orderers/orderer.firstproject.com/msp:/var/hyperledger/orderer/msp
- ./artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/firstproject.com/orderers/orderer.firstproject.com/tls:/var/hyperledger/orderer/tls
ports:
- 7050:7050
ca.org1.firstapplication.com:
image: hyperledger/fabric-ca:latest
container_name: ca.org1.firstproject.com
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.org1.firstproject.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.firstproject.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/78da3186373e52832b71dd83ec4d36ef84722a3e3ed15e8df214b482fe2723e7_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.firstproject.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/78da3186373e52832b71dd83ec4d36ef84722a3e3ed15e8df214b482fe2723e7_sk
ports:
- 7054:7054
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org1.firstproject.com/ca/:/etc/hyperledger/fabric-ca-server-config
peer0.org1.firstproject.com:
container_name: peer0.org1.firstproject.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_NETWORKID=firstproject
- CORE_PEER_ID=peer0.org1.firstproject.com
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_ADDRESS=peer0.org1.firstproject.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.firstproject.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer0.org1.firstproject.com
#- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.firstapplication.com:7051
volumes:
- ./var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer0.org1.firstproject.com/msp:/var/hyperledger/msp
- ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer0.org1.firstproject.com/tls:/var/hyperledger/tls
ports:
- 7051:7051
- 7053:7053
depends_on:
- orderer.firstproject.com
links:
- orderer.firstproject.com
networks:
default:
aliases:
- peer0.org1.firstproject.com
peer1.org1.firstproject.com:
container_name: peer1.org1.firstproject.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_NETWORKID=firstproject
- CORE_PEER_ID=peer1.org1.firstproject.com
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_ADDRESS=peer1.org1.firstproject.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.firstproject.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer1.org1.firstproject.com
#- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.firstapplication.com:7051
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/msp:/var/hyperledger/msp
- ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/tls:/var/hyperledger/tls
ports:
- 8051:7051
- 8053:7053
depends_on:
- orderer.firstproject.com
links:
- orderer.firstproject.com
networks:
default:
aliases:
- peer1.org1.firstproject.com
peer-base.yaml
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer:latest
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_ATTACHSTDOUT=true
- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
orderer-base:
image: hyperledger/fabric-orderer:latest
environment:
- FABRIC_LOGGING_SPEC=DEBUG
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
You're using the wrong channel name to instantiate the chaincode, in the config.yaml you have defined a channel OneOrgChannel with peer peer0, peer1. However, you seem to be using a channel mychannel to instantiate chaincode.
Either change the channel name to OneOrgChannelor add mychannel in the config.yaml.

mongoosejs queries times just goes up... why?

I have this script for measuring the time it takes for a query to perform:
for (var i = 0; i < 10000; i++) {
(function(start) {
Models.User.findOneAsync({
userId: 'ABCD'
}, 'age name location')
.then(function(user) {
logger.debug(Date.now() - start);
})
})(Date.now());
}
As a result, I'm getting an incremented list of results:
2015-05-19T11:09:16.204Z - debug: 4369
2015-05-19T11:09:16.205Z - debug: 4367
2015-05-19T11:09:16.205Z - debug: 4367
2015-05-19T11:09:16.206Z - debug: 4368
2015-05-19T11:09:16.206Z - debug: 4367
2015-05-19T11:09:16.206Z - debug: 4368
2015-05-19T11:09:16.206Z - debug: 4367
2015-05-19T11:09:16.206Z - debug: 4369
2015-05-19T11:09:16.206Z - debug: 4368
2015-05-19T11:09:16.206Z - debug: 4368
2015-05-19T11:09:16.206Z - debug: 4368
2015-05-19T11:09:16.206Z - debug: 4367
2015-05-19T11:09:16.212Z - debug: 4373
2015-05-19T11:09:16.212Z - debug: 4373
2015-05-19T11:09:16.248Z - debug: 4408
2015-05-19T11:09:16.376Z - debug: 4536
2015-05-19T11:09:16.459Z - debug: 4619
2015-05-19T11:09:16.475Z - debug: 4635
2015-05-19T11:09:16.493Z - debug: 4654
2015-05-19T11:09:16.552Z - debug: 4713
2015-05-19T11:09:16.636Z - debug: 4796
2015-05-19T11:09:16.794Z - debug: 4954
2015-05-19T11:09:16.830Z - debug: 4990
2015-05-19T11:09:16.841Z - debug: 5001
2015-05-19T11:09:16.845Z - debug: 5005
2015-05-19T11:09:17.133Z - debug: 5293
2015-05-19T11:09:17.176Z - debug: 5336
2015-05-19T11:09:17.182Z - debug: 5341
2015-05-19T11:09:17.230Z - debug: 5390
2015-05-19T11:09:17.421Z - debug: 5580
2015-05-19T11:09:17.437Z - debug: 5596
2015-05-19T11:09:17.441Z - debug: 5600
2015-05-19T11:09:17.513Z - debug: 5672
2015-05-19T11:09:17.569Z - debug: 5728
2015-05-19T11:09:17.658Z - debug: 5817
2015-05-19T11:09:17.697Z - debug: 5855
2015-05-19T11:09:17.708Z - debug: 5867
2015-05-19T11:09:17.712Z - debug: 5870
2015-05-19T11:09:17.732Z - debug: 5891
2015-05-19T11:09:17.805Z - debug: 5963
2015-05-19T11:09:17.852Z - debug: 6010
2015-05-19T11:09:17.890Z - debug: 6048
2015-05-19T11:09:17.985Z - debug: 6143
2015-05-19T11:09:17.989Z - debug: 6147
2015-05-19T11:09:18.013Z - debug: 6171
2015-05-19T11:09:18.016Z - debug: 6175
2015-05-19T11:09:18.031Z - debug: 6189
2015-05-19T11:09:18.170Z - debug: 6327
2015-05-19T11:09:18.196Z - debug: 6353
2015-05-19T11:09:18.205Z - debug: 6362
2015-05-19T11:09:18.209Z - debug: 6367
2015-05-19T11:09:18.224Z - debug: 6382
2015-05-19T11:09:18.317Z - debug: 6474
2015-05-19T11:09:18.360Z - debug: 6516
2015-05-19T11:09:18.369Z - debug: 6526
2015-05-19T11:09:18.433Z - debug: 6590
2015-05-19T11:09:18.460Z - debug: 6616
2015-05-19T11:09:18.513Z - debug: 6668
2015-05-19T11:09:18.541Z - debug: 6697
2015-05-19T11:09:18.553Z - debug: 6711
2015-05-19T11:09:18.586Z - debug: 6741
2015-05-19T11:09:18.672Z - debug: 6827
2015-05-19T11:09:18.688Z - debug: 6844
2015-05-19T11:09:18.693Z - debug: 6849
2015-05-19T11:09:18.729Z - debug: 6884
2015-05-19T11:09:18.817Z - debug: 6972
2015-05-19T11:09:18.823Z - debug: 6980
2015-05-19T11:09:18.828Z - debug: 6983
2015-05-19T11:09:18.882Z - debug: 7036
2015-05-19T11:09:18.919Z - debug: 7075
2015-05-19T11:09:19.016Z - debug: 7170
2015-05-19T11:09:19.020Z - debug: 7174
2015-05-19T11:09:19.043Z - debug: 7197
2015-05-19T11:09:19.066Z - debug: 7222
2015-05-19T11:09:19.177Z - debug: 7331
2015-05-19T11:09:19.182Z - debug: 7335
2015-05-19T11:09:19.189Z - debug: 7343
2015-05-19T11:09:19.189Z - debug: 7344
2015-05-19T11:09:19.191Z - debug: 7344
2015-05-19T11:09:19.280Z - debug: 7433
2015-05-19T11:09:19.340Z - debug: 7494
2015-05-19T11:09:19.344Z - debug: 7497
2015-05-19T11:09:19.358Z - debug: 7512
2015-05-19T11:09:19.362Z - debug: 7518
2015-05-19T11:09:19.455Z - debug: 7608
2015-05-19T11:09:19.499Z - debug: 7651
2015-05-19T11:09:19.504Z - debug: 7656
2015-05-19T11:09:19.515Z - debug: 7669
2015-05-19T11:09:19.569Z - debug: 7722
2015-05-19T11:09:19.574Z - debug: 7726
2015-05-19T11:09:19.574Z - debug: 7726
2015-05-19T11:09:19.667Z - debug: 7818
2015-05-19T11:09:19.672Z - debug: 7823
2015-05-19T11:09:19.678Z - debug: 7830
2015-05-19T11:09:19.689Z - debug: 7844
2015-05-19T11:09:19.716Z - debug: 7868
2015-05-19T11:09:19.835Z - debug: 7986
2015-05-19T11:09:19.839Z - debug: 7989
2015-05-19T11:09:19.845Z - debug: 7997
2015-05-19T11:09:19.978Z - debug: 8128
2015-05-19T11:09:19.989Z - debug: 8136
2015-05-19T11:09:19.995Z - debug: 8146
2015-05-19T11:09:19.999Z - debug: 8153
2015-05-19T11:09:20.012Z - debug: 8166
2015-05-19T11:09:20.023Z - debug: 8174
2015-05-19T11:09:20.026Z - debug: 8177
2015-05-19T11:09:20.116Z - debug: 8262
2015-05-19T11:09:20.127Z - debug: 8272
2015-05-19T11:09:20.136Z - debug: 8287
2015-05-19T11:09:20.154Z - debug: 8307
2015-05-19T11:09:20.179Z - debug: 8324
2015-05-19T11:09:20.262Z - debug: 8407
2015-05-19T11:09:20.275Z - debug: 8425
2015-05-19T11:09:20.279Z - debug: 8423
2015-05-19T11:09:20.306Z - debug: 8456
2015-05-19T11:09:20.309Z - debug: 8463
2015-05-19T11:09:20.396Z - debug: 8540
2015-05-19T11:09:20.422Z - debug: 8565
2015-05-19T11:09:20.424Z - debug: 8574
2015-05-19T11:09:20.441Z - debug: 8594
2015-05-19T11:09:20.452Z - debug: 8601
2015-05-19T11:09:20.455Z - debug: 8605
2015-05-19T11:09:20.461Z - debug: 8604
2015-05-19T11:09:20.549Z - debug: 8691
2015-05-19T11:09:20.555Z - debug: 8697
2015-05-19T11:09:20.565Z - debug: 8711
2015-05-19T11:09:20.598Z - debug: 8752
2015-05-19T11:09:20.602Z - debug: 8750
2015-05-19T11:09:20.659Z - debug: 8801
2015-05-19T11:09:20.689Z - debug: 8830
2015-05-19T11:09:20.701Z - debug: 8842
2015-05-19T11:09:20.707Z - debug: 8853
2015-05-19T11:09:20.712Z - debug: 8864
2015-05-19T11:09:20.752Z - debug: 8898
2015-05-19T11:09:20.798Z - debug: 8938
2015-05-19T11:09:20.829Z - debug: 8969
2015-05-19T11:09:20.844Z - debug: 8989
2015-05-19T11:09:20.850Z - debug: 8990
2015-05-19T11:09:20.869Z - debug: 9021
2015-05-19T11:09:20.880Z - debug: 9033
2015-05-19T11:09:20.893Z - debug: 9038
2015-05-19T11:09:20.939Z - debug: 9078
2015-05-19T11:09:20.965Z - debug: 9104
2015-05-19T11:09:20.979Z - debug: 9124
2015-05-19T11:09:20.984Z - debug: 9122
2015-05-19T11:09:21.051Z - debug: 9189
2015-05-19T11:09:21.057Z - debug: 9202
2015-05-19T11:09:21.057Z - debug: 9210
2015-05-19T11:09:21.096Z - debug: 9234
2015-05-19T11:09:21.112Z - debug: 9249
2015-05-19T11:09:21.121Z - debug: 9265
2015-05-19T11:09:21.130Z - debug: 9267
2015-05-19T11:09:21.133Z - debug: 9284
2015-05-19T11:09:21.195Z - debug: 9339
2015-05-19T11:09:21.200Z - debug: 9345
2015-05-19T11:09:21.239Z - debug: 9375
2015-05-19T11:09:21.247Z - debug: 9383
2015-05-19T11:09:21.270Z - debug: 9404
2015-05-19T11:09:21.283Z - debug: 9434
2015-05-19T11:09:21.334Z - debug: 9468
2015-05-19T11:09:21.337Z - debug: 9481
2015-05-19T11:09:21.348Z - debug: 9500
2015-05-19T11:09:21.352Z - debug: 9496
2015-05-19T11:09:21.378Z - debug: 9512
2015-05-19T11:09:21.385Z - debug: 9518
2015-05-19T11:09:21.416Z - debug: 9559
2015-05-19T11:09:21.419Z - debug: 9552
2015-05-19T11:09:21.470Z - debug: 9603
2015-05-19T11:09:21.475Z - debug: 9625
2015-05-19T11:09:21.490Z - debug: 9634
2015-05-19T11:09:21.517Z - debug: 9649
2015-05-19T11:09:21.522Z - debug: 9654
2015-05-19T11:09:21.554Z - debug: 9697
2015-05-19T11:09:21.562Z - debug: 9694
2015-05-19T11:09:21.575Z - debug: 9706
2015-05-19T11:09:21.622Z - debug: 9773
2015-05-19T11:09:21.635Z - debug: 9779
2015-05-19T11:09:21.656Z - debug: 9787
2015-05-19T11:09:21.683Z - debug: 9814
2015-05-19T11:09:21.688Z - debug: 9818
2015-05-19T11:09:21.691Z - debug: 9833
2015-05-19T11:09:21.716Z - debug: 9846
2015-05-19T11:09:21.720Z - debug: 9869
2015-05-19T11:09:21.751Z - debug: 9893
2015-05-19T11:09:21.778Z - debug: 9921
2015-05-19T11:09:21.786Z - debug: 9936
2015-05-19T11:09:21.790Z - debug: 9919
2015-05-19T11:09:21.820Z - debug: 9949
2015-05-19T11:09:21.830Z - debug: 9959
2015-05-19T11:09:21.864Z - debug: 10005
2015-05-19T11:09:21.870Z - debug: 9998
2015-05-19T11:09:21.884Z - debug: 10033
2015-05-19T11:09:21.928Z - debug: 10070
2015-05-19T11:09:21.931Z - debug: 10059
2015-05-19T11:09:21.949Z - debug: 10076
2015-05-19T11:09:21.984Z - debug: 10111
2015-05-19T11:09:21.987Z - debug: 10128
2015-05-19T11:09:22.015Z - debug: 10142
2015-05-19T11:09:22.019Z - debug: 10160
2015-05-19T11:09:22.046Z - debug: 10172
2015-05-19T11:09:22.060Z - debug: 10202
2015-05-19T11:09:22.064Z - debug: 10215
2015-05-19T11:09:22.089Z - debug: 10215
2015-05-19T11:09:22.123Z - debug: 10248
2015-05-19T11:09:22.130Z - debug: 10270
2015-05-19T11:09:22.152Z - debug: 10277
2015-05-19T11:09:22.156Z - debug: 10302
2015-05-19T11:09:22.180Z - debug: 10320
2015-05-19T11:09:22.183Z - debug: 10325
2015-05-19T11:09:22.186Z - debug: 10310
2015-05-19T11:09:22.228Z - debug: 10349
2015-05-19T11:09:22.260Z - debug: 10380
Ok, so it's not entirely increment but it's going up forever...
I would expect to get a list of almost the same number (queries should take almost the same time).
Anyone knows why the times keeps going up?
It's because you're not measuring just the query times.
The basic flow of this code is:
The for loop of 10000 iterations runs to completion, setting the start time for each iteration to the time each iteration occurred.
For the first 5 of those iterations (or whatever poolsize you're using with your MongoDB connection), their queries start as soon as their findOneAsync call is made.
As queries complete, their findOneAsync callbacks are put on the event queue and their connections are returned to the pool, allowing subsequent iterations' queries to start.
So all iterations' times include the time to complete the rest of the for loop after it, the time spent waiting for a connection in the pool to become available, and the time their findOneAsync callback spent waiting in the event queue.
If you want to get an accurate picture of how long the queries are taking, use MongoDB's profiling support.

Resources