I would like to connect one LwM2M client to multiple servers LwM2M by bootstrap server. I'm using Leshan (LwM2M implementation in Java).
So I'm using Lwm2m demo from github.com/Eclipse/Leshan. I run the server demo, the bootstrap server demo, and the client demo. I want to register the client in the server User Interface by using bootstrap server (I entered the client endpoint, the server URI, no security mode).
When I run them both, the client is not registered and I have this message in the terminal matching the client :
[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683],
deviceMangements={123=DM Server
[uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}].
[2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to
coap://192.168.1.85:8081 ...
[2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout.
[2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server,
next retry in 600s ...
How can I fix this?
coap://192.168.1.85:8081 doesn't sound like a standard CoAP port which is more like 5683 (or 5684 for DTLS)
First you better check your configuration such as IP Address and Port.
Client should point to bootstrap server IP and port. Bootstrap server configure client to correct server.
According to your terminal message, lifetime is only 20s. You can try to extend the life time to 180s (3mins) in Bootstrap.
[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683],
deviceMangements={123=DM Server
[uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}].
[2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register
to coap://192.168.1.85:8081 ... [2016-07-05 12:49:39,113 ERROR
RegistrationEngine] Registration failed: Timeout. [2016-07-05
12:49:39,116 INFO RegistrationEngine] Unable to connect to any server,
next retry in 600s ...
Related
My requirement is to connect an application deployed in weblogic server, i will use a shell script to invoke a java EJB client residing in the same server but i need to use via SSL port.
When i try connecting with non-ssl port the connection is established but when SSL port is used im getting the below error:
"javax.namin.CommunicationException: Failed to initialize JNDI context, tried 2 time or times, the interval of each time is 0ms.
[Login failed for an unknown reason:P] [Root exception is weblogic.socket.UnrecoverableConnectException: [Login faile dfor an unknown reason:P]
Current java client arguments doesnot include SSL parameters, please help on this how do i achieve this.
There are 2 servers. The 1st one is production env and 2nd is my Websphere (Mock server). I have installed an application in Websphere which is not able to process the https/http request from the client server.
When the client configure to access the https (port 9443) to my mock server then I am getting the following error on request processing:
ERROR 13172876 --- [bContainer : 13]
c.i.w.s.c.impl.SSLHandshakeErrorTracker : SSLC0008E: Unable to
initialize SSL connection. Unauthorized access was denied or
security settings have expired. Exception is
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?
When the client configures http (port 9080), then I am getting the following error:
WARN 13172876 --- [ebContainer : 7] o.s.web.servlet.PageNotFound
: Request method 'GET' not supported
ERROR 13172876 --- [ebContainer :
7] o.s.boot.web.support.ErrorPageFilter : Cannot forward to error
page for request [/] as the response has already been committed. As a
result, the response may have the wrong status code. If your
application is running on WebSphere Application Server you may be able
to resolve this problem by setting
com.ibm.ws.webcontainer.invokeFlushAfterService to false
I have configured the WireMock application for service virtualization in my application. My application has 1 RestController which has 2 request methods(POST) and 1 class to configure/run wiremock service. I do not have any error when I test the application directly from Mock server. But when the client hits my server, I am getting the following error.
For https issue, the certificate may get expired which is configured # Application Server (Websphere) level.
For Http issue, there may be some other firewall or configuration which executes the request before it goes to server. Otherwise, it should create issue # your local setup as well.
I built a web-service application using Jdeveloper 11.1.1.7 and deployed on weblogic 10.3.6 on physical server let us call it back-end server.
I do not want to give client direct access to back-end server so I make use of Apache 2.2 to be in the middle of client and back-end server. Apache 2.2 is configured on different physical server let us call it middle server.
I defined application's context root (which deployed in back-end server) on middle server in Apache httpd.conf file.
I shared WSDL file location to client ( WSDL URL which referring to the middle server domain name). The external client can access the URL thorug browser where he/she can see the WSDL content
But when the client trying send requests to middle server URL it get rejected with the following error:
[error] [client -clinet public IP goes here-] ap_proxy: trying POST /[application context root goes
here] at backend host '[back-end server local IP]/[port goes here]; got exception 'CONNECTION_REFUSED
[os error=0, line 1602 of URL.cpp]: apr_socket_connect call failed with error=730061, host=[back-end
server local IP], port=[port goes here]'
This error from middle server Apache error log file. No logs from back-end server
What is done so far:
I check the if I can access the middle server as external user using the telnet command. telnet IP port. It is working and the middle server is listening.
I also checked for all ports. between external client and middle server, between middle server and back-end server also using telnet. All ports working.
In this answer : ssl - Apache 2 with Weblogic Plug-in Redirection, original location still requested to backend - Server Fault
they are suggestion to increase the Accept Backlog value from weblogic server tuning . I did that in back-end server but still the issue is not resolved.
Problem resolved
I need to enable (WebLogic Plug-In Enabled) option from weblogic server where the application is deployed
from Domain Structure (Left Panel in admin console) - > Environment - > Servers -> (select the server where you deploy your application on it) - > General tab (from server setting)-> Advance - > (tic the option) WebLogic Plug-In Enabled
Then restarted the server.
By this your are telling the server you will get indirect request through proxy server or load balancer for example
You can do this on many level like cluster or server based on your needs check this site for more information
Understanding the use of “WebLogic Plugin Enabled”
I want to write a JMX server and client and while writing the client i encountered this problem
I can register my MBean properly but when I am trying to run the server I get the following exception:
cannot bind URL [rmi://localhost:9999/server]
I configured the server as follows :
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9999/server");
JMXConnectorServer cs =JMXConnectorServerFactory.newJMXConnectorServer(url,null,mbs);
cs.start;
Check nothing running on the port (netstat)
Try 127.0.0.1 instead of localhost
Using org.mortbay.jetty.Server;
I initialized my Jetty server to port 8080 (in the xml ).
server = (Server) applicationContext.getBean("JettyServer");
I am sending HTTP messages (GET,PUT,HEAD) to my server on address: http://localhost:8080.
But instead of handling the requests like i defind with handlrs the server returns 404 "Server out-bound response".
What am i doin wrong?
Thanks.
Have you attached a handler to handle the requests ? See this as demonstrated at http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty - HelloHandler
you will also need to set a contextHandler - See Setting Contexts section in above link and you will need to hit that URL while querying it.