Hello,
yes, its the same here. If FreeMASTER is not opened then it shows this error:
"Connecting To localhost...Could not open connection to the host, on port 41000: Connect failed"
The telnet cursor is blinking and returns immediately after any input without any massage.
Same behavior on other port address.
Shutdown of firewall is not possible.
The only difference that I see with the working FreeMASTER Lite server is the IPv6 address
PS C:\NXP\FreeMASTER 3.1\FreeMASTER> Test-NetConnection localhost -port 41000
WARNING: TCP connect to (::1 : 41000) failed
ComputerName : localhost
RemoteAddress : 127.0.0.1
RemotePort : 41000
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : 127.0.0.1
TcpTestSucceeded : True
PS C:\NXP\FreeMASTER 3.1\FreeMASTER> Test-NetConnection localhost -port 8090
ComputerName : localhost
RemoteAddress : ::1
RemotePort : 8090
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : ::1
TcpTestSucceeded : True
Regards
So, you say the telnet localhost 41000 does establish a connection? Do you see an empty black screen with a cursor blinking in top-left corner? If yes then try to type a space character . The connection should not break.. then you can copy the JSON-RPC command and right-click to paste it there... please tell me exactly after which action does the telnet session end.
Another experiment: Can you stop FreeMASTER Lite and start FreeMASTER Desktop app to use a port 8090? (run the pcmaster.exe /rpcs 8090)? Then try to connect from cmd line with telnet localhost 8090.
Thanks,
Michal
I can see the black empty screen with cursor, but any input closes / breaks it to prompt.
No input possible.
As I mentioned I tried all this with the port 8090 with the same result.
If the FreeMASTER is used on the port it does not handle the ::1 but the "FreeMASTER lite" does.
If I connect telnet to "FreeMASTER light" on port 8090 I can type in some chars (but with failure)
Regards
Hello,
yes the IPv6 address is not listened for. This will be a subject for future updates.
Is it possible to use a Wireshark to monitor the "Adapter for loopback traffic" and set a filter to tcp.port==41000? Then try to connect from a telnet console and type just empty curly brackets as two characters: {}
In my case, the FreeMASTER says:
{"jsonrpc":"2.0","id":"","error":{"code":-32600,"message":"Unknown error"}}
And the Wireshark logs 9 frames in total:
Thanks,
Michal
Sorry I cannot check via Wireshark. But I guess I have different results because I cannot type any char without stopping the console.
Could you try to do it the other way and lock the application / ports step by step to get the same (strange) behavior that I have? Maybe increasing security settings (firewall / virus protection etc.) makes it failing too.
Again, FreeMASTER Lite works without any issues and is therefore my solution for now.
Yes we will try to setup some more restricted environment to see if we could replicate your issue. We already did some experiments but these were always leaving to a state where the TCP connection cannot be even established.
Actually, the fact that your telnet client goes into a clean screen and cursor blinking at the top-left corner means the TCP connection has been established well. I do not see a reason for the connection to be shut down after you type the very first character. I would understand the FreeMASTER as the server would shut it down based on an invalid characters received. But there is no reason why it would do it when it receives spaces or {} an empty JSON statement... A Wireshark could tell more about what is happening, but I understand you cannot use it in your setup.
BTW: I have also find the netcat utility useful when testing the connection. You can try it too
c:\>echo {} | nc localhost 41000
{"jsonrpc":"2.0","id":"","error":{"code":-32600,"message":"Unknown error"}}
or
c:\>echo {"jsonrpc": "2.0", "method": "GetAppVersion", "id": 1} | nc localhost 41000
{"jsonrpc":"2.0","id":"1","result":{"success":true,"xtra":{"retval":50398213},"data":"3.1.4.5"}}
Anyway, let's continue to monitor the situation. I will appreciate if you share any new regarding this issue with us. I will do the same.
Thank you,
Michal
Hello,
I tried your suggestions
telnet opens but I cannot type or past anything because I return to the promt immediately. Same with putty.
Same happens if I change the port (which works with lite) at start ".\pcmaster.exe /rpcs 8090"
Windows Inbound rules (TCP) for FreeMASTER are set to "Any".
Connection works (except IPv6 ::1)
ComputerName : localhost
RemoteAddress : 127.0.0.1
RemotePort : 41000
InterfaceAlias : Loopback
Pseudo-Interface 1
SourceAddress : 127.0.0.1
TcpTestSucceeded : True
What could we try next?
Regards
Hello, can you compare the behavior of telnet localhost 41000 in case when FreeMASTER is running and when it is NOT running? Please use the cmd command prompt to type the command so you will be able to see any error messages.
In my case when FreeMASTER is NOT running:
C:\>telnet localhost 41000
Connecting To localhost...Could not open connection to the host, on port 41000: Connect failed
When FreeMASTER is running - the terminal gets clear, a cursor blinks in top-left corner and waits for typing (or pasting the JSON-RPC command).
Do I understand it well that in your case you return to command prompt without any error message? That would be very strange. Anyway, please try both cases with and without FreeMASTER running to compare the behavior.
Are you able to temporarily shutdown the firewall instead of editing its rules?
Thanks,
Michal
Hello,
the FreeMASTER desktop listens at port 41000 for both HTTP/web-sockets as well as a raw TCP connections. I propose to make the first experiment just by using a plain telnet client. This will verify that a connection can be established with the FreeMASTER server at the port and that it is not blocked by a firewall or other security restrictions:
Start the FreeMASTER and use Win+R or use a cmd console to enter:
telnet localhost 41000
You should not see any error and get an empty telnet console window. Now open notepad and put the following text to the editor and then copy it (Ctrl+C) to clipboard:
{"jsonrpc": "2.0", "method": "GetAppVersion", "params": [], "id": 1}
Now activate the telnet console and press the right mouse button in it to paste the clipboard content and send it to server. If a connection is correct, the FreeMASTER will respond with something like:
{"jsonrpc":"2.0","id":"1","result":{"success":true,"xtra":{"retval":50397960},"data":"3.1.3.8"}}
If this works, then there is no real reason why a websocket connection should fail. I'm afraid we would need to analyze the issue further using Wireshark or other network sniffer.
If this does not work, I would suspect the port is either occupied by some other service or blocked by a firewall.
Regards,
Michal