I'm working on Camera firmware to support ONVIF specs (using Java). I'm using Apache CXF to run services. I've imported remotediscovery.wsdl and devicemngmt.wsdl and created services for them.
I'm sure the services are running and bound to SOAP UDP:
Starting Server
[Fatal Error] addressing:2:2: The markup in the document following the root element must be well-formed.
28.11.2014 16:01:12 org.apache.cxf.service.factory.ReflectionServiceFactoryBean isEmptywsdl
28.11.2014 16:01:12 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://www.onvif.org/ver10/network/wsdl}DiscoveryService from class org.onvif.ver10.network.wsdl.DiscoveryLookupPort
28.11.2014 16:01:13 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/onvif/device_service
28.11.2014 16:01:13 org.eclipse.jetty.server.Server doStart
INFO: jetty-8.1.15.v20140411
28.11.2014 16:01:13 org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started SelectChannelConnector#localhost:8080
28.11.2014 16:01:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Discovery from WSDL: classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl
28.11.2014 16:01:13 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be soap.udp://239.255.255.250:3702
28.11.2014 16:01:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}DiscoveryProxy from class org.apache.cxf.jaxws.support.DummyImpl
Starting Server
28.11.2014 16:01:31 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://www.onvif.org/ver10/device/wsdl}DeviceService from WSDL: /tmp/wsdl/devicemgmt.wsdl
28.11.2014 16:01:51 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/onvif/DeviceService/device
Starting Server
[Fatal Error] addressing:2:2: The markup in the document following the root element must be well-formed.
28.11.2014 16:01:58 org.apache.cxf.service.factory.ReflectionServiceFactoryBean isEmptywsdl
28.11.2014 16:01:58 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://www.onvif.org/ver10/network/wsdl}DiscoveryService from class org.onvif.ver10.network.wsdl.RemoteDiscoveryPort
28.11.2014 16:01:58 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/service/DiscoveryService/discovery
Server ready...
I've tested it using CXF WSDiscoveryClient and they can be found:
16 clients found
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><EndpointReference xmlns="http://www.w3.org/2005/08/addressing"><Address>http://localhost:8080/onvif/device_service</Address><ReferenceParameters/></EndpointReference>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><EndpointReference xmlns="http://www.w3.org/2005/08/addressing"><Address>http://localhost:8080/onvif/DeviceService/device</Address><ReferenceParameters/></EndpointReference>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><EndpointReference xmlns="http://www.w3.org/2005/08/addressing"><Address>http://localhost:8080/service/DiscoveryService/discovery</Address><ReferenceParameters/></EndpointReference>
...
But I can't see my device using SmartICRSS or any ONVIF client.
What's wrong? I expect my device to do discovered by WS-Discovery and then I expect probe method to be invoked by client. I have breakpoint in and it's not invoked.
PS. I've installed network traffic interceptor app and found that production IPCameras response with ProbeMatches response (in soap body) and CXF's impl does not reply. How can I make CXF service reply with ProbeMatches?
WS-Discovery is not ONVIF, it is a XML SOAP WS-Discovery
http://specs.xmlsoap.org/ws/2005/04/discovery/ws-discovery.pdf
And, the version you have to use: April2005 version11
Please refer
https://code.google.com/p/java-ws-discovery/
Related
I have recently installed Artifactory OSS 6.5.2 on a remote server in our network which runs on windows server 2012.
I can enter the UI locally (the machine running the Artifactory instance) through any of the browsers with this address:
"http://{local-ip}:8081/artifactory/webapp/#/"
When I try entering the UI from one of the machines on the network I get a "This site can’t be reached" message after multiple attempts to connect.
The request.log at {ARTIFACTORY_HOME}\logs\request.log shows that the request got through and succeeded:
"REQUEST|{remote-ip}|anonymous|GET|/webapp/|HTTP/1.1|200|0"
The same is showed for requests coming from the server running the Artifactory instance:
"REQUEST|{local-ip}|anonymous|GET|/webapp/|HTTP/1.1|200|0"
However, in contrary to the previous request from a remote machine, the initial request is followed by more requests:
"REQUEST|{local-ip}|anonymous|GET|/ui/auth/screen/footer|HTTP/1.1|200|0
REQUEST|{local-ip}|anonymous|GET|/ui/treebrowser/repoOrder|HTTP/1.1|200|0
REQUEST|{local-ip}|anonymous|GET|/ui/onboarding/initStatus|HTTP/1.1|200|0
REQUEST|{local-ip}|anonymous|GET|/ui/auth/current|HTTP/1.1|200|0"
I thought maybe there is an automatic redirection that uses 'localhost' instead of the ip or hostname so I tried changing the {ARTIFACTORY_HOME}\tomcat\conf\server.xml:
<Service name="Catalina">
<Connector port="8081" sendReasonPhrase="true" relaxedPathChars='[]' relaxedQueryChars='[]'/>
<!-- Must be at least the value of artifactory.access.client.max.connections -->
<Connector port="8040" sendReasonPhrase="true" maxThreads="50"/>
<!-- This is the optional AJP connector -->
<Connector port="8019" protocol="AJP/1.3" sendReasonPhrase="true"/>
<Engine name="Catalina" defaultHost="localhost">
<Host **name="localhost" -> name="{hostname}** appBase="webapps" startStopThreads="2"/>
</Engine>
</Service>
But then the Artifactory failed to initialize:
"[art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:643) -
Using Access Server URL: http://localhost:8040/access (bundled)
source: detected
[art-init] [INFO ] (o.a.s.a.AccessServiceImpl:308) - Waiting for
access server...
[art-init] [WARN ] (o.j.a.c.AccessClientHttpException:41) -
Unrecognized ErrorsModel by Access. Original message: Failed on
executing /api/v1/system/ping, with response: Not Found"
I did not set any proxies or reverse proxies as I don't think it's related, but I may be mistaken as I don't have a lot of experience with web services.
Any ideas or suggestions?
Thnx,
Tom.
I was deploying artifactory 6 via helm, then upgraded to 6.8.2 and ran into this.
had to
cd $ARTIFACTORY_HOME && chown -R artifactory:artifactory .
artifactory itself, on startup, seemed not to be able to deploy the access.war and then maybe also was not able to read the credentials it needed to hit this /access context health check "ping" api endpoint.
I'm deploying Vora 1.3 Services on HDP 2.3 using the Manager web UI. Mostly default configuration and nodes assignment. I've assigned Vora Thriftserver service to the node that's been successfully hosting the same service of Vora 1.2 (which I removed already).
The service doesn't start though. Here's the related part of the log:
17/01/23 10:04:27 INFO Server: jetty-8.y.z-SNAPSHOT
17/01/23 10:04:27 INFO AbstractConnector: Started SelectChannelConnector#0.0.0.0:4040
17/01/23 10:04:27 INFO Utils: Successfully started service 'SparkUI' on port 4040.
17/01/23 10:04:27 INFO SparkUI: Started SparkUI at http://<jumpbox>:4040
17/01/23 10:04:28 INFO SparkContext: Added JAR file:/var/lib/ambari-agent/cache/stacks/HDP/2.3/services/vora-manager/package/lib/vora-spark/lib/spark-sap-datasources-1.3.102-assembly.jar at http://<jumpbox>:41874/jars/spark-sap-datasources-1.3.102-assembly.jar with timestamp 1485126268263
17/01/23 10:04:28 WARN MetricsSystem: Using default name DAGScheduler for source because spark.app.id is not set.
17/01/23 10:04:28 INFO Executor: Starting executor ID driver on host localhost
17/01/23 10:04:28 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 37523.
17/01/23 10:04:28 INFO NettyBlockTransferService: Server created on 37523
17/01/23 10:04:28 INFO BlockManagerMaster: Trying to register BlockManager
17/01/23 10:04:28 INFO BlockManagerMasterEndpoint: Registering block manager localhost:37523 with 530.0 MB RAM, BlockManagerId(driver, localhost, 37523)
17/01/23 10:04:28 INFO BlockManagerMaster: Registered BlockManager
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/sql/execution/SparkPlanner
at org.apache.spark.sql.hive.sap.thriftserver.SapSQLEnv$.init(SapSQLEnv.scala:39)
at org.apache.spark.sql.hive.thriftserver.SapThriftServer$.main(SapThriftServer.scala:22)
at org.apache.spark.sql.hive.thriftserver.SapThriftServer.main(SapThriftServer.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(.... goes on...)
Spark executable and Java executable paths in the Vora Thriftserver configuration tab are correct.
Did I miss something else?
You are running Vora 1.3 which means you must use HDP 2.4.2 which includes the required Spark 1.6.1 version. See the official Vora product availability matrix (PAM)
I have installed a distributed WSO2 API Manager Componentes. This works very well but when I subscribe to an API and generate a token this error is shown:
"Token revoke failed : HTTP error code : 500"
The log :
[2015-08-12 13:28:59,623] ERROR - TargetHandler I/O error: Host name verification failed for host : 189.9.134.48
javax.net.ssl.SSLException: Host name verification failed for host : 189.9.134.48
at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(ClientSSLSetupHandler.java:152)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:285)
at org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(SSLIOSession.java:420)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:150)
at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:181)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:346)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:745)
[2015-08-12 13:28:59,627] WARN - EndpointContext Endpoint : AnonymousEndpoint will be marked SUSPENDED as it failed
[2015-08-12 13:28:59,628] WARN - EndpointContext Suspending endpoint : AnonymousEndpoint - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Wed Aug 12 13:29:29 BRT 2015
[2015-08-12 13:28:59,629] INFO - LogMediator STATUS = Executing token 'fault' sequence, ERROR_CODE = 101500, ERROR_MESSAGE = Error in Sender
[2015-08-12 13:28:59,635] ERROR - subscription-add:jag java.lang.RuntimeException: Token revoke failed : HTTP error code : 500
[2015-08-12 13:29:09,641] ERROR - SourceHandler I/O error: Conexão fechada pela outra ponta
How can I solve this problem? I'm using APIM 1.9.
You have two ways to solve this issue. The following is recommended in production environment. The second way isn't recommanded in production environment
Way 1
You are having issue with verifying hostname "189.9.134.48". 189.9.134.48 should be your Common Name (CN) when generating your keys. You have to import your public key certificate of WSO2 IS server into WSO2 APIM server. You may use the following command inorder to extract the public key certificate from your keystore. Go inside <IS_HOME>/repository/resources/security/ directory
keytool -export -keystore <IS_Store> -alias <alias_of_IS_certificate> -file <IS_certificate>.cer
This SSL Ceritificate of the IS should be imported into the client-truststore.jks of APIM server.
Shutdown the APIM server if it's up.
Go to <APIM_HOME>/repository/resources/security/ directory.
Import the public key of appserver to the client-truststore.jks file using the following command
in terminal.
keytool -import -alias <alias_of_IS_certificate> -file <IS_certificate>.cer -keystore client-truststore.jks -storepass wso2carbon
Restart the APIM server.
Way 2
Set the <parameter name="HostnameVerifier"> element to AllowAll in <APIM_HOME>/repository/conf/axis2/axis2.xml file's HTTPS transport sender configuration. For example, <parameter name="HostnameVerifier">AllowAll</parameter>.
This parameter verifies the hostname of the certificate of a server when the API Manager acts as a client and does outbound service calls.
I just installed WSO IS and receive this error when starting the server.
ERROR {org.wso2.carbon.identity.entitlement.internal.EntitlementServiceComponent}
- Failed to initialize Entitlement Service
ERROR {org.wso2.carbon.identity.entitlement.internal.EntitlementServiceComponent}
- Error in initializing thrift transport
org.apache.thrift.transport.TTransportException: Could not bind to port 10500
I've verified nothing is using the 10500 port.
In order to test WSO2 locally on my development workstation, I hard-coded a hostname via the hosts file and modified the HostName and MgtHostName entities in ./repository/conf/carbon.xml. One caveat is that my workstation has a dynamic IP address. When the IP does occasionally change, leaving the hostname pointing to an unresponsive IP, starting WSO2 IS fails with the exact same error.
Repairing the host entry and restarting the WSO2 Identity Server resolves it.
Not sure but you can try this:
1.Kill the java process if windows system or in Linux check if another process running
already which was not shut down properly by searching using ps -ef | grep java.
2.Restart the IS server.
Here is my brief background of environment.
I am trying to convert a myapp WAR to an OSGi compliant by making the MANIFEST.MF as shown below, and wanted to deploy this war in ServiceMix an OSGi based container.
MANIFEST.MF
Manifest-Version: 2.0
Bundle-SymbolicName: myapp
Bundle-Version: 2.1.dev
Bundle-Name: Jetty.myapp
Bundle-Vendor: ABC
Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)
Bundle-ClassPath: .,WEB-INF/lib, WEB-INF/classes, xforms/xsltforms
Web-ContextPath: myapp
Webapp-Context: myapp
Import-Package: javax.servlet
Built-By: root
Project-Name: ABC_PRJ
Project-Version: 2.1.dev
Project-Build: ${DSTAMP}
SVN-Revision: ${svn.revision}
The ContextPath is getting set to null, where should I set the contextPath and how? You may observe the 'null' string in the FileNotFound Exception.
log:
java.io.FileNotFoundException: null/WEB-INF/myForms-config.xml (No such file or
directory)
My web.xml in myapp is :
<contextPath>/</contextPath>
<context-param>
<param-name>myForms.configfile</param-name>
<param-value>WEB-INF/myForms-config.xml</param-value>
</context-param>
Is it the problem with myapp or jetty or serviceMix? Any Clue?
You need to set the web-contextpath via the Manifest and not via the web.xml
for more information take a look at Pax-Web