相关疑难解决方法(0)

TCP连接中的FIN与RST

我理解这一点,有两种方法可以关闭TCP连接:

  • 发送FIN标志
  • 发送RST标志

RST导致立即连接终止,而在FIN中您会得到确认.

我是否理解这一点,两者之间是否存在其他区别?这两个标志可以一起使用吗?

networking tcp

35
推荐指数
3
解决办法
7万
查看次数

HTTP保持活动超时

我可以指定HTTP超时还是服务器强加一个值?例如,如果我这样做:

telnet my.server.net 80
Trying X.X.X.X...
Connected to my.server.net.
Escape character is '^]'.
GET /homepage.html HTTP/1.0
Connection: keep-alive
Host: my.server.net

HTTP/1.1 200 OK
Date: Thu, 03 Oct 2013 09:05:28 GMT
Server: Apache
Last-Modified: Wed, 15 Sep 2010 14:45:31 GMT
ETag: "1af210b-7b-4904d6196d8c0"
Accept-Ranges: bytes
Content-Length: 123
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
[...]
Run Code Online (Sandbox Code Playgroud)

这条线:

Keep-Alive: timeout=15, max=100
Run Code Online (Sandbox Code Playgroud)

...指定最大超时为100秒,对吧?我怎样才能设定这样的价值?

timeout get http telnet keep-alive

35
推荐指数
2
解决办法
8万
查看次数

如何防止Azure网站入睡?

我将一个ASP.NET 5,MVC 6 Web应用程序部署到Azure.似乎如果我没有在网站上停留10-15分钟,它就会进入睡眠状态,醒来需要10-15秒.

我不确定它是否正在睡着的网站,或者它正在连接的数据库.

所以2个问题.

  1. 如何防止网站如此快速入睡.
  2. 有没有办法通过网站和数据库了解Azure中正在发生的事情.他们被踢出了记忆吗?

asp.net iis azure azure-web-sites

25
推荐指数
2
解决办法
7335
查看次数

引起:java.net.SocketException:来自服务器的文件意外结束

当我通过SOAP UI运行WS时,我会间歇性地得到以下错误.有时它不起作用,然后它继续工作,然后有时它不起作用.另一个问题是测试Web服务工作正常,客户端没有任何问题,但我们切换到生产问题的时刻.谷歌搜索并做了一些更改(HttpConfig超时,jetty maxIdleTime)但仍然无法使其工作:(任何想法如何我可以缩小问题是什么?

org.apache.cxf.interceptor.Fault: Could not send Message.
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)[147:org.apache.cxf.cxf-api:2.6.0.redhat-60024]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[147:org.apache.cxf.cxf-api:2.6.0.redhat-60024]

Caused by: java.net.SocketException: SocketException invoking https://www.website:443/gateway/ServicePortV2: Unexpected end of file from server
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.7.0_25]



Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)[:1.7.0_25]
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)[:1.7.0_25]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)[:1.7.0_25]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)[:1.7.0_25]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)[:1.7.0_25]
    at org.apache.cxf.transport.http.HTTPConduit.processRetransmit(HTTPConduit.java:1004)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit.access$400(HTTPConduit.java:148)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:1504)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1525)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1438)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
Run Code Online (Sandbox Code Playgroud)

只需使用SOAP UI添加生产端点就可以了.

java web-services cxf apache-camel

10
推荐指数
1
解决办法
4万
查看次数

使用Wss4jSecurityInterceptor和Java的SOAP WS-Addressing属性

嗨,我创建消费SOAP服务的代码,

对于Authentication Header,我使用Wss4jSecurityInterceptor来设置Header信息.

我收到如下的失败回应

 Exception in thread "main" org.springframework.ws.soap.client.SoapFaultClientException: Required element {http://www.w3.org/2005/08/addressing}Action is missing
Run Code Online (Sandbox Code Playgroud)

我的配置代码如下

@Configuration
public class SoapClientConfig {

    @Bean
    public Jaxb2Marshaller marshaller() {
        Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
        marshaller.setContextPath("com.xyz.client");
        marshaller.setCheckForXmlRootElement(false);
        return marshaller;
    }

    @Bean
    public MyClient myClient(Jaxb2Marshaller marshaller) throws Exception {
        MyClient client = new MyClient();
        client.setDefaultUri("https://localhost:8080/ws/service");
        client.setMarshaller(marshaller);
        client.setUnmarshaller(marshaller);

        ClientInterceptor[] interceptors = new ClientInterceptor[] {securityInterceptor()};

        client.setInterceptors(interceptors);
        return client;
    }

    @Bean
    public Wss4jSecurityInterceptor securityInterceptor() {
        Wss4jSecurityInterceptor wss4jSecurityInterceptor = new Wss4jSecurityInterceptor();
        wss4jSecurityInterceptor.setSecurementActions("UsernameToken");
        wss4jSecurityInterceptor.setSecurementMustUnderstand(true);
        wss4jSecurityInterceptor.setSecurementPasswordType("PasswordText");
        wss4jSecurityInterceptor.setSecurementUsername("XXXXXXXXXXX");
        wss4jSecurityInterceptor.setSecurementPassword("XXXXXXXX");
        return wss4jSecurityInterceptor;
    }
} …
Run Code Online (Sandbox Code Playgroud)

java soap web-services ws-addressing soap-client

10
推荐指数
1
解决办法
1014
查看次数