Unknown hostname exception when trying to connect to qpid host - java

I am using qpid broker(0.28) and qpid JMS client to communicate to the broker. I want to use amqp1.0 protocol and when I try the example given here, using a connection url as amqp://guest:guest#localhost:5672?clientid=test, I get error as it is not able to connect to the qpid host
Caught exception: Unknown hostname localhostjavax.jms.JMSException: Unknown hostname localhost
at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.(SessionImpl.java:97)
at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:231)
at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:210)
at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:40)
When I change my connection url to amqp://guest:guest#localhost:5672?clientid=test&remote-host=default I get an error as
Caused by: org.apache.qpid.amqp_1_0.client.Sender$SenderCreationException: Peer did not create remote endpoint for link, target: ping
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:185)
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:113)
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:106)
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:92)
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:78)
at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:72)
at org.apache.qpid.amqp_1_0.client.Session$1.(Session.java:90)
at org.apache.qpid.amqp_1_0.client.Session.createSender(Session.java:89)
Can someone please help in understanding what exactly is happening? What wrong am I doing?

Related

Failed to connect remote VM. Connection timed out(Failed to connect remote VM. Connection timed out)

Launch error: Failed to connect to remote VM. Connection timed out
Project -SDK
Connection type - Standard (Socket Attach)
Host: IP address of the SAP server
Port: 8080
There is nowhere like enough information in your question to identify the actual cause of your problem (or the fix), but problems like this typically occur because:
you are using the wrong hostname or IP address when connecting to the server
the server is off
a firewall is blocking your access to the server
there is something wrong with the network.
Hope this will give you some ideas about what to look for.

Specify https host as arangodb host in properties

I'm building CRUD interface for ArangoDB as Java service.
My ArangoDB service has dynamic IP, but static URL. Thus I want to specify URL instead of IP and port.
But when I set it in arangodb.properties file I get the following exception:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netcracker.unm.activeinventory.services.ArangoService]: Constructor threw exception; nested exception is com.arangodb.ArangoDBException: Could not load property-value arangodb.hosts=127.0.0.1:8538,127.0.0.1:8529,http://arangodb-nms-infra.sdnoshm05.com:443. Expected format ip:port,ip:port,...
How can I do it?
Update
I have figured out that I have to connect to https server. How can I specify it in my arangodb.properties file?
I have tried to connect to the servers endpoint using unix wget command. It doesn't connect if I dont specify https protocol. And so my ArangoDB client doesn't, if there is plain ip:port. I just get java.net.ConnectException: Connection refused exception.
I don't believe you can do that since the service needs to bind to an IP address. Usually, when dealing with dynamic IP addresses your ISP is changing the IP but internally you can configure your IP address statically. Bind to your internal static IP and configure your router to port forward to that internal IP address. Many routers support dynamic DNS through various providers that will map the domain to your changing IP address. I hope that helps.
Update: Setting up HTTPS should be pretty easily done, just follow the docs here: https://docs.arangodb.com/3.2/Manual/Administration/Configuration/SSL.html

Java RMI - Lookup Success , but method call fails - Onpremise Vs AWS

I have a java code which makes connection to a Java RMI server - lookup followed by method invocation.
Both machine are under the same firewall in onpremise and works as expected.
When my client/java moved to AWS, the RMI server is still running in on-premise.. But here in this case, it fails with below error..
Lookup success, method call failed..
Lookup for Remote Object Successful.
ErrorMessage:startupFunction : RemoteException Caught.. Connection refused to host: XXXXX ; nested exception is:
java.net.ConnectException: Connection timed out
PS : I see similiar issue in this post, but nothing seems to work in my case
You need to export your remote object on a fixed port, and open that port in your firewall.
Fixed this by adding the port used by RMI Method.. We ran the request from on-premise and in the RMI host we ran netstat and captured the port list.. This way we could figure out the port and enabled in Security group in AWS.. thanks all for your help..

HTTP status 500 for wso2 carbon application

I tried this tutorial and after entering with admin as in step 8, I got the error as follows:
HTTP Status 500 - Exception while making the decision : org.apache.axis2.AxisFault: Connection refused: connect
org.wso2.carbon.identity.entitlement.filter.exception.EntitlementFilterException: Exception while making the decision : org.apache.axis2.AxisFault: Connection refused: connect
org.wso2.carbon.identity.entitlement.filter.EntitlementFilter.doFilter(EntitlementFilter.java:191)
1)
Is your WSO2 Server running against loclahost only or is it just running on his IP adres? Looks like you are not able to contact the server through this IP and/or port number.
2)
Are there any proxies defined? If so, try to disable them.

Unable to connect to ftp server java

I should be able to successfully send and receive file to/from FTP server.
But then, no changes occurred in the code and I started getting this :
Error: java.net.ConnectException: Connection timed out: connect
What I am doing is:
FTPClient ftp = new FTPClient();
ftp.connect( IPADDRESS of FTP server);
connect() is giving this execption. I am not understanding the cause for it.
The error message is telling you that the OS's attempt to connect to the server timed out. This typically means that:
the remote server has dropped off the network, or
something (e.g. a firewall) is "black holing" packets sent to the server on the FTP port.
Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is listening on the remote address/port).
Source: JavaDoc.

Categories

Resources