Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

SmartInspect Console - Configure TCP Interfaces


#1

Greetings,
I’m using the SmartInspect Professional Trial v3.3.4.102 Console. I’d like to configure the console to listen to messages that are logged from another box. I can see in Tools -> Options selecting the TCP tab it has Use all interfaces selected by default. Is it possible to add an IP address from another box to listen for messages?

We do have plans to utilize the Router feature as well. Perhaps there is a solution with the Router?


#2

Hello,

Thanks for your posting. These are the listening (server) interfaces for the SmartInspect Console and the default option “Use all interfaces” accepts messages from all possible machines on the network. You just need to configure the IP/host name of the machine the Console is running on in the SmartInspect connection string in your application, e.g.:

(just replace 192.168.1.1 with the IP of the Console)

I hope this helps and please let me know in case you have any further questions.

Regards,
Tobias


#3

I’m still confused. Let’s say the application is running on 192.168.1.1. I’ve configured the messages to be routed to the same box . How can I configure the console running on my box to listen for those messages? Is that where the “Use all interfaces” option comes into play? What does “all possible machines on the network” mean?


#4

Thanks for the update. Yes, you can simply use the “Use all interfaces” option and the Console will then listen on all possible interfaces (and therefore also accept messages from localhost). All possible machines on the network means that the Console is accepting messages on all interfaces. Let me give you an example:

If you only select the 127.0.0.1 IP/interface in the Console, the Console can only receive messages on this IP/interface and doesn’t accept/listen for messages on other IPs (for example, 192.168.1.1).

I hope this clarifies this feature but please let me know in case you have any further questions.

Regards,
Tobias


#5

Ok. As a proof of concept I’ve created a console application and deployed it to one of our dev servers. It’s only task is to sleep for ten seconds then log using the log4net custom appender.

Here is my config file:

<log4net> <appender name="tcp" type="Gurock.SmartInspect.Log4net.SmartInspectAppender, Gurock.SmartInspect.Log4net"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} %-5level - %message%newline" /> </layout> <connections value="tcp(host=localhost, port=4228 timeout=10000)" /> <appName value="Test Application" /> </appender> <appender name="file" type="Gurock.SmartInspect.Log4net.SmartInspectAppender, Gurock.SmartInspect.Log4net"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} %-5level - %message%newline" /> </layout> <connections value="file(filename=C:\shares\logs\Portal\Portal.sil, append=true, maxsize=8192, rotate=daily)"/> <appName value="Test Application" /> </appender> <root> <level value="DEBUG" /> <appender-ref ref="tcp" /> <appender-ref ref="file" /> </root> </log4net>

When I attempt to start the console application I receive an error message that reads:

log4net:ERROR [SmartInspectAppender] No connection could be made because the tar get machine actively refused it 127.0.0.1:4228 Gurock.SmartInspect.ProtocolException: No connection could be made because the t arget machine actively refused it 127.0.0.1:4228 at Gurock.SmartInspect.Protocol.HandleException(String message) at Gurock.SmartInspect.Protocol.ImplConnect() at Gurock.SmartInspect.Protocol.Connect() at Gurock.SmartInspect.SmartInspect.Connect()

The goal would be to begin logging messages on the dev server and then start the console on my box and listen to messages from the dev server. Can you provide suggestions on what I am doing wrong?


#6

Hello,

Thanks for the update. In this case, you would need to configure the test application to log to your box, i.e. configure your IP address/host name as the “host” option in the connection string, e.g.:

(if 192.168.1.10 is the IP of your machine)

Currently, the test application tries to log to a Console on the same machine as the test application itself (localhost).

I hope this helps and please let me know in case you have any further questions.

Regards,
Tobias