1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #25676 (closed: invalid)

Opened 13 months ago

Last modified 13 months ago

Unable to connect using telnet error on executing expect command

Reported by: divdus Owned by:
Keywords: Cc:
Private: no

Description

Hi all,

I'm trying to do a telnet in my tcl, which is invoked from java using jacl.I'm making use of expect4j.jar for the expect command.My tcl file looks like:

#!/usr/local/bin/tclsh8.5
package require java
java::load expect4j.ExpectEmulation
package require expect

set val [spawn telnet @ipaddress @port]
puts $val

Also my java part callin tcl is:

Interp interp = new Interp();

try {

interp.evalFile("example.tcl");

} catch (TclException localTclException) {

localTclException.printStackTrace();

}

But when i tried this getting exception as follows::

tcl.lang.TclException: Unable to connect using Telnet

at expect4j.ExpectEmulation$SpawnCommand.cmdProc(ExpectEmulation.java:427)
at tcl.lang.Parser.evalObjv(Parser.java:826)
at tcl.lang.Parser.eval2(Parser.java:1228)
at tcl.lang.Parser.evalTokens(Parser.java:1008)
at tcl.lang.Parser.eval2(Parser.java:1215)
at tcl.lang.Interp.eval(Interp.java:2679)
at tcl.lang.Interp.evalFile(Interp.java:2940)
at Execute.parseArgsAndInvokeTcl(Execute.java:27)
at Execute.main(Execute.java:13)

tcl.lang.TclException: Unable to connect using Telnet

at expect4j.ExpectEmulation$SpawnCommand.cmdProc(ExpectEmulation.java:427)
at tcl.lang.Parser.evalObjv(Parser.java:826)
at tcl.lang.Parser.eval2(Parser.java:1228)
at tcl.lang.Parser.evalTokens(Parser.java:1008)
at tcl.lang.Parser.eval2(Parser.java:1215)
at tcl.lang.Interp.eval(Interp.java:2679)
at tcl.lang.Interp.evalFile(Interp.java:2940)
at Execute.parseArgsAndInvokeTcl(Execute.java:27)
at Execute.main(Execute.java:13)

please someone help me to resolve this issue.

Change History

Changed 13 months ago by ctsai

  • status changed from new to closed
  • resolution set to invalid

We are a hosting provider. As such, we do not support the software that is developed on our site.

The project you are working with is located here:

http://sourceforge.net/projects/tcl/

The resources they indicate are best for getting support from them are listed here:

http://sourceforge.net/projects/tcl/support/

Regards,
Chris Tsai, SourceForge.net Support

Note: See TracTickets for help on using tickets.