RDP is up and running still message is not redirected to the consumer.

followed Publish / Subscribe though server is up and running rdp is not able to forward message to the consumer(comes in queue) whereas directly posting a message to this nodeJs server is working fine.

Hi @Saurabh, let’s do some debug to narrow down where the problem is. In PubSub+ Manager, go to “Client Connections.” Select the “REST” tab at the top, and you should see your RDP listed. Check the “Operational State” and “Enabled”. If Enabled is Yes and Operational State is down, it’s possible the Rest Consumer isn’t enabled. Click on the RDP and you’ll enter the RDP edit screen, where the Rest Consumers are listed. You should see that it is enabled. If not, please enable that too.

Hi TomF,
Thanks for response.
RDP is enabled and operational state is up for both RDP and Consumer. I have attached screenshot for both.

Time Connections blocked(%) is 99, is this ok?

Thanks & Regards,
Saurabh

Hi @Saurabh ,
That doesn’t seem ok to me. When I test an endpoint that works (postman-echo for example) my Time Connections blocked is 0.
I’m wondering if your broker can reach the REST endpoint or if the endpoint is doing mutual auth and rejecting the request from the broker. If you look on the REST Consumer under Stats -> Details it should show some info about the Last Failure which might help.
-Marc

Hi Marc,

I can see below info in details. As you said even I am sure this is not reaching to the REST endpoint, please let me know how to resolve this.
Operational State
Up
Last Failure
Reason
No Consumer Connections Up
Time
2020-06-20 04:29:13
Last Connection Failure
Local Endpoint
192.168.1.7:39445
Remote Endpoint
127.0.0.1:8080
Reason
HTTP/1.0 Or Connection:Close
Time
2020-06-20 04:26:15
Outgoing Connections (Up/Configured)
3 of 3

Hi @Saurabh … why does it show “127.0.0.1:8080” as your remote endpoint? If your Solace broker is running on your local laptop, then that’s the address for the PubSub+ manager. Or do you have something else running on port 8080 on localhost?

Hi Aaron,

Thanks for reply.
Yes, solace broker is running on my local laptop and in my local laptop I have created one nodeJS server as demonstrated in tutorial.
var http = require(‘http’);
var port=‘8080’;
var host=‘127.0.0.1’;
http.createServer(function (req, res) {
console.log('Received message: ’ + req.url);
res.writeHead(200);
res.end();
}).listen(port, host);
console.log(‘RUNNING ON ‘+host+’:’+port);

Even I tried localhost:7001 where my one more REST application is up and running but getting same issue for this as well.

Thanks & Regards,
Saurabh

Ok. But is there a port conflict since the Solace broker uses port 8080…? What happens when you point your browser to port 8080? Is it the PubSub+ Manager GUI? Or your Node app?

I think you need to run your Node app on a port that’s not being used by other applications. And then change your REST Consumer settings to goto that port.

Hi Aaron,

I have changed the port to 8081 and server is running as well.
image.png

but the moment I update the consumer port number, RDP is going down.

Even I get the same issue with one more rest application running on my localhost at port 7001. RDP going down after updating host and port though consumer is up and running.

Thanks & Regards,
Saurabh

Ok… I don’t know NodeJS, but I went and tried this sample out. Below is my changes to the sample code to make it work for me:

var http = require('http');

var RC_PORT = 9123;
var RC_HOST = '127.0.0.1';

http.createServer(function (req, res) {
            console.log('Received message: ' + req.url);
            res.writeHead(200);
            res.end();
}).listen(RC_PORT,RC_HOST);
console.log('Server running at http://'+RC_HOST+':'+RC_PORT+'/');

And then when I run it, it starts up, and if i put “localhost:9123” into my browser, I see the following output:

nodejs ./NodeServer.js
Server running at http://127.0.0.1:9123/


Received message: /
Received message: /favicon.ico

Can you confirm that your output is similar? I haven’t tried pointing my RDP REST Consumer to this yet, but you need to ensure the NodeJS mini server app is up and running correctly.

Ok, I’m seeing what you’re seeing. I’m going to try some more experiments.

Hi Aaron,

Yes, my output is also same. Even I tried calling this mini nodeJS server directly from POSTMAN and its working absolutely fine.
This problem is not only with nodeJS server but I tried one REST application installed in weblogic server at 7001 port, here also I am getting the same issue.

Note: I am able to ping both hosts from windows cmd prompt and from solace.

Thanks & Regards,
Saurabh

Hello,
Any suggestion? tried many things but still not working.
Thanks & Regards,
Saurabh

Hi @Saurabh

Trying to catch up here, when you said you are able to ping both hosts from solace, how did you actually do that? And are you running Solace PubSub+ with docker or VM?

I’m suspecting that if you’re running Solace PubSub+ with docker or VM, then 127.0.0.1 will be the container’s or guest-VM’s, not your laptop (host OS). When you used 8080, it was up because you do have 8080 running there, which is the PubSub+ Web Manager, but not 8081 which is running in your host (outside of the container/VM). Just a guess :slight_smile:

Hi Arih,

I have installed solace in my local in oracle VM. I pinged both the IP’s from solace cmd prompt.

it’s not connecting with other IP and port also running in host OS, RDP itself is not coming up.

Thanks & Regards,
Saurabh

Hi Saurabh,

Is it Oracle VirtualBox and you’re using Solace OVA template? Usually it will give you sysadmin@solace, but just checking.

And your host OS is Windows right? Am I right to assume that your Node.js sample REST service is running in your Windows?

Ping 127.0.0.1 will always succeed since that IP is the loopback IP. Can you run ip -a from your solace and share the output?

This is how my Solace PubSub+ is set up with my VirtualBox.

If yours are the same, then you just need to find out what is the IP address of your host. In my case en0 (wifi wireless) and use that IP for my RDP remote endpoint instead of 127.0.0.1.

Hi @Saurabh … apologies for not following up on this. Yes, I just did what Ari suggested, and changed my Node JS server to use my actual IP address (10.1.1.245), restarted it, and then changed the REST Consumer in Solace to use that as the outbound host:

C:\Users\AaronLee>ipconfig

Ethernet adapter Ethernet 3:

   Connection-specific DNS Suffix  . : lan
   IPv6 Address. . . . . . . . . . . : fd31:d95e:9a75:0:7c5a:4c1a:fe43:5f12
   Temporary IPv6 Address. . . . . . : fd31:d95e:9a75:0:41f6:54df:90bf:35a6
   Link-local IPv6 Address . . . . . : fe80::7c5a:4c1a:fe43:5f12%17
   IPv4 Address. . . . . . . . . . . : 10.1.1.245
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.1.1.1
Aaron's Yoga v2:~/node % node NodeServer.js
Server running at http://10.1.1.245:9090/

Received message: /rest/tutorial

Hi Ari/Aaron,

Yes, Oracle VirtualBox and I am using Solace OVA template and my host OS is windows and nodeJS server also running on the same server. please find below screenshots for network and IP.

After using actual ipv4 address consumer is not coming up.


image.png

I have attached all possible screenshots, I may be still doing some mistake. Please let me know.

Thanks & Regards,
Saurabh

Hi @Saurabh
Can you also take a screenshot of the Stats tab for the RDP and REST Consumer?