You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Istvan Toth (Jira)" <ji...@apache.org> on 2022/03/02 17:24:00 UTC

[jira] [Commented] (PHOENIX-6661) Sqlline does not work on PowerPC linux

    [ https://issues.apache.org/jira/browse/PHOENIX-6661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17500297#comment-17500297 ] 

Istvan Toth commented on PHOENIX-6661:
--------------------------------------

The only solution I can think of that we can do without waiting for fixes from JNA/jline/sqlline is the following:

Instead of using the the jar-with-dependencies JAR from sqlline, we can add sqlline and its dependencies to the classpath separately, and blacklist the problem jars (jline-terminal-jna and/or jline-terminal-jansi) based on the detected architecture.

> Sqlline does not work on PowerPC linux
> --------------------------------------
>
>                 Key: PHOENIX-6661
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6661
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> When trying to run phoenix-sqlline.py or phoenix-sqlline-thin.py on Linux PPC,
> we get the following exception:
> {noformat}
> Exception in thread "main" com.sun.jna.LastErrorException: [25] Inappropriate ioctl for device
>     at com.sun.jna.Native.invokeVoid(Native Method)
>     at com.sun.jna.Function.invoke(Function.java:415)
>     at com.sun.jna.Function.invoke(Function.java:361)
>     at com.sun.jna.Library$Handler.invoke(Library.java:265)
>     at com.sun.proxy.$Proxy0.ioctl(Unknown Source)
>     at org.jline.terminal.impl.jna.linux.LinuxNativePty.getSize(LinuxNativePty.java:95)
>     at org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
>     at org.jline.terminal.Terminal.getWidth(Terminal.java:196)
>     at sqlline.SqlLine.getConsoleReader(SqlLine.java:594)
>     at sqlline.SqlLine.begin(SqlLine.java:511)
>     at sqlline.SqlLine.start(SqlLine.java:267)
>     at sqlline.SqlLine.main(SqlLine.java:206){noformat}
> Upgrading to the latest sqlline 1.12 will result in the sqlline.py starting normally, but it will not accept any keyboard input.
> Replacing the currently used sqlline-*-jar-with-dependencies.jar JAR with the plain sqlline jar, and NOT adding the JNA and JANSI fixes the problem.
> Doing that, however, would break or at least seriously degrade sqlline functionality on Windows.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)