I'm not sure this is useful for you, but you say you are on a container platform. Have you tried to forward the port for gogo outside the container?
For docker this is with the -p flag. e.g. -p <host_port1>:<container_port1> -p <host_port2>:<container_port2> -p ... HTH - Ray On Thu, Feb 13, 2020 at 9:27 AM Robert Munteanu <romb...@apache.org> wrote: > 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: email@example.com <firstname.lastname@example.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 > > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay)