Indusoft Web Studio Error Messages? - scada

Apologies if this is a pretty simple question, but I'm pretty new to IWS.
When ever I startup IWS (it's running on Microsoft Server that I remote desktop into) and enter my login details I get this message:
Failed to start TCP/IP Server, please check if the TCP port is already in use
During this same session I will also get the message below whenever I try to change tags in my trend sheets:
WARNING: Tag changes in any trend group will only take place in the next day history file.
It seems any changes I make in relation to tags and driver sheets are ignored and I want to know if this is related to the above error messages and how do I go about debugging/fixing this?
Note: I do not get these messages in other IWS sessions on other servers and I don't experience these problems.

Projects running the TCP/IP Server task use a TCP Port that is defined in the InduSoft Project Settings - Communication tab. By default, InduSoft uses port 1234. The error message you mention can occur if another process binds to that port before InduSoft has started the TCP/IP Server task.

Change the TCP Port. 1234 is the standard Port for Indusoft.
Try to Map your useds Ports before chosing some.
Or kill the process that are using the Port 1234, as explained in the link.
https://receitasdecodigo.com.br/java/listar-e-matar-processo-pela-porta-em-uso-no-windows-pelo-cmd

Related

How to differentiate between closed and filtered remote ports

I am setting up port scanner for remote server in my application using Go. I am using DialTimeout function in Go net package to check whether a remote host port is opened or not. The result is fine with success case. But, if i/o timeout happens, I need to identify whether
The port is closed (No service is running) or
Port is blocked (Firewall filtered) or
Due to internet connectivity down in local system where the application is running.
Have tried nmap cli command, I can able to differentiate those failure 3 cases exactly.
nmap command tried: nmap -sA -p port_number host_ip
I found a Go 3rd party libray to use nmap.
But, I don't want to use nmap in my application. Are there any other alternatives in Go to exactly differentiate those 3 cases?
In the simple world
Lets assume you want to scan a Linux system.
If you get an ICMP message type 3 code 3, the firewall explicitly told you:
Hi, I am the firewall of your target host. The host is running. I hereby inform you that you (potentially amongst others) can not access this port. So now that you know you should quit your connection attempts. However, I won't tell you wether it is because there is no service running behind it (in which case my response is simply a courtesy) or because I was told to deny you access. Goodbye!
The port is closed if you do not get above answer and can not make a connection. I hence strongly advice to use context.WithTimeout to make a connection.
In the real world
However, this only applies if the admin of the target host did not change the ICMP message type to respond with - or chose just to drop any packets coming from sources which are not allowed to access the respective service. In the latter case, there is no way for you to know wether the port is closed or filtered.
All of the above only applies if we are talking of an iptables based firewall on the target system with default settings.
Now assume something which is by far more likely: A border firewall plus a local firewall. The border firewall might send other ICMP messages (or, again, simply drop your packages). Those rules apply additionally to the rules of the local firewall. So it is a misconception that you are actually scanning a host. It is more accurate to say that you scan the services reachable via a specific IP.
EDIT
Why would one send an ICMP message explicitly rejecting connection attempts?
There are various reasons to come to that decision. There is a good answer on serverfault.com

How to simulate external TCP traffic in Windows?

I don't have any code yet, so please feel free to move this to a sister site, if you think it belongs there :)
I have a Program A ( I don't have it's source code, so I can't modify it's behavior ) running on my machine which keeps listening to a particular port on the system for TCP data. It's a Peer to Peer application.
System 1 running A ====================== System 2 sunning A
The program A is supposed to run on systems where I may not be allowed to modify Firewall settings to allow incoming connections on the port the program listens to. I have an EC2 linux server running Ubuntu 16.
So I thought I can use an existing tool or create a program that would connect to the server on port X, and fetch the data from the server, and locally throw that data to the port A is listening to.
System 1 running A ========= SERVER =========== System 2 sunning A
What kind of configuration should I have on the server ? And is there any program I can use for this, or an idea of how to make one ?
I did something similar to bypass firewalls and hotspots.
Check this out https://github.com/yarrick/iodine, with a proper configuration your would be able to send\receive packets as DNS queries which is I know is always allowed, I used my server to get usual internet access with any hotspot I found.
You would lose some time, higher latency but you will have access.
Hope I helped.

MQ sender- receiver channel issue

I have two PCs both running Windows7 connected via LAN wire ( as homegroup network). In both PCs, I have installed MQ7.0. Let me name them: A and B
On A, I defined a queue manager QMA. On B, I created a queue manager QMB. Now I created a sender channel at system A: QMA.QMB and created a receiver channel at system B: QMA.QMB. This set up working fine. Both channel shows running. I have configured a sample remote queue defintion at system A and checked trace route message.
Now issue is reverse configuration. I want to create sender-receiver channel from B to A. So I followed similar steps to configured channel QMB.QMA. On system B, sender channel (QMB.QMA) keeps retrying. and at system A, receiver channel(QMA.QMB), it shows always inactive.
I have been trying couple of hours but no luck. Please help.
Pining ip address from both machines working fine. I am using tcp with default 1414 port. Listeners are up on both system. One strange thing, when I try display chstatus(QMB.QMA) on system A, it says "Channel status not found". and on system B,same command display channel status with status stopped. I have tried multiple times deleting-recreating channels. But no luck.
The first thing to do is to see whether the connection request is even getting to QMA from QMB. Check the AMQERR01.LOG file in {WMQ Install Dir}/errors and {WMQ Install Dir}/QMgrs/QMA/errors for indications of any failures. If the connection request is getting to QMA but failing you should see it in the QMA/errors/AMQERR01.LOG file. If it is getting to WMQ but not to QMA then you will find it in the WMQ global logs in {WMQ Install Dir}/errors.
If you are seeing the error in one of these logs, it should tell you what the problem is. If there's a log entry and it doesn't resolve the issue, post the error log entry as an append to this question.
If you are not seeing it in one of these logs then look for configuration errors. Make sure that the listener is running and on the port you think it should be. Make sure the CONNAME points to the right IP address and port. Make sure to use IP address and not the host name of QMA to take name resolution out of the equation. Make sure that the Windows firewall is open for the port that is listening. Go to QMB host and try top telnet to QMA host on the WMQ port. If the connection is refused immediately or closes after a second or two then it is likely a firewall issue.

Mapping Port to PID for Transient Windows TCP Connections

I am trying to reverse engineer a third-party TCP client / server Windows XP, SP 3 app for which I have no source available. My main line of attack is to use WireShark to capture TCP traffic.
When I issue a certain GUI command on the client side, the client creates a TCP connection to the server, sends some data, and tears down the connection. The server port is 1234, and the client port is assigned by the OS and therefore varies.
WireShark is showing that the message corresponding to the GUI command I issued gets sent twice. The two messages bear a different source port, but they have the same destination port (1234, as mentioned previosuly).
The client side actually consists of several processes, and I would like to determine which processes are sending these messages. These processes are long-lived, so their PIDs are stable and known. However, the TCP connections involved are transient, lasting only a few milliseconds or so. Though I've captured the client-side port numbers in WireShark and though I know all of the PIDs involved, the fact the connections are transient makes it difficult to determine which PID opened the port. (If the connections were long-lived, I could use netstat to map port numbers to PIDs.) Does anybody have any suggestions on how I can determine which processes are creating these transient connections?
I can think of two things:
Try sysinternals' tcpview program. It gives a detailed listing of all tcp connections opened by all the processes in the system. If a process creates connections, you will be able to see them flash (both connect and disconnect are flashed) in tcpview and you will know which processes to start looking into.
Try running the binary under a debugger. Windbg supports multi-process debugging (so does visual studio I think). You may have only export symbols to work with but that should still work for calls made to system dlls. Try breaking on any suspected windows APIs you know will be called by the process to create the connections. MSDN should have the relevant dlls for most system APIs documented.
Start here... post a follow-up if you get stuck again.
I ended up creating a batch file that runs netstat in a tight loop and appends its output to a text file. I ran this batch file while running the system, and by combing through all of the netstat dumps, I was able to find a dump that contained the PIDs associated with the ports.

TCP: Address already in use exception - possible causes for client port? NO PORT EXHAUSTION

stupid problem. I get those from a client connecting to a server. Sadly, the setup is complicated making debugging complex - and we run out of options.
The environment:
*Client/Server system, both running on the same machine. The client is actually a service doing some database manipulation at specific times.
* The cnonection comes from C# going through OleDb to an EasySoft JDBC driver to a custom written JDBC server that then hosts logic in C++. Yeah, compelx - but the third party supplier decided to expose the extension mechanisms for their server through a JDBC interface. Not a lot can be done here ;)
The Symptom:
At (ir)regular intervals we get a "Address already in use: connect" told from the JDBC driver. They seem to come from one particular service we run.
Now, I did read all the stuff about port exhaustion. This is why we have a little tool running now that counts ports and their states every minute. Last time this happened, we had an astonishing 370 ports in use, with the count rising to about 900 AFTER the error. We aleady patched the registry (it is a windows machine) to allow more than the 5000 client ports standard, but even then, we are far far from that limit to start with.
Which is why I am asking here. Ayneone an ide what ELSE could cause this?
It is a Windows 2003 Server machine, 64 bit. The only other thing I can see that may cause it (but this functionality is supposedly disabled) is Symantec Endpoint Protection that is installed on the server - and being capable of actinc as a firewall, it could possibly intercept network traffic. I dont want to open a can of worms by pointing to Symantec prematurely (if pointing to Symantec can ever be seen as such). So, anyone an idea what else may be the cause?
Thanks
"Address already in use", aka WSAEADDRINUSE (10048), means that when the client socket prepared to connect to the server socket, it first tried to bind itself to a specific local IP/Port pair that was already in use by another socket, either an active one or one that has been closed but is still in the FD_WAIT state. This has nothing to do with the number of ports that are available.
I'm having the same issue on a Windows 2000 Server with a .Net application connecting to a SQL Server 7.0. There's like 10 servers with the same configuration and only one is showing this error several times a day. With a small test program I'm able to reproduce the error by just establishing a TCP connection on the SQL Server listening port. Running CurrPorts (http://www.nirsoft.net/utils/cports.html) shows there's still plenty of available ports in range 1024-5000.
I'm out of ideas and would like to know if you've found a solution since you've posted your question.
Edit : I finally found the solution : a worm was present on the server (WORM_DOWNAD.A) and exhausted local ports without being noticed.

Resources