Telnet adapter

Welcome,
Is there any solution for adapter that can connect to telnet server and send commands?

Waiting for your answer,
Grzegorz.

Hi,

Do you need to execute just one command or do you need a series of command to be executed? If it is a series, can it be put as a parameterized shell script and executed? If so, there is a solution.

You can use jakarta’s rexec api and write a java service that executes the script. You will have to do rexec related permissions setting over unix server.

Check http://jakarta.apache.org/commons/net/xref/examples/rexec.html for the sample code. We use a service created in similar way.

I found this: http://jakarta.apache.org/commons/net/xref/org/apache/commons/net/telnet/package-summary.html

I’ll try to make my own telnet adapter :wink:

Thank you for your answer.

Regards,
Grzegorz.

Hello,

I tried to use the jakarta net API, but I found that it is complex to understand and to use.

Another way (more simple) to develop your own Telnet Adapter is tu use the de.mud.telnet package, developped by Matthias L. Jugel, Marcus Meißner. I used it now and I developped a facade to simplify the ps and df Unix commands.

You just have to download three classes : ScriptHandler.java, TelnetProtocolHandler.java and TelnetWrapper classes from http://hermie.twdata.org/cvs/viewcvs.cgi/jta/de/mud/telnet/

The java docs are in http://www.mud.de/se/jta/doc/source/de/mud/telnet/package-summary.html

Karim

Karim,

Gotta love finding a solution to a business technology problem in a tool developed to support the multi-user gaming community.

Are you using the SSH stuff or just straight telnet? If not SSH, did the javadocs suggest that the de.mud.telnet tool supports SSH?

Regards,

Mark

Yes, it support SSH. You can see that by this link :
http://hermie.twdata.org/cvs/viewcvs.cgi/jta/de/mud/ssh/

But I don’t try this package (I think they give an example called SSHWrapperExaple.java). I just use the Telnet Package to automise EAI administration.

If you need some help about Telnet package, I can give you. But I never use SSH servers.

Karim

Very innovative.

Would you mind sharing an example with us? What kinds of automation tasks are you doing? Are they for Broker or IS?

-M

We have several projects, in several wMe environments. More, Manager and Integration Monitor are so heavy. That’s wy we decide to develop a special web tool to administer transparently this infrastructure. When I finish it, it will be used by exploitants : the use of wMe tools can expose us to problems like :

  • the exploitant can show all server adapters, stop them, empty the queues
  • get out ClientGroup subscription / pub
  • disable broker SSL certificat
  • view data exchanged
  • etc.

The application allow an exploitant to only use the authorised services, to support him for a problem diagnostic (what files to see, etc.) and to show a comprehensible messages. More, in this case, exploitant do not need a wMe, Unix or SQL expertise.

Up to now, this tool allow these services :
→ test the activity of all wMe composants :
* broker, merant, and Oracle. This is done by doing a ‘ps’ and verifying the processes presence
* test all projects adapters activity and other kind of tests (AdapterMonitor is unique, queues are empty)

→ verifying the file systems, by testing the ‘df’ unix instruction

→ visualize the syslog (and other files) and the wMe alert et info logs

→ manage the errors

And I prevent to use it to automise these services :

→ stop, restart adapters, brokers, merant

→ store datas and files

→ group and zip all files needed to diagnostic a problem

→ realise tests about IS (server presence, IS stop/restart by unix command, and others)

I am always thinking about tasks to automise. Have you some suggestions about other tasks to automise ?

Karim

Hi I am having a project where SAP is outside the firewall and IS is within the firewall.For Inbound and outbound to/from sap I need to use some files for data transfer.We cannot put a ftp server in the sap box as it is not secured.Secued ftp is not supported by webmethods.So how shoukd we proceed,either should we use a web server with certificates or something else.

Thanks
Amit

Hi Amit,

Your webMethods server is in DMZ, and SAP server is in internal network. or have i understood it all wrong?

Are you in a position to open one-way ports on firewall?