小编dev*_*evd的帖子

创建自动化作业以使用REST API执行azure Runbook

在此链接中(使用来自java的REST api创建azure自动化帐户)我询问了如何创建自动化帐户以创建Runbook.现在,我已经创建了一个自动化帐户以及一个已发布的Runbook,我想执行(启动)Runbook.为了做到这一点,我正在关注此链接(https://msdn.microsoft.com/en-us/library/azure/mt163849.aspx),但我收到一个错误:

Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable
Run Code Online (Sandbox Code Playgroud)

这是java函数:

    private static int processPutRequest(URL url, byte[] data, String contentType, String keyStore, String keyStorePassword) 
    throws UnrecoverableKeyException, KeyManagementException, KeyStoreException, NoSuchAlgorithmException, IOException {
       SSLSocketFactory sslFactory = getSSLSocketFactory(keyStore, keyStorePassword);
       HttpsURLConnection con = null;
       con = (HttpsURLConnection) url.openConnection();
       con.setSSLSocketFactory(sslFactory);
       con.setDoOutput(true);
       con.setRequestMethod("PUT");
       con.addRequestProperty("x-ms-version", "2013-08-01");
       con.setRequestProperty("Content-Length", String.valueOf(data.length));
       con.setRequestProperty("Content-Type", contentType);

       DataOutputStream …
Run Code Online (Sandbox Code Playgroud)

java api rest azure azure-automation

5
推荐指数
1
解决办法
1022
查看次数

升级到jetty-9.3.3后JSP编译错误

我有一个在嵌入式 Jetty-7.6.8 (jdk-6) 上运行的 webapp 应用程序,但由于浏览器上的 Diffie-Hellman 错误,我们决定迁移到较新版本的 Jetty。因此,我们迁移到 Jetty-9.3.3。由于Jetty-9.x需要jdk-8,所以我也升级了jdk。现在 jetty 启动时没有错误,但是当我尝试访问我的登录页面时,出现无法编译 jsp 错误。

这些是依赖项:

-org.eclipse.jetty.apache-jsp-9.3.3.v20150827.jar
-org.mortbay.jasper.apache-el-8.0.23.M1.jar 
-org.mortbay.jasper.apache-jsp-8.0.23.M1.jar
-org.eclipse.jetty.orbit.org.eclipse.jdt.core-3.8.2.v20130121.jar
-jetty-continuation-9.3.3.v20150827.jar 
-jetty-http-9.3.3.v20150827.jar
-jetty-io-9.3.3.v20150827.jar 
-jetty-security-9.3.3.v20150827.jar
-jetty-server-9.3.3.v20150827.jar 
-jetty-servlet-9.3.3.v20150827.jar
-jetty-util-9.3.3.v20150827.jar 
-jetty-webapp-9.3.3.v20150827.jar
-jetty-xml-9.3.3.v20150827.jar
-servlet-api-3.1.jar
Run Code Online (Sandbox Code Playgroud)

日志/浏览器上出现的错误:

HTTP ERROR 500

Problem accessing /xdadm/test.jsp. Reason:

Server Error

Caused by:

org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:816)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1686)
at com.xcom.filter.RequestHandler.doFilter(RequestHandler.java:91)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1156)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) …
Run Code Online (Sandbox Code Playgroud)

java jsp jetty embedded-jetty jetty-9

5
推荐指数
1
解决办法
7788
查看次数

将数据从 AWS S3 加载到 Aurora Postgres

我正在尝试从AWS S3to加载数据Aurora Postgres。我已经点击了这个链接https://aws.amazon.com/blogs/database/stream-data-into-an-aurora-postgresql-database-using-aws-dms-and-amazon-kinesis-data-firehose/但是没有任何成功。有没有人加载它或知道一些链接,我可以在其中找到实现它的步骤。

postgresql amazon-s3 amazon-web-services amazon-aurora

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

带客户端身份验证的 SSL 套接字连接

我有一个运行一些实用命令的应用程序服务器,这些命令是用 C 语言编写的。我必须使用具有客户端身份验证的 Java SSL 套接字通过 Java 客户端程序连接到服务器。服务器端的密钥是使用以下命令创建的:

   openssl req -new -text -out ser.req
   openssl rsa -in privkey.pem -out ser.key
   openssl req -x509 -in ser.req -text -key ser.key -out ser.crt
Run Code Online (Sandbox Code Playgroud)

我已获得服务器密钥和证书。我已将密钥和证书组合成 PKCS12 格式文件:

openssl pkcs12 -inkey ser.key -in ser.crt -export -out ser.pkcs12

然后使用 keytool 将生成的 PKCS12 文件加载到 JSSE 密钥库中:

keytool -importkeystore -srckeystore ser.pkcs12 -srcstoretype PKCS12 -destkeystore ser.keystore

但是当我尝试连接时,出现以下错误:

javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alert.createSSLException(Alert.java:131)
    at sun.security.ssl.TransportContext.fatal(TransportContext.java:324)
    at sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
    at …
Run Code Online (Sandbox Code Playgroud)

java ssl openssl keytool

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