Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TCP/IP Connection failed

Hello everybody, iam a beginner in Talend ESB.

 

I want to establish a TCP/IP connection to a Server. It's an RFID reader.

I have to send the reader an XML message via TCP / IP to a Host: "141.79.224.86" and a Port: 10001.

The XML message is called HostGreetings.

(<frame><cmd><id>1</id><hostGreetings><readerType>SIMATIC_RF680R</readerType><supportedVersions><version>V2.0</version><version>V2.1</version><version>V2.2</version></supportedVersions></hostGreetings></cmd></frame>)

After sending I have to get an answer. But that doesnt work.

 

My process is as follows:

 

0683p000009Lsi8.png

In the first step i send the whole code via tFileDelimited to the tSocketOutput (Client). This is working.

0683p000009Lsc8.png

The answer i can see only about wireshark i get one. But in Talend it does not show me.

0683p000009LsP9.png

Thats the mistake i get.

 

Does anybody know what i'm doing wrong?

 

Thanks in advance!!!!

 

Kind regards

Ao

Labels (2)
36 Replies
Anonymous
Not applicable
Author

Thank you all for the help. I will deal with it a little bit further. Then i will ask my questions.

 

Thanks a lot!

Anonymous
Not applicable
Author

No problem. Try to follow the steps that I mentioned and it should make it easier. If you are working on a computer science degree at the moment the biggest thing you should focus on when trying to learn something new is to break it down into small steps. A bit like the merge sort algorithm...."divide and conquer" 🙂

Anonymous
Not applicable
Author

Ok let me explain you the way how tcp/ip (reader) works

It recieves an request from an ip adress and an port and sends the response back to the ip adress and port from where it has recieved the request

So i can enter the ipadress and the port of the server (reader) in tsocketoutput and i can also enter the ip adress and the port (client) in tsocketinput where the komponent is waiting for the answer .. the problem that i have is..:

..While i am runing tsocketoutput to send the request to the server i do not know the port of my client which i have to paste into the tsocketinput component before ... tsocketoutput sends the request with an random port which is changing everytime so my only problem is that i have to know how it will send by an bind port and will not take an random port

Mybe this explaination helps
Anonymous
Not applicable
Author

The tSocketOutput isn't sending packets to a random port though. You set the port you want it to send to.

lojdr
Creator II
Creator II

Can you please tell us, what is the device you are using. Maybe you are trying to go with wrong way and there exists another easier way.

 

I understand what you mean. The outgoing ports are dynamically/randomly assigned. The destination port is set in the Talend component. In Linux you can use 

net.ipv4.ip_local_port_range

to limit the port numbers used as a source ports, but the minimum is 1000 ports (I think).

In Java there is a bind() method which is able to do this, but it looks it is not implemented in either tSocketInput nor tSocketOutput.

 

Please paste here the device you are using. Maybe there is a different way.

 

Regards

Lojdr

lojdr
Creator II
Creator II

One idea...

In Linux, you can create a socket file. It is a TCP/UDP connection where client endpoint acts as a file on file system. 

After you will be able to communicate via this file using tFileInputRaw and tFileOutputRaw... But please, consider this as an idea. Maybe it is a stupid idea.0683p000009MAdQ.png

Anonymous
Not applicable
Author

Hello,

 

now I have programmed the socket programming via Java. The problem via tSocketInput and tSocketOutput has now been bridged.

I wrote the code in 3 classes. I have now created it as a routine in Talend.
Now I want to save the scanned tags where I get from the RFID system into a MySQL database without having to create them as a physical file. I want to transfer the expenses I receive.
Which components are necessary for me to transfer the data? How do I transfer them?
 
Kind regards
Ao