Closed walshe closed 4 years ago
Hi @walshe , do you have the capacity to join a stacktrace of your error ?
Hi, sure
so last night I turned on some more logging, did a small request which succeeded, then did a big request which failed and right after did a small request again which succeeded.
Bonsai is returning me a 401 for the failure which makes no sense. I am convinced they are converting some other error into a 401 when the payload is above a certain size.. here is a failure trace:
2020-09-30 23:33:14.187 DEBUG 51804 --- [ XNIO-1 task-24] c.walsing.web.rest.NeighborhoodResource : Enter: updateNeighborhood() with argument[s] = [NeighborhoodDTO{id=1106, neighborhoodId=1035, name='Richards', xMin=-121.507787678634, xMax=-121.476745563585, xAvg=-121.49226662111, yMin=38.5828418731689, yMax=38.6020090411446, yAvg=38.5924254571568, cityId=24, cityName='Sacramento', ratedTags='[RatedTagDTO{id=208, rating=null, tags='[]'}, RatedTagDTO{id=209, rating=null, tags='[]'}, RatedTagDTO{id=72, rating=null, tags='[]'}, RatedTagDTO{id=177, rating=null, tags='[]'}, RatedTagDTO{id=302, rating=null, tags='[]'}, RatedTagDTO{id=141, rating=null, tags='[]'}, RatedTagDTO{id=42, rating=null, tags='[]'}, RatedTagDTO{id=395, rating=null, tags='[]'}, RatedTagDTO{id=423, rating=null, tags='[]'}, RatedTagDTO{id=88, rating=null, tags='[]'}, RatedTagDTO{id=285, rating=null, tags='[]'}, RatedTagDTO{id=71, rating=null, tags='[]'}, RatedTagDTO{id=490, rating=null, tags='[]'}, RatedTagDTO{id=49, rating=null, tags='[]'}, RatedTagDTO{id=394, rating=null, tags='[]'}, RatedTagDTO{id=144, rating=null, tags='[]'}, RatedTagDTO{id=180, rating=null, tags='[]'}, RatedTagDTO{id=48, rating=null, tags='[]'}, RatedTagDTO{id=174, rating=null, tags='[]'}, RatedTagDTO{id=489, rating=null, tags='[]'}, RatedTagDTO{id=287, rating=null, tags='[]'}, RatedTagDTO{id=351, rating=null, tags='[]'}, RatedTagDTO{id=421, rating=null, tags='[]'}, RatedTagDTO{id=469, rating=null, tags='[]'}, RatedTagDTO{id=470, rating=null, tags='[]'}, RatedTagDTO{id=143, rating=null, tags='[]'}, RatedTagDTO{id=447, rating=null, tags='[]'}, RatedTagDTO{id=290, rating=null, tags='[]'}, RatedTagDTO{id=305, rating=null, tags='[]'}, RatedTagDTO{id=452, rating=null, tags='[]'}, RatedTagDTO{id=93, rating=null, tags='[]'}, RatedTagDTO{id=47, rating=null, tags='[]'}, RatedTagDTO{id=488, rating=null, tags='[]'}, RatedTagDTO{id=487, rating=null, tags='[]'}, RatedTagDTO{id=30, rating=null, tags='[]'}, RatedTagDTO{id=449, rating=null, tags='[]'}, RatedTagDTO{id=392, rating=null, tags='[]'}, RatedTagDTO{id=92, rating=null, tags='[]'}, RatedTagDTO{id=281, rating=null, tags='[]'}, RatedTagDTO{id=179, rating=null, tags='[]'}, RatedTagDTO{id=391, rating=null, tags='[]'}, RatedTagDTO{id=486, rating=null, tags='[]'}, RatedTagDTO{id=303, rating=null, tags='[]'}, RatedTagDTO{id=44, rating=null, tags='[]'}, RatedTagDTO{id=176, rating=null, tags='[]'}, RatedTagDTO{id=450, rating=null, tags='[]'}, RatedTagDTO{id=41, rating=null, tags='[]'}, RatedTagDTO{id=206, rating=null, tags='[]'}, RatedTagDTO{id=95, rating=null, tags='[]'}, RatedTagDTO{id=87, rating=null, tags='[]'}, RatedTagDTO{id=175, rating=null, tags='[]'}, RatedTagDTO{id=26, rating=null, tags='[]'}, RatedTagDTO{id=89, rating=null, tags='[]'}, RatedTagDTO{id=422, rating=null, tags='[]'}, RatedTagDTO{id=182, rating=null, tags='[]'}, RatedTagDTO{id=43, rating=null, tags='[]'}, RatedTagDTO{id=173, rating=null, tags='[]'}, RatedTagDTO{id=181, rating=null, tags='[]'}, RatedTagDTO{id=90, rating=null, tags='[]'}, RatedTagDTO{id=284, rating=null, tags='[]'}, RatedTagDTO{id=185, rating=null, tags='[]'}, RatedTagDTO{id=45, rating=null, tags='[]'}, RatedTagDTO{id=454, rating=null, tags='[]'}, RatedTagDTO{id=29, rating=null, tags='[]'}, RatedTagDTO{id=183, rating=null, tags='[]'}, RatedTagDTO{id=352, rating=null, tags='[]'}, RatedTagDTO{id=355, rating=null, tags='[]'}, RatedTagDTO{id=145, rating=null, tags='[]'}, RatedTagDTO{id=94, rating=null, tags='[]'}, RatedTagDTO{id=288, rating=null, tags='[]'}, RatedTagDTO{id=425, rating=null, tags='[]'}, RatedTagDTO{id=424, rating=null, tags='[]'}, RatedTagDTO{id=184, rating=null, tags='[]'}, RatedTagDTO{id=446, rating=null, tags='[]'}, RatedTagDTO{id=171, rating=null, tags='[]'}, RatedTagDTO{id=453, rating=null, tags='[]'}, RatedTagDTO{id=354, rating=null, tags='[]'}, RatedTagDTO{id=27, rating=null, tags='[]'}, RatedTagDTO{id=210, rating=null, tags='[]'}, RatedTagDTO{id=207, rating=null, tags='[]'}, RatedTagDTO{id=172, rating=null, tags='[]'}, RatedTagDTO{id=304, rating=null, tags='[]'}, RatedTagDTO{id=50, rating=null, tags='[]'}, RatedTagDTO{id=91, rating=null, tags='[]'}, RatedTagDTO{id=393, rating=null, tags='[]'}, RatedTagDTO{id=289, rating=null, tags='[]'}, RatedTagDTO{id=178, rating=null, tags='[]'}, RatedTagDTO{id=46, rating=null, tags='[]'}, RatedTagDTO{id=28, rating=null, tags='[]'}, RatedTagDTO{id=448, rating=null, tags='[]'}, RatedTagDTO{id=283, rating=null, tags='[]'}, RatedTagDTO{id=86, rating=null, tags='[]'}, RatedTagDTO{id=455, rating=null, tags='[]'}, RatedTagDTO{id=282, rating=null, tags='[]'}, RatedTagDTO{id=142, rating=null, tags='[]'}, RatedTagDTO{id=451, rating=null, tags='[]'}, RatedTagDTO{id=353, rating=null, tags='[]'}, RatedTagDTO{id=286, rating=null, tags='[]'}, RatedTagDTO{id=301, rating=null, tags='[]'}]', describedTagCombos='[DescribedTagComboDTO{id=14, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=15, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=17, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=18, descriptor='null', tags='[]'}]'}]
2020-09-30 23:33:14.187 DEBUG 51804 --- [ XNIO-1 task-24] c.walsing.web.rest.NeighborhoodResource : REST request to update Neighborhood : NeighborhoodDTO{id=1106, neighborhoodId=1035, name='Richards', xMin=-121.507787678634, xMax=-121.476745563585, xAvg=-121.49226662111, yMin=38.5828418731689, yMax=38.6020090411446, yAvg=38.5924254571568, cityId=24, cityName='Sacramento', ratedTags='[RatedTagDTO{id=208, rating=null, tags='[]'}, RatedTagDTO{id=209, rating=null, tags='[]'}, RatedTagDTO{id=72, rating=null, tags='[]'}, RatedTagDTO{id=177, rating=null, tags='[]'}, RatedTagDTO{id=302, rating=null, tags='[]'}, RatedTagDTO{id=141, rating=null, tags='[]'}, RatedTagDTO{id=42, rating=null, tags='[]'}, RatedTagDTO{id=395, rating=null, tags='[]'}, RatedTagDTO{id=423, rating=null, tags='[]'}, RatedTagDTO{id=88, rating=null, tags='[]'}, RatedTagDTO{id=285, rating=null, tags='[]'}, RatedTagDTO{id=71, rating=null, tags='[]'}, RatedTagDTO{id=490, rating=null, tags='[]'}, RatedTagDTO{id=49, rating=null, tags='[]'}, RatedTagDTO{id=394, rating=null, tags='[]'}, RatedTagDTO{id=144, rating=null, tags='[]'}, RatedTagDTO{id=180, rating=null, tags='[]'}, RatedTagDTO{id=48, rating=null, tags='[]'}, RatedTagDTO{id=174, rating=null, tags='[]'}, RatedTagDTO{id=489, rating=null, tags='[]'}, RatedTagDTO{id=287, rating=null, tags='[]'}, RatedTagDTO{id=351, rating=null, tags='[]'}, RatedTagDTO{id=421, rating=null, tags='[]'}, RatedTagDTO{id=469, rating=null, tags='[]'}, RatedTagDTO{id=470, rating=null, tags='[]'}, RatedTagDTO{id=143, rating=null, tags='[]'}, RatedTagDTO{id=447, rating=null, tags='[]'}, RatedTagDTO{id=290, rating=null, tags='[]'}, RatedTagDTO{id=305, rating=null, tags='[]'}, RatedTagDTO{id=452, rating=null, tags='[]'}, RatedTagDTO{id=93, rating=null, tags='[]'}, RatedTagDTO{id=47, rating=null, tags='[]'}, RatedTagDTO{id=488, rating=null, tags='[]'}, RatedTagDTO{id=487, rating=null, tags='[]'}, RatedTagDTO{id=30, rating=null, tags='[]'}, RatedTagDTO{id=449, rating=null, tags='[]'}, RatedTagDTO{id=392, rating=null, tags='[]'}, RatedTagDTO{id=92, rating=null, tags='[]'}, RatedTagDTO{id=281, rating=null, tags='[]'}, RatedTagDTO{id=179, rating=null, tags='[]'}, RatedTagDTO{id=391, rating=null, tags='[]'}, RatedTagDTO{id=486, rating=null, tags='[]'}, RatedTagDTO{id=303, rating=null, tags='[]'}, RatedTagDTO{id=44, rating=null, tags='[]'}, RatedTagDTO{id=176, rating=null, tags='[]'}, RatedTagDTO{id=450, rating=null, tags='[]'}, RatedTagDTO{id=41, rating=null, tags='[]'}, RatedTagDTO{id=206, rating=null, tags='[]'}, RatedTagDTO{id=95, rating=null, tags='[]'}, RatedTagDTO{id=87, rating=null, tags='[]'}, RatedTagDTO{id=175, rating=null, tags='[]'}, RatedTagDTO{id=26, rating=null, tags='[]'}, RatedTagDTO{id=89, rating=null, tags='[]'}, RatedTagDTO{id=422, rating=null, tags='[]'}, RatedTagDTO{id=182, rating=null, tags='[]'}, RatedTagDTO{id=43, rating=null, tags='[]'}, RatedTagDTO{id=173, rating=null, tags='[]'}, RatedTagDTO{id=181, rating=null, tags='[]'}, RatedTagDTO{id=90, rating=null, tags='[]'}, RatedTagDTO{id=284, rating=null, tags='[]'}, RatedTagDTO{id=185, rating=null, tags='[]'}, RatedTagDTO{id=45, rating=null, tags='[]'}, RatedTagDTO{id=454, rating=null, tags='[]'}, RatedTagDTO{id=29, rating=null, tags='[]'}, RatedTagDTO{id=183, rating=null, tags='[]'}, RatedTagDTO{id=352, rating=null, tags='[]'}, RatedTagDTO{id=355, rating=null, tags='[]'}, RatedTagDTO{id=145, rating=null, tags='[]'}, RatedTagDTO{id=94, rating=null, tags='[]'}, RatedTagDTO{id=288, rating=null, tags='[]'}, RatedTagDTO{id=425, rating=null, tags='[]'}, RatedTagDTO{id=424, rating=null, tags='[]'}, RatedTagDTO{id=184, rating=null, tags='[]'}, RatedTagDTO{id=446, rating=null, tags='[]'}, RatedTagDTO{id=171, rating=null, tags='[]'}, RatedTagDTO{id=453, rating=null, tags='[]'}, RatedTagDTO{id=354, rating=null, tags='[]'}, RatedTagDTO{id=27, rating=null, tags='[]'}, RatedTagDTO{id=210, rating=null, tags='[]'}, RatedTagDTO{id=207, rating=null, tags='[]'}, RatedTagDTO{id=172, rating=null, tags='[]'}, RatedTagDTO{id=304, rating=null, tags='[]'}, RatedTagDTO{id=50, rating=null, tags='[]'}, RatedTagDTO{id=91, rating=null, tags='[]'}, RatedTagDTO{id=393, rating=null, tags='[]'}, RatedTagDTO{id=289, rating=null, tags='[]'}, RatedTagDTO{id=178, rating=null, tags='[]'}, RatedTagDTO{id=46, rating=null, tags='[]'}, RatedTagDTO{id=28, rating=null, tags='[]'}, RatedTagDTO{id=448, rating=null, tags='[]'}, RatedTagDTO{id=283, rating=null, tags='[]'}, RatedTagDTO{id=86, rating=null, tags='[]'}, RatedTagDTO{id=455, rating=null, tags='[]'}, RatedTagDTO{id=282, rating=null, tags='[]'}, RatedTagDTO{id=142, rating=null, tags='[]'}, RatedTagDTO{id=451, rating=null, tags='[]'}, RatedTagDTO{id=353, rating=null, tags='[]'}, RatedTagDTO{id=286, rating=null, tags='[]'}, RatedTagDTO{id=301, rating=null, tags='[]'}]', describedTagCombos='[DescribedTagComboDTO{id=14, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=15, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=17, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=18, descriptor='null', tags='[]'}]'}
2020-09-30 23:33:14.187 DEBUG 51804 --- [ XNIO-1 task-24] com.walsing.service.NeighborhoodService : Enter: save() with argument[s] = [NeighborhoodDTO{id=1106, neighborhoodId=1035, name='Richards', xMin=-121.507787678634, xMax=-121.476745563585, xAvg=-121.49226662111, yMin=38.5828418731689, yMax=38.6020090411446, yAvg=38.5924254571568, cityId=24, cityName='Sacramento', ratedTags='[RatedTagDTO{id=208, rating=null, tags='[]'}, RatedTagDTO{id=209, rating=null, tags='[]'}, RatedTagDTO{id=72, rating=null, tags='[]'}, RatedTagDTO{id=177, rating=null, tags='[]'}, RatedTagDTO{id=302, rating=null, tags='[]'}, RatedTagDTO{id=141, rating=null, tags='[]'}, RatedTagDTO{id=42, rating=null, tags='[]'}, RatedTagDTO{id=395, rating=null, tags='[]'}, RatedTagDTO{id=423, rating=null, tags='[]'}, RatedTagDTO{id=88, rating=null, tags='[]'}, RatedTagDTO{id=285, rating=null, tags='[]'}, RatedTagDTO{id=71, rating=null, tags='[]'}, RatedTagDTO{id=490, rating=null, tags='[]'}, RatedTagDTO{id=49, rating=null, tags='[]'}, RatedTagDTO{id=394, rating=null, tags='[]'}, RatedTagDTO{id=144, rating=null, tags='[]'}, RatedTagDTO{id=180, rating=null, tags='[]'}, RatedTagDTO{id=48, rating=null, tags='[]'}, RatedTagDTO{id=174, rating=null, tags='[]'}, RatedTagDTO{id=489, rating=null, tags='[]'}, RatedTagDTO{id=287, rating=null, tags='[]'}, RatedTagDTO{id=351, rating=null, tags='[]'}, RatedTagDTO{id=421, rating=null, tags='[]'}, RatedTagDTO{id=469, rating=null, tags='[]'}, RatedTagDTO{id=470, rating=null, tags='[]'}, RatedTagDTO{id=143, rating=null, tags='[]'}, RatedTagDTO{id=447, rating=null, tags='[]'}, RatedTagDTO{id=290, rating=null, tags='[]'}, RatedTagDTO{id=305, rating=null, tags='[]'}, RatedTagDTO{id=452, rating=null, tags='[]'}, RatedTagDTO{id=93, rating=null, tags='[]'}, RatedTagDTO{id=47, rating=null, tags='[]'}, RatedTagDTO{id=488, rating=null, tags='[]'}, RatedTagDTO{id=487, rating=null, tags='[]'}, RatedTagDTO{id=30, rating=null, tags='[]'}, RatedTagDTO{id=449, rating=null, tags='[]'}, RatedTagDTO{id=392, rating=null, tags='[]'}, RatedTagDTO{id=92, rating=null, tags='[]'}, RatedTagDTO{id=281, rating=null, tags='[]'}, RatedTagDTO{id=179, rating=null, tags='[]'}, RatedTagDTO{id=391, rating=null, tags='[]'}, RatedTagDTO{id=486, rating=null, tags='[]'}, RatedTagDTO{id=303, rating=null, tags='[]'}, RatedTagDTO{id=44, rating=null, tags='[]'}, RatedTagDTO{id=176, rating=null, tags='[]'}, RatedTagDTO{id=450, rating=null, tags='[]'}, RatedTagDTO{id=41, rating=null, tags='[]'}, RatedTagDTO{id=206, rating=null, tags='[]'}, RatedTagDTO{id=95, rating=null, tags='[]'}, RatedTagDTO{id=87, rating=null, tags='[]'}, RatedTagDTO{id=175, rating=null, tags='[]'}, RatedTagDTO{id=26, rating=null, tags='[]'}, RatedTagDTO{id=89, rating=null, tags='[]'}, RatedTagDTO{id=422, rating=null, tags='[]'}, RatedTagDTO{id=182, rating=null, tags='[]'}, RatedTagDTO{id=43, rating=null, tags='[]'}, RatedTagDTO{id=173, rating=null, tags='[]'}, RatedTagDTO{id=181, rating=null, tags='[]'}, RatedTagDTO{id=90, rating=null, tags='[]'}, RatedTagDTO{id=284, rating=null, tags='[]'}, RatedTagDTO{id=185, rating=null, tags='[]'}, RatedTagDTO{id=45, rating=null, tags='[]'}, RatedTagDTO{id=454, rating=null, tags='[]'}, RatedTagDTO{id=29, rating=null, tags='[]'}, RatedTagDTO{id=183, rating=null, tags='[]'}, RatedTagDTO{id=352, rating=null, tags='[]'}, RatedTagDTO{id=355, rating=null, tags='[]'}, RatedTagDTO{id=145, rating=null, tags='[]'}, RatedTagDTO{id=94, rating=null, tags='[]'}, RatedTagDTO{id=288, rating=null, tags='[]'}, RatedTagDTO{id=425, rating=null, tags='[]'}, RatedTagDTO{id=424, rating=null, tags='[]'}, RatedTagDTO{id=184, rating=null, tags='[]'}, RatedTagDTO{id=446, rating=null, tags='[]'}, RatedTagDTO{id=171, rating=null, tags='[]'}, RatedTagDTO{id=453, rating=null, tags='[]'}, RatedTagDTO{id=354, rating=null, tags='[]'}, RatedTagDTO{id=27, rating=null, tags='[]'}, RatedTagDTO{id=210, rating=null, tags='[]'}, RatedTagDTO{id=207, rating=null, tags='[]'}, RatedTagDTO{id=172, rating=null, tags='[]'}, RatedTagDTO{id=304, rating=null, tags='[]'}, RatedTagDTO{id=50, rating=null, tags='[]'}, RatedTagDTO{id=91, rating=null, tags='[]'}, RatedTagDTO{id=393, rating=null, tags='[]'}, RatedTagDTO{id=289, rating=null, tags='[]'}, RatedTagDTO{id=178, rating=null, tags='[]'}, RatedTagDTO{id=46, rating=null, tags='[]'}, RatedTagDTO{id=28, rating=null, tags='[]'}, RatedTagDTO{id=448, rating=null, tags='[]'}, RatedTagDTO{id=283, rating=null, tags='[]'}, RatedTagDTO{id=86, rating=null, tags='[]'}, RatedTagDTO{id=455, rating=null, tags='[]'}, RatedTagDTO{id=282, rating=null, tags='[]'}, RatedTagDTO{id=142, rating=null, tags='[]'}, RatedTagDTO{id=451, rating=null, tags='[]'}, RatedTagDTO{id=353, rating=null, tags='[]'}, RatedTagDTO{id=286, rating=null, tags='[]'}, RatedTagDTO{id=301, rating=null, tags='[]'}]', describedTagCombos='[DescribedTagComboDTO{id=14, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=15, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=17, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=18, descriptor='null', tags='[]'}]'}]
2020-09-30 23:33:14.187 DEBUG 51804 --- [ XNIO-1 task-24] com.walsing.service.NeighborhoodService : Request to save Neighborhood : NeighborhoodDTO{id=1106, neighborhoodId=1035, name='Richards', xMin=-121.507787678634, xMax=-121.476745563585, xAvg=-121.49226662111, yMin=38.5828418731689, yMax=38.6020090411446, yAvg=38.5924254571568, cityId=24, cityName='Sacramento', ratedTags='[RatedTagDTO{id=208, rating=null, tags='[]'}, RatedTagDTO{id=209, rating=null, tags='[]'}, RatedTagDTO{id=72, rating=null, tags='[]'}, RatedTagDTO{id=177, rating=null, tags='[]'}, RatedTagDTO{id=302, rating=null, tags='[]'}, RatedTagDTO{id=141, rating=null, tags='[]'}, RatedTagDTO{id=42, rating=null, tags='[]'}, RatedTagDTO{id=395, rating=null, tags='[]'}, RatedTagDTO{id=423, rating=null, tags='[]'}, RatedTagDTO{id=88, rating=null, tags='[]'}, RatedTagDTO{id=285, rating=null, tags='[]'}, RatedTagDTO{id=71, rating=null, tags='[]'}, RatedTagDTO{id=490, rating=null, tags='[]'}, RatedTagDTO{id=49, rating=null, tags='[]'}, RatedTagDTO{id=394, rating=null, tags='[]'}, RatedTagDTO{id=144, rating=null, tags='[]'}, RatedTagDTO{id=180, rating=null, tags='[]'}, RatedTagDTO{id=48, rating=null, tags='[]'}, RatedTagDTO{id=174, rating=null, tags='[]'}, RatedTagDTO{id=489, rating=null, tags='[]'}, RatedTagDTO{id=287, rating=null, tags='[]'}, RatedTagDTO{id=351, rating=null, tags='[]'}, RatedTagDTO{id=421, rating=null, tags='[]'}, RatedTagDTO{id=469, rating=null, tags='[]'}, RatedTagDTO{id=470, rating=null, tags='[]'}, RatedTagDTO{id=143, rating=null, tags='[]'}, RatedTagDTO{id=447, rating=null, tags='[]'}, RatedTagDTO{id=290, rating=null, tags='[]'}, RatedTagDTO{id=305, rating=null, tags='[]'}, RatedTagDTO{id=452, rating=null, tags='[]'}, RatedTagDTO{id=93, rating=null, tags='[]'}, RatedTagDTO{id=47, rating=null, tags='[]'}, RatedTagDTO{id=488, rating=null, tags='[]'}, RatedTagDTO{id=487, rating=null, tags='[]'}, RatedTagDTO{id=30, rating=null, tags='[]'}, RatedTagDTO{id=449, rating=null, tags='[]'}, RatedTagDTO{id=392, rating=null, tags='[]'}, RatedTagDTO{id=92, rating=null, tags='[]'}, RatedTagDTO{id=281, rating=null, tags='[]'}, RatedTagDTO{id=179, rating=null, tags='[]'}, RatedTagDTO{id=391, rating=null, tags='[]'}, RatedTagDTO{id=486, rating=null, tags='[]'}, RatedTagDTO{id=303, rating=null, tags='[]'}, RatedTagDTO{id=44, rating=null, tags='[]'}, RatedTagDTO{id=176, rating=null, tags='[]'}, RatedTagDTO{id=450, rating=null, tags='[]'}, RatedTagDTO{id=41, rating=null, tags='[]'}, RatedTagDTO{id=206, rating=null, tags='[]'}, RatedTagDTO{id=95, rating=null, tags='[]'}, RatedTagDTO{id=87, rating=null, tags='[]'}, RatedTagDTO{id=175, rating=null, tags='[]'}, RatedTagDTO{id=26, rating=null, tags='[]'}, RatedTagDTO{id=89, rating=null, tags='[]'}, RatedTagDTO{id=422, rating=null, tags='[]'}, RatedTagDTO{id=182, rating=null, tags='[]'}, RatedTagDTO{id=43, rating=null, tags='[]'}, RatedTagDTO{id=173, rating=null, tags='[]'}, RatedTagDTO{id=181, rating=null, tags='[]'}, RatedTagDTO{id=90, rating=null, tags='[]'}, RatedTagDTO{id=284, rating=null, tags='[]'}, RatedTagDTO{id=185, rating=null, tags='[]'}, RatedTagDTO{id=45, rating=null, tags='[]'}, RatedTagDTO{id=454, rating=null, tags='[]'}, RatedTagDTO{id=29, rating=null, tags='[]'}, RatedTagDTO{id=183, rating=null, tags='[]'}, RatedTagDTO{id=352, rating=null, tags='[]'}, RatedTagDTO{id=355, rating=null, tags='[]'}, RatedTagDTO{id=145, rating=null, tags='[]'}, RatedTagDTO{id=94, rating=null, tags='[]'}, RatedTagDTO{id=288, rating=null, tags='[]'}, RatedTagDTO{id=425, rating=null, tags='[]'}, RatedTagDTO{id=424, rating=null, tags='[]'}, RatedTagDTO{id=184, rating=null, tags='[]'}, RatedTagDTO{id=446, rating=null, tags='[]'}, RatedTagDTO{id=171, rating=null, tags='[]'}, RatedTagDTO{id=453, rating=null, tags='[]'}, RatedTagDTO{id=354, rating=null, tags='[]'}, RatedTagDTO{id=27, rating=null, tags='[]'}, RatedTagDTO{id=210, rating=null, tags='[]'}, RatedTagDTO{id=207, rating=null, tags='[]'}, RatedTagDTO{id=172, rating=null, tags='[]'}, RatedTagDTO{id=304, rating=null, tags='[]'}, RatedTagDTO{id=50, rating=null, tags='[]'}, RatedTagDTO{id=91, rating=null, tags='[]'}, RatedTagDTO{id=393, rating=null, tags='[]'}, RatedTagDTO{id=289, rating=null, tags='[]'}, RatedTagDTO{id=178, rating=null, tags='[]'}, RatedTagDTO{id=46, rating=null, tags='[]'}, RatedTagDTO{id=28, rating=null, tags='[]'}, RatedTagDTO{id=448, rating=null, tags='[]'}, RatedTagDTO{id=283, rating=null, tags='[]'}, RatedTagDTO{id=86, rating=null, tags='[]'}, RatedTagDTO{id=455, rating=null, tags='[]'}, RatedTagDTO{id=282, rating=null, tags='[]'}, RatedTagDTO{id=142, rating=null, tags='[]'}, RatedTagDTO{id=451, rating=null, tags='[]'}, RatedTagDTO{id=353, rating=null, tags='[]'}, RatedTagDTO{id=286, rating=null, tags='[]'}, RatedTagDTO{id=301, rating=null, tags='[]'}]', describedTagCombos='[DescribedTagComboDTO{id=14, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=15, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=17, descriptor='null', tags='[]'}, DescribedTagComboDTO{id=18, descriptor='null', tags='[]'}]'}
2020-09-30 23:33:14.226 DEBUG 51804 --- [ XNIO-1 task-24] io.searchbox.client.http.JestHttpClient : PUT method created based on client request
2020-09-30 23:33:14.227 DEBUG 51804 --- [ XNIO-1 task-24] io.searchbox.client.http.JestHttpClient : Request method=PUT url=https://jlpeoons99:hlbrpquev0@apple-42460266.us-east-1.bonsaisearch.net:443/neighborhood/neighborhood/1106
2020-09-30 23:33:14.227 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {s}->https://apple-42460266.us-east-1.bonsaisearch.net:443][total available: 1; route allocated: 1 of 50; total allocated: 1 of 50]
2020-09-30 23:33:14.232 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-0: Close connection
2020-09-30 23:33:14.234 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 1][route: {s}->https://apple-42460266.us-east-1.bonsaisearch.net:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2020-09-30 23:33:14.234 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Opening connection {s}->https://apple-42460266.us-east-1.bonsaisearch.net:443
2020-09-30 23:33:14.324 DEBUG 51804 --- [ XNIO-1 task-24] .i.c.DefaultHttpClientConnectionOperator : Connecting to apple-42460266.us-east-1.bonsaisearch.net/52.3.47.70:443
2020-09-30 23:33:14.709 DEBUG 51804 --- [ XNIO-1 task-24] jdk.event.security : ValidationChain: -1472444962, -1011578998, 393347736
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] jdk.event.security : TLSHandshake: apple-42460266.us-east-1.bonsaisearch.net:443, TLSv1.2, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 393347736
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] .i.c.DefaultHttpClientConnectionOperator : Connection established 192.168.1.104:64605<->52.3.47.70:443
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-1: set socket timeout to 20000
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Executing request PUT /neighborhood/neighborhood/1106 HTTP/1.1
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Target auth state: UNCHALLENGED
2020-09-30 23:33:14.829 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Proxy auth state: UNCHALLENGED
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Connection can be kept alive indefinitely
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.auth.HttpAuthenticator : Authentication required
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.auth.HttpAuthenticator : apple-42460266.us-east-1.bonsaisearch.net:443 requested authentication
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, CredSSP, Digest, Basic]
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Challenge for Negotiate authentication scheme not available
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Challenge for Kerberos authentication scheme not available
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Challenge for NTLM authentication scheme not available
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Challenge for CredSSP authentication scheme not available
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.h.i.c.TargetAuthenticationStrategy : Challenge for Digest authentication scheme not available
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.auth.HttpAuthenticator : Selected authentication options: [BASIC [complete=true]]
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-1: set socket timeout to 20000
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Executing request PUT /neighborhood/neighborhood/1106 HTTP/1.1
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Target auth state: CHALLENGED
2020-09-30 23:33:15.006 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.auth.HttpAuthenticator : Generating response to an authentication challenge using basic scheme
2020-09-30 23:33:15.007 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Proxy auth state: UNCHALLENGED
2020-09-30 23:33:15.008 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-1: Close connection
2020-09-30 23:33:15.008 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-1: Shutdown connection
2020-09-30 23:33:15.009 DEBUG 51804 --- [ XNIO-1 task-24] o.a.http.impl.execchain.MainClientExec : Connection discarded
2020-09-30 23:33:15.009 DEBUG 51804 --- [ XNIO-1 task-24] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 1][route: {s}->https://apple-42460266.us-east-1.bonsaisearch.net:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2020-09-30 23:33:15.017 ERROR 51804 --- [ XNIO-1 task-24] com.walsing.service.NeighborhoodService : Exception in save() with cause = 'org.apache.http.NoHttpResponseException: apple-42460266.us-east-1.bonsaisearch.net:443 failed to respond' and exception = 'failed to execute action'
org.springframework.data.elasticsearch.ElasticsearchException: failed to execute action
btw I got this just now from the guys at Bonsai who are helping me chase down the issue:
That looks to be a simple matter of pre-emptive auth on the request (e.g., https://gist.github.com/dansimpson/1ec7a95a426a8e86d837a24ea704ef8e). JEST uses apache httpClient which does not do pre-emptive authentication by default. Instead, it first sends an an unauthenticated request and expects a 401 response back with a WWW-authenticate header indicating the scheme to use.
These are not harmful, other than the time and connection overhead of one extra request and round-trip. However, reducing these would at least have the benefit of reducing noise and isolating other potential problems with 401s.
@VanRoy I suggest taking a look at this example: https://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java to see how to do preemptive authentication.
I tried theor suggestion in my jhipster application and amazingly it works:
I am confused though 😕
package com.walsing.config;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.github.vanroy.springdata.jest.JestElasticsearchTemplate;
import com.github.vanroy.springdata.jest.mapper.DefaultJestResultsMapper;
import io.searchbox.client.JestClient;
import io.searchbox.client.JestClientFactory;
import io.searchbox.client.config.HttpClientConfig;
import org.apache.http.HttpHost;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.EntityMapper;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
import org.springframework.data.mapping.MappingException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableConfigurationProperties(ElasticsearchProperties.class)
public class ElasticsearchConfiguration {
private ObjectMapper mapper;
public ElasticsearchConfiguration(ObjectMapper mapper) {
this.mapper = mapper;
}
@Bean
public EntityMapper getEntityMapper() {
return new CustomEntityMapper(mapper);
}
@Bean
@Primary
public ElasticsearchOperations elasticsearchTemplate(JestClient jestClient,
ElasticsearchConverter elasticsearchConverter,
SimpleElasticsearchMappingContext mappingContext,
EntityMapper entityMapper) {
HttpClientConfig config = new HttpClientConfig.Builder("https://xxxxx.us-east-1.bonsaisearch.net")
.multiThreaded(true)
.connTimeout(10000)
.maxConnectionIdleTime(60, TimeUnit.SECONDS)
.requestCompressionEnabled(true)
.defaultCredentials("yyyyy", "pppppp")
.setPreemptiveAuth(new HttpHost("xxxxxx.us-east-1.bonsaisearch.net"))
.build();
JestClientFactory jestClientFactory = new JestClientFactory();
JestClientFactory factory = new JestClientFactory();
factory.setHttpClientConfig(config);
JestClient client = factory.getObject();
return new JestElasticsearchTemplate(
client,
elasticsearchConverter,
new DefaultJestResultsMapper(mappingContext, entityMapper));
}
public class CustomEntityMapper implements EntityMapper {
private ObjectMapper objectMapper;
public CustomEntityMapper(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
objectMapper.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, true);
objectMapper.configure(SerializationFeature.INDENT_OUTPUT, false);
objectMapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true);
}
@Override
public String mapToString(Object object) throws IOException {
return objectMapper.writeValueAsString(object);
}
@Override
public <T> T mapToObject(String source, Class<T> clazz) throws IOException {
return objectMapper.readValue(source, clazz);
}
@Override
public Map<String, Object> mapObject(Object source) {
try {
return objectMapper.readValue(mapToString(source), HashMap.class);
} catch (IOException e) {
throw new MappingException(e.getMessage(), e);
}
}
@Override
public <T> T readObject(Map<String, Object> source, Class<T> targetType) {
try {
return mapToObject(mapToString(source), targetType);
} catch (IOException e) {
throw new MappingException(e.getMessage(), e);
}
}
}
}
Hi @walshe , thanks for your investigation. Do you think it could useful that I add a new preemptiveAuth
option available in application.yml to cover your issue ?
Hi,
yes it might be a good idea, I guess other folks are going to face this issue too. I still cant really understand why I just get it when my payload goes above a certain size
@walshe I implement this option in branch preemptive-auth
. Do you have the possiblity to test this branch on your Bonsai account to validate the fix ?
sure.. whats the easiest way for me to try this in my jhipster application ?
@walshe I think that the easy way is
sorry for delay..trying now..
after clean install , I should change following to 3.3.3-SNAPSHOT ?
<dependency>
<groupId>com.github.vanroy</groupId>
<artifactId>spring-boot-starter-data-jest</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
@VanRoy
so far it seems to work.. but I am confused because I did not set any property to set preemtive auth = true.. all i did was use the uri in my spring boot config file:
data:
jest:
uris: https://username:password0@apple-xxxxxx.us-east-1.bonsaisearch.net:443
readTimeout : 20000
Hi @walshe , Thanks for your feedback. Indeed, It should not works without the property preemtive-auth
, the default value is false
for this property.
so can I add this in the spring boot config file and it will get set automatically or do I need to do some other manual coding ?
@walshe You can just add it in your Spring application.yaml. Anyway, I just released the version 3.3.3 with the preemptive auth implementation. You can see the detail of implementation here : https://github.com/VanRoy/spring-data-jest/commit/9cb38e5bba1f0e749911a80a3c8871d5dd3cc42b
so I should add:
preemtive-auth : true
data:
jest:
uris: https://username:password0@apple-xxxxxx.us-east-1.bonsaisearch.net:443
preemtive-auth : true
readTimeout : 20000
?
@walshe Exactly, but take care. data.jest
need to be in spring
and the good spell is preemptive-auth
. Just another detail, the preemptive-auth is only activated if username and password is defined in properties ( not in URL ).
spring:
data:
jest:
uris: https://apple-xxxxxx.us-east-1.bonsaisearch.net:443
username: xxx
password: xxx
preemptive-auth: true
read-timeout : 20000
ok I tested and it works a lot better now !
super work.. thanks very much!!
Hi,
I am using JHipster which is using Jest... I am having some comms issues on heroku where the bonsai url env var is of the form https://accesskey>:secret@<url:443
Can the jest client handle this kind of connection url format ?