Hello Bernd, On Wed, 2020-02-12 at 20:22 +0000, Bernd Eckenfels wrote: > Can you describe why you think you need a tty? What fails if you > don't have one? Do use "karaf console" instead of "karaf start"? Do > you have ansi.so load problems?
Note - I don't use karaf, but instead the bundles I indicated in my previous email. I think that it needs a TTY because as soon as I get the note that the framework has started, the application immediately starts shutting down. Here's the message printed out: [INFO] Framework started ____________________________ Welcome to Apache Felix Gogo g! gosh: stopping framework I have associated that with a 'close' signal sent to the console due to no TTY being available. I may be wrong though, but I did not find a solution. I did a bit of digging and found out that I can add -Dgosh.args="--nointeractive" to my startup script and then the container runs without the need to pas the it flags. However, even though the remote shell bundle is started, I am unable to telnet [FelixDispatchQueue] INFO E.B.org.apache.felix.gogo.runtime - BundleEvent STARTED [FelixDispatchQueue] INFO E.B.org.apache.felix.shell.remote - BundleEvent RESOLVED [FelixDispatchQueue] INFO E.B.org.apache.felix.shell.remote - BundleEvent STARTED $ telnet localhost 6666 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused For reference, these are the bundles I am using "org.apache.felix/org.apache.felix.gogo.command/1.1.0", "org.apache.felix/org.apache.felix.gogo.shell/1.1.2", "org.apache.felix/org.apache.felix.gogo.runtime/1.1.2", "org.apache.felix/org.apache.felix.shell.remote/1.2.0 Thanks, Robert > Gruss > Bernd > > > -- > http://bernd.eckenfels.net > ________________________________ > Von: Robert Munteanu <romb...@apache.org> > Gesendet: Wednesday, February 12, 2020 11:26:32 AM > An: users@felix.apache.org <users@felix.apache.org> > Betreff: Gogo shell + telnet without a local TTY > > Hi, > > I am trying to open up access to the gogo shell via telnet without > allocating a TTY. > > The problem with the TTY is that is there is none the shell will get > an > interrupt, therefore shutting down the OSGi framework. I am running > on > a container platform, so no much luck in getting that changed. > > I have tried by adding the following bundles: > > "org.apache.felix/org.apache.felix.gogo.command/1.1.0" > "org.apache.felix/org.apache.felix.gogo.runtime/1.1.2" > "org.apache.felix/org.apache.felix.shell.remote/1.2.0" > > Connecting via telnet results in a connection closed > > $ telnet localhost 6666 > Trying ::1... > telnet: connect to address ::1: Connection refused > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > Good Bye! > Connection closed by foreign host. > > and an uncaught exception on the console for the app > > org.apache.felix.gogo.runtime.CommandNotFoundException: Command not > found: gosh > at > org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:596) > at > org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:5 > 26) > at > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) > at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) > at > java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoo > lExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPo > olExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:834) > > Adding back the "org.apache.felix/org.apache.felix.gogo.shell/1.1.2" > bundle fixes the issue, but requires an interactive TTY. > > I tried replacing the gogo shell bundle with org.apache.felix.shell, > but that is not aware of the gogo commands, and is therefore not > useful. > > I'm out of ideas at this point, so how can I use the gogo shell via > telnet without a local TTY? > > Thanks, > Robert > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org