错误: HTTPS请求报错Error Code=-999 "cancelled"

本文介绍了一次线上App因公司SSL证书失效导致的所有网络请求失败事件。详细分析了问题原因,并给出了三种解决方案:更新有效证书、配置AppTransportSecuritySettings参数及调整AFN参数。

错误

Error Domain=NSURLErrorDomain Code=-999 “cancelled” UserInfo…….

原因

今天早上刚到公司, 听到一个恶讯, 线上App所有的请求都请求错误了。公司主要的域名下的网络访问全部出问题了, 但是仅仅是iOS端没有问题, 安卓设备用户依然可以正常访问。
因为并不是用户手动进行网络请求取消操作的, 所以此原因排除。还有种可能就是HTTPS的证书问题。经过一系列查证后, 发现公司的SSL证书失效了, 导致此问题。

因为本项目使用的AFN进行网络请求的, 所以以下这个方法导致了请求被取消。

/**
 Whether or not the specified server trust should be accepted, based on the security policy.

 This method should be used when responding to an authentication challenge from a server.

 @param serverTrust The X.509 certificate trust of the server.
 @param domain The domain of serverTrust. If `nil`, the domain will not be validated.

 @return Whether or not to trust the server.
 */
- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
                  forDomain:(nullable NSString *)domain;

证书无效后, 上面方法返回NO, 从而执行

disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;

最终导致, 当前的请求被cancel。

解决方案

1.及时将有效的证书部署于所使用的环境中。
2.通过plist文件中设置App Transport Security Settings中的参数, 比如Allow Arbitrary Loads 或者白名单。
3.对AFN中的参数设置, 允许不进行证书验证, 来规避 evaluateServerTrust: forDomain:方法的验证不通过的问题。

AFSecurityPolicy *securityPolicy = [AFSecurityPolicy defaultPolicy];
securityPolicy.validatesDomainName = NO;
securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy = securityPolicy;

最好的解决方案是及时将有效的证书部署于所使用的环境中。如果你的应用不涉及到过多的安全或者不重视此问题, 也可以在苹果没有硬性要求ATS之前通过后面的两个方法来规避。不过, 从苹果之前对ATS的要求情况来看, 也不是长久之计。

2025-09-24 16:01:43.664 [reactor-http-nio-6] DEBUG reactor.netty.http.server.HttpServerOperations - [50206d33, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] New http connection, requesting read 2025-09-24 16:01:43.664 [reactor-http-nio-6] DEBUG reactor.netty.transport.TransportConfig - [50206d33, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] Initialized pipeline DefaultChannelPipeline{(reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.server.HttpTrafficHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)} 2025-09-24 16:01:43.665 [reactor-http-nio-6] DEBUG reactor.netty.http.server.HttpServerOperations - [50206d33, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] Increasing pending responses, now 1 2025-09-24 16:01:43.665 [reactor-http-nio-6] DEBUG reactor.netty.http.server.HttpServer - [50206d33-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@f732ab5 2025-09-24 16:01:43.665 [reactor-http-nio-6] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [50206d33-13] HTTP PUT "/master/shipperPart/updateBindings" 2025-09-24 16:01:43.665 [reactor-http-nio-6] DEBUG o.s.w.r.r.m.a.RequestMappingHandlerMapping - [50206d33-13] Mapped to com.hvlink.controller.ShipperPartController#updateBindings(ShipperPartParam) 2025-09-24 16:01:43.666 [reactor-http-nio-6] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [50206d33-13] Content-Type:application/json 2025-09-24 16:01:43.666 [reactor-http-nio-6] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [50206d33-13] 0..1 [com.hvlink.entity.param.master.ShipperPartParam] 2025-09-24 16:01:43.666 [reactor-http-nio-6] DEBUG reactor.netty.channel.FluxReceive - [50206d33-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] [terminated=false, cancelled=false, pending=0, error=null]: subscribing inbound receiver 2025-09-24 16:01:43.667 [reactor-http-nio-6] DEBUG o.s.http.codec.json.Jackson2JsonDecoder - [50206d33-13] Decoded [ShipperPartParam(shipperId=28, partIds=[456, 530])] ShipperPartParam(shipperId=28, partIds=[456, 530]) 2025-09-24 16:01:43.667 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [com.hvlink.service.impl.ShipperPartServiceImpl.updateShipperParts]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-java.lang.Exception 2025-09-24 16:01:43.667 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] for JDBC transaction 2025-09-24 16:01:43.667 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] to manual commit 2025-09-24 16:01:43.683 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 2025-09-24 16:01:43.683 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6eda94a6] 2025-09-24 16:01:43.683 [reactor-http-nio-6] DEBUG o.m.spring.transaction.SpringManagedTransaction - JDBC Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] will be managed by Spring 2025-09-24 16:01:43.683 [reactor-http-nio-6] DEBUG c.h.m.m.ShipperPartMapper.selectPartIdsByShipperId - ==> Preparing: SELECT part_id FROM tm_shipper_part WHERE shipper_id = ? 2025-09-24 16:01:43.683 [reactor-http-nio-6] DEBUG c.h.m.m.ShipperPartMapper.selectPartIdsByShipperId - ==> Parameters: 28(Integer) 2025-09-24 16:01:43.694 [reactor-http-nio-6] DEBUG c.h.m.m.ShipperPartMapper.selectPartIdsByShipperId - <== Total: 2 2025-09-24 16:01:43.694 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6eda94a6] 2025-09-24 16:01:43.694 [reactor-http-nio-6] INFO com.hvlink.service.impl.ShipperPartServiceImpl - 发货方28绑定更新: 新增0个, 删除0个 2025-09-24 16:01:43.694 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6eda94a6] 2025-09-24 16:01:43.695 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6eda94a6] 2025-09-24 16:01:43.695 [reactor-http-nio-6] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6eda94a6] 2025-09-24 16:01:43.695 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit 2025-09-24 16:01:43.695 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] 2025-09-24 16:01:43.784 [reactor-http-nio-6] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] after transaction 2025-09-24 16:01:43.785 [reactor-http-nio-6] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [50206d33-13] Using 'application/json' given [application/json, text/plain, */*] and supported [application/json, application/*+json, application/x-ndjson, text/event-stream] 2025-09-24 16:01:43.785 [reactor-http-nio-6] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [50206d33-13] 0..1 [com.hvlink.common.Result<java.lang.String>] 2025-09-24 16:01:43.785 [reactor-http-nio-6] DEBUG o.s.http.codec.json.Jackson2JsonEncoder - [50206d33-13] Encoding [Result(status=200, msg=成功, data=绑定关系更新成功, timestamp=1758700903784)] 2025-09-24 16:01:43.785 [reactor-http-nio-6] DEBUG reactor.netty.http.server.HttpServerOperations - [50206d33-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] Detected non persistent http connection, preparing to close 2025-09-24 16:01:43.786 [reactor-http-nio-6] DEBUG reactor.netty.http.server.HttpServerOperations - [50206d33-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] Last HTTP packet was sent, terminating the channel 2025-09-24 16:01:43.786 [reactor-http-nio-6] DEBUG reactor.netty.channel.ChannelOperations - [50206d33-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61997] [HttpServer] Channel inbound receiver cancelled (operation cancelled). 2025-09-24 16:01:43.786 [reactor-http-nio-6] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [50206d33-13] Completed 200 OK 2025-09-24 16:01:43.914 [reactor-http-nio-7] DEBUG reactor.netty.http.server.HttpServerOperations - [e34ccef0, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] New http connection, requesting read 2025-09-24 16:01:43.915 [reactor-http-nio-7] DEBUG reactor.netty.transport.TransportConfig - [e34ccef0, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] Initialized pipeline DefaultChannelPipeline{(reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.server.HttpTrafficHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)} 2025-09-24 16:01:43.915 [reactor-http-nio-7] DEBUG reactor.netty.http.server.HttpServerOperations - [e34ccef0, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] Increasing pending responses, now 1 2025-09-24 16:01:43.915 [reactor-http-nio-7] DEBUG reactor.netty.http.server.HttpServer - [e34ccef0-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@f732ab5 2025-09-24 16:01:43.916 [reactor-http-nio-7] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [e34ccef0-14] HTTP POST "/master/shipperPart/listPartsWithStatus?supplierId=1&shipperId=28&spliceDesc=" 2025-09-24 16:01:43.916 [reactor-http-nio-7] DEBUG o.s.w.r.r.m.a.RequestMappingHandlerMapping - [e34ccef0-14] Mapped to com.hvlink.controller.ShipperPartController#listPartsWithStatus(Integer, Integer, String) 2025-09-24 16:01:43.917 [reactor-http-nio-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 2025-09-24 16:01:43.917 [reactor-http-nio-7] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43072a63] was not registered for synchronization because synchronization is not active 2025-09-24 16:01:43.917 [reactor-http-nio-7] DEBUG o.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 2025-09-24 16:01:43.918 [reactor-http-nio-7] DEBUG o.m.spring.transaction.SpringManagedTransaction - JDBC Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] will not be managed by Spring 2025-09-24 16:01:43.918 [reactor-http-nio-7] DEBUG c.h.m.master.PartMapper.selectPartsWithBindStatus - ==> Preparing: SELECT id, part_code, part_desc, supplier_code, assigned FROM ( SELECT p.id, p.part_code, p.part_desc, p.supplier_code, CASE WHEN sp.part_id IS NOT NULL THEN 1 ELSE 0 END AS assigned, ROW_NUMBER() OVER (PARTITION BY p.part_code ORDER BY p.id) AS rn FROM tm_part p LEFT JOIN tm_shipper_part sp ON p.id = sp.part_id AND sp.shipper_id = ? WHERE p.supplier_code = ( SELECT supplier_code FROM tm_supplier WHERE id = ? ) ) t WHERE rn = 1 ORDER BY part_code 2025-09-24 16:01:43.918 [reactor-http-nio-7] DEBUG c.h.m.master.PartMapper.selectPartsWithBindStatus - ==> Parameters: 28(Integer), 1(Integer) 2025-09-24 16:01:44.106 [reactor-http-nio-7] DEBUG c.h.m.master.PartMapper.selectPartsWithBindStatus - <== Total: 637 2025-09-24 16:01:44.106 [reactor-http-nio-7] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43072a63] 2025-09-24 16:01:44.107 [reactor-http-nio-7] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [e34ccef0-14] Using 'application/json' given [application/json, text/plain, */*] and supported [application/json, application/*+json, application/x-ndjson, text/event-stream] 2025-09-24 16:01:44.107 [reactor-http-nio-7] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [e34ccef0-14] 0..1 [com.hvlink.common.Result<java.util.List<com.hvlink.entity.vo.master.PartVO>>] 2025-09-24 16:01:44.108 [reactor-http-nio-7] DEBUG o.s.http.codec.json.Jackson2JsonEncoder - [e34ccef0-14] Encoding [Result(status=200, msg=成功, data=[PartVO(id=704, SupplierId=null, partCode=, partDesc=, spliceDesc= - (truncated)...] 2025-09-24 16:01:44.110 [reactor-http-nio-7] DEBUG reactor.netty.http.server.HttpServerOperations - [e34ccef0-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] Detected non persistent http connection, preparing to close 2025-09-24 16:01:44.124 [reactor-http-nio-7] DEBUG reactor.netty.http.server.HttpServerOperations - [e34ccef0-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] Last HTTP packet was sent, terminating the channel 2025-09-24 16:01:44.124 [reactor-http-nio-7] DEBUG reactor.netty.channel.ChannelOperations - [e34ccef0-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61998] [HttpServer] Channel inbound receiver cancelled (operation cancelled). 2025-09-24 16:01:44.125 [reactor-http-nio-7] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [e34ccef0-14] Completed 200 OK 2025-09-24 16:01:44.633 [reactor-http-nio-8] DEBUG reactor.netty.http.server.HttpServerOperations - [da1572ab, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] New http connection, requesting read 2025-09-24 16:01:44.633 [reactor-http-nio-8] DEBUG reactor.netty.transport.TransportConfig - [da1572ab, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] Initialized pipeline DefaultChannelPipeline{(reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.server.HttpTrafficHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)} 2025-09-24 16:01:44.633 [reactor-http-nio-8] DEBUG reactor.netty.http.server.HttpServerOperations - [da1572ab, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] Increasing pending responses, now 1 2025-09-24 16:01:44.633 [reactor-http-nio-8] DEBUG reactor.netty.http.server.HttpServer - [da1572ab-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@f732ab5 2025-09-24 16:01:44.633 [reactor-http-nio-8] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [da1572ab-15] HTTP POST "/master/shipper/query" 2025-09-24 16:01:44.634 [reactor-http-nio-8] DEBUG o.s.w.r.r.m.a.RequestMappingHandlerMapping - [da1572ab-15] Mapped to com.hvlink.controller.ShipperController#getShipper(ShipperParam) 2025-09-24 16:01:44.634 [reactor-http-nio-8] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [da1572ab-15] Content-Type:application/json 2025-09-24 16:01:44.634 [reactor-http-nio-8] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [da1572ab-15] 0..1 [com.hvlink.entity.param.master.ShipperParam] 2025-09-24 16:01:44.634 [reactor-http-nio-8] DEBUG reactor.netty.channel.FluxReceive - [da1572ab-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] [terminated=false, cancelled=false, pending=0, error=null]: subscribing inbound receiver 2025-09-24 16:01:44.634 [reactor-http-nio-8] DEBUG o.s.http.codec.json.Jackson2JsonDecoder - [da1572ab-15] Decoded [ShipperParam(id=null, companyCode=null, supplierCode=null, supplierName=, shipperName=, isDefault=nu (truncated)...] 2025-09-24 16:01:44.635 [reactor-http-nio-8] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 2025-09-24 16:01:44.635 [reactor-http-nio-8] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6a810d1c] was not registered for synchronization because synchronization is not active 2025-09-24 16:01:44.639 [reactor-http-nio-8] DEBUG o.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 2025-09-24 16:01:44.639 [reactor-http-nio-8] DEBUG o.m.spring.transaction.SpringManagedTransaction - JDBC Connection [ConnectionID:3 ClientConnectionId: 64c42d95-bfb2-4b07-b196-8943f3b70bce] will not be managed by Spring 2025-09-24 16:01:44.639 [reactor-http-nio-8] DEBUG c.h.mapper.master.ShipperMapper.getShipper_mpCount - ==> Preparing: SELECT COUNT(*) FROM (SELECT DISTINCT t.id, s.id AS supplier_id, t.supplier_code, s.supplier_name, t.shipper_name, t.is_default, t.create_time FROM tm_shipper t LEFT JOIN tm_supplier s ON s.supplier_code = t.supplier_code) TOTAL 2025-09-24 16:01:44.639 [reactor-http-nio-8] DEBUG c.h.mapper.master.ShipperMapper.getShipper_mpCount - ==> Parameters: 2025-09-24 16:01:44.709 [reactor-http-nio-8] DEBUG c.h.mapper.master.ShipperMapper.getShipper_mpCount - <== Total: 1 2025-09-24 16:01:44.709 [reactor-http-nio-8] DEBUG com.hvlink.mapper.master.ShipperMapper.getShipper - ==> Preparing: SELECT DISTINCT t.id, s.id as supplier_id, t.supplier_code, s.supplier_name, t.shipper_name, t.is_default, t.create_time FROM tm_shipper t LEFT JOIN tm_supplier s ON s.supplier_code = t.supplier_code ORDER BY t.create_time DESC OFFSET ? ROWS FETCH NEXT ? ROWS ONLY 2025-09-24 16:01:44.710 [reactor-http-nio-8] DEBUG com.hvlink.mapper.master.ShipperMapper.getShipper - ==> Parameters: 0(Long), 10(Long) 2025-09-24 16:01:44.726 [reactor-http-nio-8] DEBUG com.hvlink.mapper.master.ShipperMapper.getShipper - <== Total: 10 2025-09-24 16:01:44.726 [reactor-http-nio-8] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6a810d1c] 2025-09-24 16:01:44.726 [reactor-http-nio-8] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [da1572ab-15] Using 'application/json' given [application/json, text/plain, */*] and supported [application/json, application/*+json, application/x-ndjson, text/event-stream] 2025-09-24 16:01:44.726 [reactor-http-nio-8] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [da1572ab-15] 0..1 [com.hvlink.common.Result<com.hvlink.pagination.PageResult<com.hvlink.entity.vo.master.ShipperVO>>] 2025-09-24 16:01:44.727 [reactor-http-nio-8] DEBUG o.s.http.codec.json.Jackson2JsonEncoder - [da1572ab-15] Encoding [Result(status=200, msg=成功, data=PageResult(total=280, records=[ShipperVO(id=41, SupplierId=null, sup (truncated)...] 2025-09-24 16:01:44.727 [reactor-http-nio-8] DEBUG reactor.netty.http.server.HttpServerOperations - [da1572ab-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] Detected non persistent http connection, preparing to close 2025-09-24 16:01:44.728 [reactor-http-nio-8] DEBUG reactor.netty.http.server.HttpServerOperations - [da1572ab-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] Last HTTP packet was sent, terminating the channel 2025-09-24 16:01:44.728 [reactor-http-nio-8] DEBUG reactor.netty.channel.ChannelOperations - [da1572ab-1, L:/192.168.10.130:9000 - R:/192.168.10.130:61999] [HttpServer] Channel inbound receiver cancelled (operation cancelled). 2025-09-24 16:01:44.728 [reactor-http-nio-8] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [da1572ab-15] Completed 200 OK
最新发布
09-25
2025-09-18 15:29:33.615 [reactor-http-nio-5] DEBUG reactor.netty.http.server.HttpServerOperations - [a0e83397, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] New http connection, requesting read 2025-09-18 15:29:33.615 [reactor-http-nio-5] DEBUG reactor.netty.transport.TransportConfig - [a0e83397, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] Initialized pipeline DefaultChannelPipeline{(reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.server.HttpTrafficHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)} 2025-09-18 15:29:33.616 [reactor-http-nio-5] DEBUG reactor.netty.http.server.HttpServerOperations - [a0e83397, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] Increasing pending responses, now 1 2025-09-18 15:29:33.616 [reactor-http-nio-5] DEBUG reactor.netty.http.server.HttpServer - [a0e83397-1, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@250c00e8 2025-09-18 15:29:33.617 [reactor-http-nio-5] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [a0e83397-4] HTTP PUT "/master/shipper/update" 2025-09-18 15:29:33.617 [reactor-http-nio-5] DEBUG o.s.w.r.r.m.a.RequestMappingHandlerMapping - [a0e83397-4] Mapped to com.hvlink.controller.ShipperController#updateShipper(ShipperDTO) 2025-09-18 15:29:33.617 [reactor-http-nio-5] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [a0e83397-4] Content-Type:application/json 2025-09-18 15:29:33.617 [reactor-http-nio-5] DEBUG o.s.w.r.r.m.a.RequestBodyMethodArgumentResolver - [a0e83397-4] 0..1 [com.hvlink.entity.dto.master.ShipperDTO] 2025-09-18 15:29:33.618 [reactor-http-nio-5] DEBUG reactor.netty.channel.FluxReceive - [a0e83397-1, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] [terminated=false, cancelled=false, pending=0, error=null]: subscribing inbound receiver 2025-09-18 15:29:33.618 [reactor-http-nio-5] DEBUG o.s.http.codec.json.Jackson2JsonDecoder - [a0e83397-4] Decoded [ShipperDTO(id=29, companyCode=null, supplierCode=null, supplierName=0012000048 - 上海信耀电子有限公司, shipper (truncated)...] 2025-09-18 15:29:33.618 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [com.hvlink.service.impl.ShipperServiceImpl.updateShipper]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT 2025-09-18 15:29:33.618 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [ConnectionID:1 ClientConnectionId: 832daba7-ee0b-4bc1-9a5c-db187f8edc8d] for JDBC transaction 2025-09-18 15:29:33.618 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [ConnectionID:1 ClientConnectionId: 832daba7-ee0b-4bc1-9a5c-db187f8edc8d] to manual commit 2025-09-18 15:29:33.628 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 2025-09-18 15:29:33.628 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] 2025-09-18 15:29:33.629 [reactor-http-nio-5] DEBUG o.m.spring.transaction.SpringManagedTransaction - JDBC Connection [ConnectionID:1 ClientConnectionId: 832daba7-ee0b-4bc1-9a5c-db187f8edc8d] will be managed by Spring 2025-09-18 15:29:33.629 [reactor-http-nio-5] DEBUG c.h.mapper.master.ShipperMapper.existsOtherDefault - ==> Preparing: SELECT CASE WHEN EXISTS ( SELECT 1 FROM tm_shipper WHERE is_default = '是' ) THEN 1 ELSE 0 END 2025-09-18 15:29:33.629 [reactor-http-nio-5] DEBUG c.h.mapper.master.ShipperMapper.existsOtherDefault - ==> Parameters: 2025-09-18 15:29:33.644 [reactor-http-nio-5] DEBUG c.h.mapper.master.ShipperMapper.existsOtherDefault - <== Total: 1 2025-09-18 15:29:33.644 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] 2025-09-18 15:29:33.644 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] from current transaction 2025-09-18 15:29:33.644 [reactor-http-nio-5] DEBUG c.hvlink.mapper.master.ShipperMapper.updateShipper - ==> Preparing: UPDATE tm_shipper SET company_code = ?, supplier_code = ?, shipper_name = ?, address = ?, contact_person = ?, contact_tel = ?, contact_mobile = ?, is_default = ? WHERE id = ? 2025-09-18 15:29:33.645 [reactor-http-nio-5] DEBUG c.hvlink.mapper.master.ShipperMapper.updateShipper - ==> Parameters: null, null, 发货方AC(String), null, 1(String), null, null, 否(String), 29(Integer) 2025-09-18 15:29:33.660 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] 2025-09-18 15:29:33.660 [reactor-http-nio-5] DEBUG o.s.j.support.SQLErrorCodeSQLExceptionTranslator - Unable to translate SQLException with Error code '515', will now try the fallback translator 2025-09-18 15:29:33.660 [reactor-http-nio-5] DEBUG o.s.jdbc.support.SQLStateSQLExceptionTranslator - Extracted SQL state class '23' from value '23000' 2025-09-18 15:29:33.661 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] 2025-09-18 15:29:33.661 [reactor-http-nio-5] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f745882] 2025-09-18 15:29:33.661 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Initiating transaction rollback 2025-09-18 15:29:33.661 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Rolling back JDBC transaction on Connection [ConnectionID:1 ClientConnectionId: 832daba7-ee0b-4bc1-9a5c-db187f8edc8d] 2025-09-18 15:29:33.679 [reactor-http-nio-5] DEBUG o.s.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [ConnectionID:1 ClientConnectionId: 832daba7-ee0b-4bc1-9a5c-db187f8edc8d] after transaction 2025-09-18 15:29:33.680 [reactor-http-nio-5] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [a0e83397-4] Using 'application/json' given [application/json, text/plain, */*] and supported [application/json, application/*+json, application/x-ndjson, text/event-stream] 2025-09-18 15:29:33.680 [reactor-http-nio-5] DEBUG o.s.w.r.r.m.annotation.ResponseBodyResultHandler - [a0e83397-4] 0..1 [com.hvlink.common.Result<java.lang.String>] 2025-09-18 15:29:33.680 [reactor-http-nio-5] DEBUG o.s.http.codec.json.Jackson2JsonEncoder - [a0e83397-4] Encoding [Result(status=500, msg=<EOL><EOL>### Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServer (truncated)...] 2025-09-18 15:29:33.681 [reactor-http-nio-5] DEBUG reactor.netty.http.server.HttpServerOperations - [a0e83397-1, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] Detected non persistent http connection, preparing to close 2025-09-18 15:29:33.681 [reactor-http-nio-5] DEBUG reactor.netty.http.server.HttpServerOperations - [a0e83397-1, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] Last HTTP packet was sent, terminating the channel 2025-09-18 15:29:33.681 [reactor-http-nio-5] DEBUG reactor.netty.channel.ChannelOperations - [a0e83397-1, L:/192.168.10.122:9000 - R:/192.168.10.221:51066] [HttpServer] Channel inbound receiver cancelled (operation cancelled). 2025-09-18 15:29:33.681 [reactor-http-nio-5] DEBUG o.s.web.server.adapter.HttpWebHandlerAdapter - [a0e83397-4] Completed 200 OK
09-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值