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

Try this.

 

Have two separate jobs. One for sending the message and one for receiving the message. Start the job that is sending the message first. Then start the job which is receiving the message while the first job is still running. You should then see it working. The problem with doing this in one job is that the components need to be sending and receiving at the same time. You can do this quite easily with the tParallelize component in the Enterprise Edition.

Anonymous
Not applicable
Author

your job design is wrong... 

 

1) 1st job: Open the port by using tsocketInput component and make sure timeout is bit high and give you enough time to execute second job

2)  2nd Job: Send your file to tsocketOutput in this job.

 

 

0683p000009LsdE.jpg

Anonymous
Not applicable
Author

To be honest, the order of the jobs is not terribly important so long as you ensure that there is a crossover where they are both sending and trying to receive at the same time. To do this there are a few methods you can use. But it makes sense to look at the tSocketOutput's timeout and retry times AND the tSocketInput's timeout. Whichever you have more control over should have its timeout lengthened (and assigned more "trys" in the tSocketOutput's case).

Anonymous
Not applicable
Author

Many thanks for the answer.

 

I have tried this several times before. But without success.

 

SocketServer (first job that is running):

0683p000009LslW.png

 

SocketClient (Secound Job):

0683p000009Lsb7.png

With two separate jobs, it works only via localhost!

 

SocketServer: (Starting)

SocketClient: runs

 

after the timeout comes an error message.

 

Starte Job SocketServer am 10:58 21/02/2018.
[statistics] connecting to socket on port 3846
[statistics] connected
Exception in component tSocketInput_1 (SocketServer)
java.net.SocketTimeoutException: Accept timed out
    at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
    at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
    at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at rfidtosap.socketserver_0_1.SocketServer.tSocketInput_1Process(SocketServer.java:514)

 

When i mark at tSocketInput (bind host name), an error message comes immediatly.

 

Starte Job SocketServer am 11:01 21/02/2018.
[statistics] connecting to socket on port 4063
[statistics] connected
Exception in component tSocketInput_1 (SocketServer)
java.net.BindException: Cannot assign requested address: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at rfidtosap.socketserver_0_1.SocketServer.tSocketInput_1Process(SocketServer.java:507)
    at rfidtosap.socketserver_0_1.SocketServer.runJobInTOS(SocketServer.java:938)
    at rfidtosap.socketserver_0_1.SocketServer.main(SocketServer.java:787)
[statistics] disconnected
Job SocketServer endet am 11:01 21/02/2018. [exit code=1]

 

I dont know what else to do! 0683p000009MPcz.png

Anonymous
Not applicable
Author

Have you tried the "Bind host name" option in the tSocketInput component?

Anonymous
Not applicable
Author

When i mark at tSocketInput (bind host name), an error message comes immediatly.

 

Starte Job SocketServer am 11:01 21/02/2018.
[statistics] connecting to socket on port 4063
[statistics] connected
Exception in component tSocketInput_1 (SocketServer)
java.net.BindException: Cannot assign requested address: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at rfidtosap.socketserver_0_1.SocketServer.tSocketInput_1Process(SocketServer.java:507)
    at rfidtosap.socketserver_0_1.SocketServer.runJobInTOS(SocketServer.java:938)
    at rfidtosap.socketserver_0_1.SocketServer.main(SocketServer.java:787)
[statistics] disconnected
Job SocketServer endet am 11:01 21/02/2018. [exit code=1]

Anonymous
Not applicable
Author

You have to bind it to an IP address that belongs to the machine you are running the code on. This says to me that the IP address you have bound it to does not belong to the machine you are running it on.

Anonymous
Not applicable
Author

Sorry i didnt quite understand that. Iam connected to the RFID reader via VPN. The reader is somewhere at the college. I can ping the reader via the host address: "141.79.224.86". So what does that mean exactly?

Anonymous
Not applicable
Author

How can i bind it? 0683p000009M9p6.png