我们确实有一个奇怪的nginx
超时生产问题.超时说明如下:
"upstream timed out(110: Connection timed out)"
Run Code Online (Sandbox Code Playgroud)
这里,上游服务器正在jetty
运行nginx的同一主机上运行.Jetty正在运行8080
nginx的端口上运行443
.
检查了上述错误后,我验证了jetty日志和nginx日志的日志.虽然jetty在不到一秒的时间内就会返回响应,但是发送给nginx的响应正在delayed
接近60 secs
.并且nginx正在使用http响应代码在60秒后触发timedout警报504
.这种情况正在发生intermittently
.
以下是jetty和nginx的日志,用于超时请求.
码头日志:
{ "EVT":1494519426927 "intelId": "50", "intelSeq":112506 "intelVer": "1", "时间": "2017-05-11T16:17:06.927Z", "uiCorrelationIdV1": "SUI-1494519425839-42047","threadName":"qtp754853679-357","wResource":" http://m.xxx.com/search/facet/women/womens-handbags-9780510203/shoulder/_/N -53f3Z7hk9Z1z0roil ","wMethod":"GET","wStatus":200,"wDurationMicros":1087801,"wJlpLocation":"","wFwdFor":" NADA ","wHostHdr":"m.xxxx.com" ,"wReferer":" https://m.xxxx.com/search/facet/women/womens-handbags-9780510203/_/N-53f3Z7hk9?search-term=Bags&sortBy=priceLow&facet=Handbag%20Style ","wHttpVer" :"HTTP/1.0","wWsgClientIp":"80.192.191.2","wSrcIP":"127.0.0.1","wUserAgent":"Mozilla/5.0(iPhone; CPU iPhone OS 10_3_1,如Mac OS X)AppleWebKit/603.1 .30(KHTML,与Gecko一样)Version/10.0 Mobile/14E304 Safari/602.1","intelCropped":false,"intelLength":834}
Nginx日志:
2017-05-11T17:18:09 + 01:00 intelId ="56"intelVer ="2"wMethod ="GET"wResource ="/ search/facet/women/womens-handbags-9780510203/across-body/shoulder// N-53f3Z7hk9Z1z0roq4Z1z0roil?search-term = Bags&sortBy = priceLow&facet = Handbag%20Style"wStatus ="504"wCacheStatus ="MISS"wSrcIP ="172.17.233.135"wSize ="176"wDurationSeconds ="60.001"wHostHdr …
查看中的代码,CacheInterceptor
我发现带有代码 204 的响应没有被缓存。但我相信 204 是可缓存的,如此处所讨论的
我们使用204
GET 的响应并不表示空响应,并且最近才注意到这些响应没有被缓存。
在terraform init
使用Terraform时运行时,0.11.3
我们收到以下错误:
初始化提供程序插件... - 在https://releases.hashicorp.com上检查可用的提供程序插件...
安装提供程序"template"时出错:获取 https://releases.hashicorp.com/terraform-provider-template/:read tcp 172.25.77.25:53742->151.101.13.183:443:read:peer reset by peer.
Terraform分析配置和状态,并自动下载所用提供商的插件.但是,尝试下载此插件时发生意外错误.
如果由于某种原因Terraform无法访问插件存储库,可能会导致这种情况.如果防火墙阻止访问,则可能无法访问存储库.
如果您的环境中无法或不希望自动安装,您可以通过下载合适的分发包并将插件的可执行文件放在以下目录中来手动安装插件:terraform.d/plugins/linux_amd64
我意识到这是因为https://releases.hashicorp.com域的连接问题.出于某些显而易见的原因,我们将不得不调整此连接问题,因为控制服务器和Hashicorp的服务器之间存在一些SSL和防火墙问题.
我们有什么方法可以通过从Hashicorp的服务器下载插件并将它们复制到控制服务器来绕过这个?或者任何其他替代方法,以避免尝试从Hashicorp的服务器下载东西?
下面的代码总是下载一个f.txt
文件,而不是下载没有实际的文件名和扩展名(这里是.zip扩展名).
@RequestMapping(value = "/files/{fileId}", method = RequestMethod.GET, produces = "application/zip")
public ResponseEntity<Resource> downloadFile(@PathVariable("fileId") String fileName) {
log.info("Downloading file..!!!!");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.valueOf("application/zip"));
log.info("Content info : "+headers.getContentType().toString());
File file = FileUtils.getFile("backup/" + fileName + ".zip");
log.info("File name is : "+file.getName());
FileSystemResource fileSystemResource = new FileSystemResource(file);
return new ResponseEntity<>(fileSystemResource, headers, HttpStatus.OK);
}
Run Code Online (Sandbox Code Playgroud)
如果有人能让我知道错误在哪里/要做一些修改,那会很棒吗?
我正在尝试转换字符串,OffsetDateTime
但低于错误.
java.time.format.DateTimeParseException: Text '20150101' could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor: {},ISO resolved to 2015-01-01 of type java.time.format.Parsed
代码: OffsetDateTime.parse("20150101", DateTimeFormatter.ofPattern("yyyyMMdd"));
预期产量: OffsetDateTime object with date 20150101.
我非常感谢您提供的任何帮助.
谢谢,
我目前正在使用spring-data-jpa
version 1.9.4
。
我有一个MySql表,其中包含列project(integer),summary(varchar)和description(varchar)。
我有一个正则表达式,我想用它来搜索摘要和/或描述字段,这意味着如果它在摘要中找到它,则无需将正则表达式应用于描述。
我尝试使用的存储库方法是:
List<Issue> findByProjectAndSummaryOrDescriptionRegex(long project, String regex)
Run Code Online (Sandbox Code Playgroud)
我收到的错误是:
java.lang.IllegalArgumentException:不支持的关键字REGEX(1):[MatchesRegex,Matches,Regex]
在我的公司环境中,很难更新/升级版本,因此如果问题不是我的语法,而是如果有人知道现在哪个版本支持“ Regex”进行查询派生,或者在哪里可以找到特定信息,我将不胜感激。 。我看过了Changelog
,似乎1.9.4
应该支持,但似乎没有。
谢谢你的帮助!
京东
编辑1:我知道@Query
注释,但是我的领导要求我仅在无法找到支持关键字REGEX [MatchesRegex,Matches,Regex]的正确版本时才将其用作最后的选择