Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hi,
I just installed cadabra2by compiling from source on a machine running Linux Mint 18. I tested the command line version of cadabra, and it seems to work well (albeit with simple addition/multiplication of numerical and algebraic expresions; not with tensor quantities). The GUI version fails. After firing the gui with cadabra2-gtk I do get the GUI but evaluating a cell always fails, no matter what expression is in the cell. The message "cadabra-client: connection failed" prints on the terminal from which I fired Cadabra. I traced it to a function/method in ComputeThread.cc under the client_server subdirectory in the source code.
Any suggestions to get around this problem? Any help will be appreciated.

asked in Installation trouble by

Hi, I am having the exact same issue from WSL (Windows Subsystem for Linux). Did you manage to solve the issue in the end?

2 Answers

+1 vote

What happens if you try to start cadabra-server from a terminal window?

answered by (57.8k points)

Does the GUI say 'connected' at the bottom?

No, it doesn't. It only says 'idle'.

Can you please run

route -n

in the terminal and send me the output?

Here is the output:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         146.231.61.129  0.0.0.0         UG    100    0        0 enp0s25
146.231.61.128  0.0.0.0         255.255.255.128 U     100    0        0 enp0s25
146.231.129.20  146.231.61.129  255.255.255.255 UGH   100    0        0 enp0s25
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s25

Hi, I am encountering the very same issue as the OP of this thread, I believe. I am using WSL, but the symptoms are really the same: Cadabra2 works just fine from command line, but if I give any command in the GUI it will just freeze. (bottom right displays "idle")

+1 vote

For anyone running into this problem: this is a network issue, by which the cadabra2-gtk process is unable to reach the cadabra-server. Try the following:

  • Start cadabra-server by hand from a separate terminal window. This spits out two lines; a number and a uuid identifier. That first number is the port to which the server has bound.
  • Try to connect to that port by hand using

    telnet localhost [port]
    

    Then report here whether the connection is achieved or not.

  • If the connection failed, check whether /etc/hosts contains a line

    127.0.0.1    localhost
    

On WSL it is conceivable that the windows firewall prevents these connections from being created.

answered by (57.8k points)

Hi Kasper, thanks for the support. I'm the guy trying to use WSL. Unfortunately
telnet localhost [####]
where #### is the port number given by cadabra-server returns
"could not resolve localhost/[####]: Servname not supported for ai_socktype"
In the meantime I am looking into possible firewall issues.
As an aside, browsers and co. seem to work just fine even from the WSL.

Type that without the square brackets.

OK, now it returns:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Also, the hosts file does contain the line
127.0.0.1 localhost

Disabling the firewall I get the same results

Hi Kasper, a small update.
I tried accessing cadabra from jupyter, instead of using directly cadabra2-gtk.
In this case, the jupyter notebook cannot connect to the cadabra kernel apparently.
Jupyter can instead connect to the Python kernel.
Best,
C.

...