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.

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?

by (71.6k points)

Issuing that command returns a simple number (a process ID, I suppose). And a cursor keeps blinking on the terminal thereafter, without any other thing showing.

When you say 'evaluating a cell always fails, no matter what expression is in the cell', does anything happen? Do you get an error message?

No message is printed on the GUI. It is more like the program hangs: the crossed red circle gets highlighted/active and remains that way indefinitely. More like the kernel hangs up somewhere. The error message (cadabra-client: connection failed) is printed on the terminal.

Just to be sure: this is with the current master branch from github?

Yes it is. I cloned the github repo.

I'll have a look later tonight in a clean Mint 18 install. Did you try installing the binary package by any chance?

No, I started with compiling directly from source. I could be trying the already-made binary, but I'm afraid it will clash with the currently installed one. I'd need to first uninstall. How do I uninstall? Should I just run 'make uninstall'?

Yes, sudo make uninstall should work.

I ran that and successfully uninstalled. I then installed the LinuxMint binary, which also lead to the same issue with the GUI.

Ok, thanks, will get back to you tonight or tomorrow.

I'll appreciate it. Thanks.

One more: is this on Sarah (18), Serena (18.1), Sonya (18.2) or Sylvia (18.3)? (do cat /etc/issue to find out).

It is on Sonya (18.2).

I just tried on an up-to-date 18.2 and up-to-date 18 box, both of which work fine with the binary package...

I also tried on the virtual machine with 18 which I used to build the package. There, evaluation of a cell makes the GUI hang (does not respond to e.g. selecting a menu). After about 10-15 seconds, it eventually comes back to life, displaying the output, but the spinner keeps turning. Is this what you see as well?

It sounds like there is an issue with the client-to-server network connection. It is conceivable that it has something to do with some subtle ipv4 versus ipv6 issues in the network layer.

Selecting menus works in my case (e.g. "Edit -> Insert cell above" immediately responds by inserting the cell). But evaluating a cell for something as simple as "8 - 2; ", the GUI hangs indefinitely. On the bottom right corner it has "idle", which I presume indicates the state of the kernel (whether or not it is performing some calculation).

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         UG    100    0        0 enp0s25 U     100    0        0 enp0s25 UGH   100    0        0 enp0s25     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    localhost

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

by (71.6k 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 Connected to localhost. Escape character is '^]'. Connection closed by foreign host.

Also, the hosts file does contain the line 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.