[aarch64] Can't start filebot-xpra docker container

Support for Ubuntu and other Desktop Linux distributions
Post Reply
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

[aarch64] Can't start filebot-xpra docker container

Post by JamesS »

Hello,

I can't start the filebot-xpra docker container on my Pi 4.

The following console interaction shows what happens and the error messages I receive:

Code: Select all

ubuntu@ubuntu:~/repos/filebot-docker$ docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454,auth=none --daemon=no
2021-10-19 17:15:00,549 Warning: failed to create script directory '/tmp/xdg/xpra':
2021-10-19 17:15:00,550  [Errno 2] No such file or directory: '/tmp/xdg/xpra'
xpra initialization error:
 invalid port number: 5454,auth=none
ubuntu@ubuntu:~/repos/filebot-docker$
The docker image is completely fresh, no other docker container is running, and the the port is not in use.

Any idea to solve this problem?

Thank you and best regards,
James
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't start filebot-xpra docker container

Post by rednoah »

This is probably the key error message:

Code: Select all

xpra initialization error:
 invalid port number: 5454,auth=none
The String value "5454,auth=none" is indeed not a port number. But the exact same command-line works for everyone else, at least on amd64 arch. Perhaps aarch64 packages an old version of xpra where the command-line arguments work differently?
:idea: Please read the FAQ and How to Request Help.
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

Re: Can't start filebot-xpra docker container

Post by JamesS »

I didn't have time to look into the problem in the last days.
Today, I wanted to, but the situation changes completely.
I assume this is due to your commits
- 0fad2a9a1d0c19c130d7b023cf016075e2c4d414, which creates the folder I mention in my error log.
- afd2795ec625b0f630ab9cd01e3b8803da56fcdd, which separates bind-tcp from tcp-auth.

But still, the filebot-xpra docker container does not work in my Pi4.
Instead, I receive the following output:

Code: Select all

ubuntu@ubuntu:~/filebot-docker$ docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454 --tcp-auth=none --daemon=no
2021-11-01 17:37:40,891 Warning: failed to create script directory '/run/user/1000/xpra':
2021-11-01 17:37:40,892  [Errno 2] No such file or directory: '/run/user/1000/xpra'
2021-11-01 17:37:40,893  ($XDG_RUNTIME_DIR has not been created?)
2021-11-01 17:37:41,199 created tcp socket '0.0.0.0:5454'
2021-11-01 17:37:41,204 cannot access python uinput module:
2021-11-01 17:37:41,204  No module named 'uinput'
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux 3ee3c989b04a 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64
Kernel command line:  coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:5B:C7:F6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.S41.log", Time: Mon Nov  1 17:37:47 2021
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2021-11-01 17:38:01,242  stopping vfb process with pid 49
xpra initialization error:
 /usr/lib/xorg/Xorg: did not provide a display number using displayfd
(EE)
Fatal server error:
(EE) Cannot write display number to fd 5
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/tmp/Xorg.S41.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
As the first issue is a missing python package, I build the container myself with an empty entrypoint. Then, I ran is interactively with bash, installed the module, and ran the entrypoint commands myself:

Code: Select all

ubuntu@ubuntu:~/filebot-docker$ docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5454:5454 filebot_xpra_test /bin/bash
root@3a0ff79093e3:/# apt-get update
[...]
Reading package lists... Done
root@3a0ff79093e3:/# apt-get install python3-pip
[...]
root@3a0ff79093e3:/# python3 -m pip install python-uinput
[...]
Successfully installed python-uinput-0.11.2
root@3a0ff79093e3:/# /opt/bin/run-as-user /opt/filebot-xpra/start
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454 --tcp-auth=none --daemon=no
2021-11-01 17:44:51,025 Warning: failed to create script directory '/run/user/1000/xpra':
2021-11-01 17:44:51,025  [Errno 2] No such file or directory: '/run/user/1000/xpra'
2021-11-01 17:44:51,025  ($XDG_RUNTIME_DIR has not been created?)
2021-11-01 17:44:51,270 created tcp socket '0.0.0.0:5454'
2021-11-01 17:44:51,291 cannot use uinput for virtual devices:
2021-11-01 17:44:51,291  [Errno 2] Failed to open the uinput device: No such file or directory. Perhaps load the uinput kernel module first?
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux 3a0ff79093e3 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64
Kernel command line:  coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:5B:C7:F6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.S940.log", Time: Mon Nov  1 17:44:57 2021
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2021-11-01 17:45:11,329  stopping vfb process with pid 951
xpra initialization error:
 /usr/lib/xorg/Xorg: did not provide a display number using displayfd
root@3a0ff79093e3:/# (EE)
Fatal server error:
(EE) Cannot write display number to fd 5
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/tmp/Xorg.S940.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
The problem with uinput device changed only slightly, but I do not know if this is the root cause of the problem.
Any ideas what to try next?
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't start filebot-xpra docker container

Post by rednoah »

Sorry, no idea. There's a good chance that xpra just doesn't work on aarch64 without some kind of tinkering, or at all. You could ask the xpra developer for support I suppose. We only "support" aarch64 in the sense that there is a package in the apt repository, so the build doesn't fail, but aarch64 is otherwise completely untested. So if you figure something out. Happy to accept pull requests.


:idea: The uinput thing might be a hint, and the key issue is that Xorg isn't working at all for some reason, but I wouldn't know where to start on that other than random Googling:

Code: Select all

xpra initialization error:
 /usr/lib/xorg/Xorg: did not provide a display number using displayfd
root@3a0ff79093e3:/# (EE)
Fatal server error:
(EE) Cannot write display number to fd 5
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/tmp/Xorg.S940.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
:arrow: Best to ask the xpra developers: https://github.com/Xpra-org/xpra/issues


EDIT:

This thread seems to be relevant based on keywords "aarch64" and "xorg":
https://github.com/Xpra-org/xpra/issues/3291
:idea: Please read the FAQ and How to Request Help.
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

Re: Can't start filebot-xpra docker container

Post by JamesS »

In the meantime, I read a little bit more in the xpra docus and especially the python-uinput does not seem to be important. See https://xpra.org/trac/wiki/FAQ for more information.

It seems that my main problem was an access rights problem. I can successfully start the container with docker run --rm -it -e PUID=1000 -e PGID=1000 -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra, i.e., the user and group properly set.
After doing this, I can connect to the container in my browser, but the content of the page is:
"Error response
Error code: 403
Message: Directory listing forbidden.
Error code explanation: 403 - Request forbidden -- authorization will not help."

The corresponding output in the console:

Code: Select all

ubuntu@ubuntu:~$ docker run --rm -it -e PUID=1000 -e PGID=1000 -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454 --tcp-auth=none --daemon=no
2021-11-07 22:07:08,116 Warning: failed to create script directory '/run/user/1000/xpra':
2021-11-07 22:07:08,117  [Errno 2] No such file or directory: '/run/user/1000/xpra'
2021-11-07 22:07:08,117  ($XDG_RUNTIME_DIR has not been created?)
2021-11-07 22:07:08,661 created tcp socket '0.0.0.0:5454'
2021-11-07 22:07:08,668 cannot access python uinput module:
2021-11-07 22:07:08,668  No module named 'uinput'
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux 5b82e449870c 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64
Kernel command line:  coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:5B:C7:F6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.S43.log", Time: Sun Nov  7 22:07:14 2021
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2021-11-07 22:07:28,684 Warning: failed to create socket directory '/run/user/1000/xpra'
2021-11-07 22:07:28,685  [Errno 2] No such file or directory: '/run/user/1000/xpra'
2021-11-07 22:07:28,686 Warning: failed to create socket directory '/run/xpra'
2021-11-07 22:07:28,687  [Errno 13] Permission denied: '/run/xpra'
2021-11-07 22:07:28,687 Warning: cannot create socket '/run/user/1000/xpra/5b82e449870c-0':
2021-11-07 22:07:28,688  [Errno 2] No such file or directory
2021-11-07 22:07:28,688  ($XDG_RUNTIME_DIR has not been created?)
2021-11-07 22:07:28,689 cannot create group socket '/run/xpra/5b82e449870c-0'
2021-11-07 22:07:28,689  [Errno 2] No such file or directory
2021-11-07 22:07:28,689  /run/xpra does not exist
2021-11-07 22:07:28,690 Warning: no local server sockets,
2021-11-07 22:07:28,690  forward-xdg-open cannot be enabled
2021-11-07 22:07:28,691  non-embedded ssh connections will not be available
2021-11-07 22:07:29,222 pointer device emulation using XTest
2021-11-07 22:07:29,508 serving html content from '/usr/share/xpra/www'
2021-11-07 22:07:33,498 OpenGL is supported on display ':0'
2021-11-07 22:07:33,499  using 'llvmpipe (LLVM 12.0.0, 128 bits)' renderer

(Xpra:43): Gtk-CRITICAL **: 22:07:33.737: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2021-11-07 22:07:33,764 started command 'filebot' with pid 106
2021-11-07 22:07:33,768 Warning: cannot watch for application menu changes without pyinotify:
2021-11-07 22:07:33,769  No module named 'pyinotify'
2021-11-07 22:07:33,868 xpra is ready.
2021-11-07 22:07:33,871 xpra GTK3 X11 version 3.0.6-r25177 64-bit
2021-11-07 22:07:34,228  uid=1000 (filebot), gid=1000 (filebot)
2021-11-07 22:07:34,228  running with pid 43 on Linux Ubuntu 20.04 focal
2021-11-07 22:07:34,230  connected to X11 display :0 with 24 bit colors
2021-11-07 22:07:38,102 3.7GB of system memory
2021-11-07 22:08:23,561 code 403, message Directory listing forbidden
This happens whether or not I use your container rednoah/filebot:xpra or a container created by myself, which uses the newest xpra arm64 beta (https://xpra.org/beta/focal/main/binary-arm64/).



Do you have any idea regarding the newest problem?
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't start filebot-xpra docker container

Post by rednoah »

Try -e PUID=0 -e PGID=0 to run as root inside the container?


:idea: No issues running with -e PUID=1000 -e PGID=1000 on amd64 arch in any case.
:idea: Please read the FAQ and How to Request Help.
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

Re: Can't start filebot-xpra docker container

Post by JamesS »

Running as a root brings new problems, which I did not investigate further:

Code: Select all

ubuntu@ubuntu:~$ docker run --rm -it -e PUID=0 -e PGID=0 -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454 --tcp-auth=none --daemon=no

Warning: running as root
2021-11-10 21:39:02,549 created tcp socket '0.0.0.0:5454'
2021-11-10 21:39:02,553 cannot access python uinput module:
2021-11-10 21:39:02,554  No module named 'uinput'

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux 968c4d083955 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64
Kernel command line:  coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:5B:C7:F6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.S7.log", Time: Wed Nov 10 21:39:08 2021
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2021-11-10 21:39:22,593  stopping vfb process with pid 15
xpra initialization error:
 /usr/lib/xorg/Xorg: did not provide a display number using displayfd
Running the following in my WSL linux environment does work like a charm a WSL2 environment:

Code: Select all

_@_:~$ docker run --rm -it -e PUID=1000 -e PGID=1000 -v $PWD:/volume1 -v data:/data -p 5454:5454 rednoah/filebot:xpra
+ xpra start --start-child=filebot --exit-with-children --bind-tcp=0.0.0.0:5454,auth=none --daemon=no
2021-11-10 21:36:53,516 Warning: failed to create script directory '/tmp/xdg/xpra':
2021-11-10 21:36:53,516  [Errno 2] No such file or directory: '/tmp/xdg/xpra'
2021-11-10 21:36:53,609 created tcp socket '0.0.0.0:5454'
failure on /tmp/.X11-unix/X42: [Errno 2] No such file or directory: '/tmp/.X11-unix/X42'
2021-11-10 21:36:53,612 cannot access python uinput module:
2021-11-10 21:36:53,612  No module named 'uinput'
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
2021-11-10 21:36:54,890 pointer device emulation using XTest
2021-11-10 21:36:54,941 serving html content from '/usr/share/xpra/www'
2021-11-10 21:36:54,960 Warning: failed to create socket directory '/run/user/1000/xpra'
2021-11-10 21:36:54,960  [Errno 13] Permission denied: '/run/user/1000'
2021-11-10 21:36:54,960 Warning: failed to create socket directory '/run/xpra'
2021-11-10 21:36:54,960  [Errno 13] Permission denied: '/run/xpra'
2021-11-10 21:36:54,960 Warning: cannot create socket '/run/user/1000/xpra/8af2fe6ee0c7-0':
2021-11-10 21:36:54,960  [Errno 2] No such file or directory
2021-11-10 21:36:54,960  ($XDG_RUNTIME_DIR has not been created?)
2021-11-10 21:36:54,961 cannot create group socket '/run/xpra/8af2fe6ee0c7-0'
2021-11-10 21:36:54,961  [Errno 2] No such file or directory
2021-11-10 21:36:54,961  /run/xpra does not exist
2021-11-10 21:36:54,962 created unix domain socket '/data/filebot/.xpra/8af2fe6ee0c7-0'

(Xpra:42): Gtk-CRITICAL **: 21:36:55.062: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2021-11-10 21:36:55,114 watching for applications menu changes in:
2021-11-10 21:36:55,114  '/usr/share/applications'
2021-11-10 21:36:55,126 started command 'filebot' with pid 98
2021-11-10 21:36:55,602 xpra is ready.
2021-11-10 21:36:55,607 xpra X11 seamless version 4.2.3-r12 64-bit
2021-11-10 21:36:55,612  uid=1000 (filebot), gid=1000 (filebot)
2021-11-10 21:36:55,615  running with pid 42 on Linux Ubuntu 20.04 focal
2021-11-10 21:36:55,622  connected to X11 display :0 with 24 bit colors
2021-11-10 21:36:56,068 12.3GB of system memory
2021-11-10 21:36:57,378 loaded 34 start menu entries from 5 sub-menus in 2.3 seconds
As you can see, it outputs also a lot of errors, but finally, it shows loaded 34 start menu entries from 5 sub-menus in 2.3 seconds.
This does not happen on my Pi.

However, this does not bring me any further in finding out the problem :-|
Post Reply