Port 8443 is HTTPS, you likely mean port 8080 as you would need a
cert, and in most cases load balancer of some sort, for SSL.

On Sat, Dec 21, 2019 at 2:50 AM albert kao <albertk...@gmail.com> wrote:
>
> Thank you for your suggestions :).
> I did:
> cd $AXIS2_HOME/samples/transport/https-sample/httpsClient
> mvn package exec:java 
> -Dexec.mainClass="org.apache.axis2.examples.httpsclient.SimpleServiceClient" 
> -Dexec.classpathScope=runtime -Dexec.cleanupDaemonThreads=false
>
>
> Output is:
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl sendViaPost
> INFO: Unable to sendViaPost to 
> url[https://localhost:8443/services/SimpleService/]
> java.net.ConnectException: Connection refused (Connection refused)
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at 
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> at 
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:589)
> at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
> at 
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
> at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
> at 
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> at 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:872)
> at 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
> at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
> at 
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:533)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:509)
> at 
> org.apache.axis2.examples.httpsclient.SimpleServiceClient.main(SimpleServiceClient.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
> at java.lang.Thread.run(Thread.java:748)
>
> [WARNING]
> org.apache.axis2.AxisFault: Connection refused (Connection refused)
>     at org.apache.axis2.AxisFault.makeFault (AxisFault.java:430)
>     at 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost 
> (HTTPSenderImpl.java:216)
>     at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:121)
>     at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons
>  (CommonsHTTPTransportSender.java:403)
>     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
> (CommonsHTTPTransportSender.java:234)
>     at org.apache.axis2.engine.AxisEngine.send (AxisEngine.java:431)
>     at org.apache.axis2.description.OutInAxisOperationClient.send 
> (OutInAxisOperation.java:399)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl 
> (OutInAxisOperation.java:225)
>     at org.apache.axis2.client.OperationClient.execute 
> (OperationClient.java:150)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:533)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:509)
>     at org.apache.axis2.examples.httpsclient.SimpleServiceClient.main 
> (SimpleServiceClient.java:45)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
>     at java.lang.Thread.run (Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (Connection refused)
>     at java.net.PlainSocketImpl.socketConnect (Native Method)
>     at java.net.AbstractPlainSocketImpl.doConnect 
> (AbstractPlainSocketImpl.java:350)
>     at java.net.AbstractPlainSocketImpl.connectToAddress 
> (AbstractPlainSocketImpl.java:206)
>     at java.net.AbstractPlainSocketImpl.connect 
> (AbstractPlainSocketImpl.java:188)
>     at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:392)
>     at java.net.Socket.connect (Socket.java:589)
>     at sun.security.ssl.SSLSocketImpl.connect (SSLSocketImpl.java:666)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     at 
> org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket 
> (ReflectionSocketFactory.java:140)
>     at 
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket 
> (SSLProtocolSocketFactory.java:130)
>     at org.apache.commons.httpclient.HttpConnection.open 
> (HttpConnection.java:707)
>     at 
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open
>  (MultiThreadedHttpConnectionManager.java:1361)
>     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry 
> (HttpMethodDirector.java:387)
>     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod 
> (HttpMethodDirector.java:171)
>     at org.apache.commons.httpclient.HttpClient.executeMethod 
> (HttpClient.java:397)
>     at 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod 
> (HTTPSenderImpl.java:872)
>     at 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost 
> (HTTPSenderImpl.java:212)
>     at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:121)
>     at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons
>  (CommonsHTTPTransportSender.java:403)
>     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
> (CommonsHTTPTransportSender.java:234)
>     at org.apache.axis2.engine.AxisEngine.send (AxisEngine.java:431)
>     at org.apache.axis2.description.OutInAxisOperationClient.send 
> (OutInAxisOperation.java:399)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl 
> (OutInAxisOperation.java:225)
>     at org.apache.axis2.client.OperationClient.execute 
> (OperationClient.java:150)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:533)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:509)
>     at org.apache.axis2.examples.httpsclient.SimpleServiceClient.main 
> (SimpleServiceClient.java:45)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
>     at java.lang.Thread.run (Thread.java:748)
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  6.148 s
> [INFO] Finished at: 2019-12-21T07:45:39-05:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java 
> (default-cli) on project httpsClient: An exception occured while executing 
> the Java class. Connection refused (Connection refused) -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/ConnectException
>
>
> On Wed, Dec 18, 2019 at 6:53 PM robertlazarski . <robertlazar...@gmail.com> 
> wrote:
>>
>> Looks like a 15 second timeout , try passing this to maven:
>>
>> -Dexec.cleanupDaemonThreads=false
>>
>> On Fri, Dec 13, 2019 at 12:49 PM albert kao <albertk...@gmail.com> wrote:
>> >
>> > I am following samples/transport/https-sample/README.txt.
>> >
>> > Running the Sample Client get the expected result.
>> >
>> > However, how to fix the following WARNING?
>> > org.apache.axis2.deployment.AxisConfigBuilder processDeployers
>> > WARNING: Unable to instantiate deployer 
>> > org.apache.axis2.deployment.ServiceDeployer; see debug logs for more 
>> > details
>> > <ns:helloServiceResponse 
>> > xmlns:ns="http://httpsservice.examples.axis2.apache.org";><ns:return>Hello 
>> > World </ns:return></ns:helloServiceResponse>[WARNING] thread 
>> > Thread[MultiThreadedHttpConnectionManager 
>> > cleanup,5,org.apache.axis2.examples.httpsclient.SimpleServiceClient] was 
>> > interrupted but is still alive after waiting at least 14999msecs
>> > [WARNING] thread Thread[MultiThreadedHttpConnectionManager 
>> > cleanup,5,org.apache.axis2.examples.httpsclient.SimpleServiceClient] will 
>> > linger despite being asked to die via interruption
>> > [WARNING] NOTE: 1 thread(s) did not finish despite being asked to  via 
>> > interruption. This is not a problem with exec:java, it is a problem with 
>> > the running code. Although not serious, it should be remedied.
>> > [WARNING] Couldn't destroy threadgroup 
>> > org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=org.apache.axis2.examples.httpsclient.SimpleServiceClient,maxpri=10]
>> > java.lang.IllegalThreadStateException
>> >     at java.lang.ThreadGroup.destroy (ThreadGroup.java:778)
>> >     at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:321)
>> >     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
>> > (DefaultBuildPluginManager.java:137)
>> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
>> > (MojoExecutor.java:210)
>> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
>> > (MojoExecutor.java:156)
>> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
>> > (MojoExecutor.java:148)
>> >     at 
>> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
>> > (LifecycleModuleBuilder.java:117)
>> >     at 
>> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
>> > (LifecycleModuleBuilder.java:81)
>> >     at 
>> > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
>> >  (SingleThreadedBuilder.java:56)
>> >     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
>> > (LifecycleStarter.java:128)
>> >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>> >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>> >     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>> >     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>> >     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
>> >     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>> >     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>> >     at sun.reflect.NativeMethodAccessorImpl.invoke 
>> > (NativeMethodAccessorImpl.java:62)
>> >     at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>> > (DelegatingMethodAccessorImpl.java:43)
>> >     at java.lang.reflect.Method.invoke (Method.java:498)
>> >     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
>> > (Launcher.java:289)
>> >     at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
>> > (Launcher.java:229)
>> >     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
>> > (Launcher.java:415)
>> >     at org.codehaus.plexus.classworlds.launcher.Launcher.main 
>> > (Launcher.java:356)
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> For additional commands, e-mail: java-user-h...@axis.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to