linuxserver / docker-calibre

GNU General Public License v3.0
339 stars 62 forks source link

Error launching startup command: Failed to close file descriptor for child process (Operation not permitted) #102

Closed demozthenz closed 1 year ago

demozthenz commented 1 year ago

linuxserver.io

When opening Guacamole Client via the web browser, Openbox prompts with the following error: "Error launching startup command: Failed to close file descriptor for child process (Operation not permitted)"

Expected Behavior

When the docker is started and Guacamole client is accessed via the web browser, Calibre should launch and be displayed.

Current Behavior

When the docker is started and Guacamole client is accessed via the web browser, Claibre does not auto start. Instead, Openbox prompts with an error that says "Error launching startup command: Failed to close file descriptor for child process (Operation not permitted)" If you attempt to run Calibre via right clicking the desktop > Calibre, Openbox prompts with the following error: "Failed to close file descriptor for child process (Operation not permitted)"

Steps to Reproduce

  1. Start the docker container.
  2. Access the Guacamole client web GUI

Environment

OS: Unraid CPU architecture: x64 How docker service was installed: Unraid "App Store" via the official linuxserver docker repo.

Command used to create docker container (run/create/compose/screenshot)

image

Docker logs

[293]: INFO: Internal RDP client disconnected guacd[230]: INFO: Connection "$14e07f83-ff86-49d6-b684-95d971282c27" removed. guacd[230]: INFO: Creating new client for protocol "rdp" guacd[230]: INFO: Connection ID is "$9c8691bc-c094-4964-8325-4f301d19db0a" guacd[382]: INFO: Security mode: Negotiate (ANY) guacd[382]: INFO: Resize method: none guacd[382]: INFO: User "@adec5209-4b91-4b9e-b8c2-c18bfc1f7920" joined connection "$9c8691bc-c094-4964-8325-4f301d19db0a" (1 users now present) guacd[382]: INFO: Loading keymap "base" guacd[382]: INFO: Loading keymap "en-us-qwerty" guacd[382]: INFO: Accepted format: 16-bit PCM with 2 channels at 44100 Hz guacd[382]: INFO: Accepted format: 16-bit PCM with 2 channels at 22050 Hz guacd[382]: INFO: Connected to RDPDR 1.12 as client 0xde40b337 guacd[382]: INFO: RDPDR user logged on guacd[382]: INFO: User "@adec5209-4b91-4b9e-b8c2-c18bfc1f7920" disconnected (0 users remain) guacd[382]: INFO: Last user of connection "$9c8691bc-c094-4964-8325-4f301d19db0a" disconnected [2022-09-21 00:50:06] [Connection 2] Closing connection with error: Error: not opened at WebSocket.send (/gclient/node_modules/ws/lib/WebSocket.js:218:38) at ClientConnection.send (/gclient/node_modules/guacamole-lite/lib/ClientConnection.js:125:24) at GuacdClient.sendBufferToWebSocket (/gclient/node_modules/guacamole-lite/lib/GuacdClient.js:172:35) at GuacdClient.processReceivedData (/gclient/node_modules/guacamole-lite/lib/GuacdClient.js:163:14) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) guacd[382]: INFO: Internal RDP client disconnected guacd[230]: INFO: Connection "$9c8691bc-c094-4964-8325-4f301d19db0a" removed. [2022-09-21 00:36:49] [Connection 1] Client connection closed rdpClientConRecv: g_sck_recv failed(returned 0) rdpClientConRecvMsg: error rdpClientConCheck: rdpClientConGotData failed rdpClientConDisconnect: rdpRemoveClientConFromDev: removing clientCon 0x55a4bab91350 [2022-09-21 00:37:35] [Connection 2] Client connection open [2022-09-21 00:37:35] [Connection 2] Opening guacd connection [2022-09-21 00:37:35] [Connection 2] guacd connection open [2022-09-21 00:37:35] [Connection 2] Selecting connection type: rdp [2022-09-21 00:37:35] [Connection 2] Sending opCode: 6.select,3.rdp; [2022-09-21 00:37:35] [Connection 2] Sending opCode: 4.size,4.1920,13.969?undefined,2.96; [2022-09-21 00:37:35] [Connection 2] Sending opCode: 5.audio,9.audio/L16; [2022-09-21 00:37:35] [Connection 2] Sending opCode: 5.video; [2022-09-21 00:37:35] [Connection 2] Sending opCode: 5.image; [2022-09-21 00:37:35] [Connection 2] Server sent handshake: 4.args,13.VERSION_1_1_0,8.hostname,4.port,6.domain,8.username,8.password,5.width,6.height,3.dpi,15.initial-program,11.color-depth,13.disable-audio,15.enable-printing,12.printer-name,12.enable-drive,10.drive-name,10.drive-path,17.create-drive-path,7.console,13.console-audio,13.server-layout,8.security,11.ignore-cert,12.disable-auth,10.remote-app,14.remote-app-dir,15.remote-app-args,15.static-channels,11.client-name,16.enable-wallpaper,14.enable-theming,21.enable-font-smoothing,23.enable-full-window-drag,26.enable-desktop-composition,22.enable-menu-animations,22.disable-bitmap-caching,25.disable-offscreen-caching,21.disable-glyph-caching,16.preconnection-id,18.preconnection-blob,8.timezone,14.recording-path,14.recording-name,24.recording-exclude-output,23.recording-exclude-mouse,22.recording-include-keys,21.create-recording-path,13.resize-method,18.enable-audio-input,9.read-only,16.gateway-hostname,12.gateway-port,14.gateway-domain,16.gateway-username,16.gateway-password,17.load-balance-info [2022-09-21 00:37:35] [Connection 2] Sending opCode: 7.connect,0.,9.127.0.0.1,4.3389,0.,3.abc,3.abc,4.1920,13.969?undefined,2.96,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,12.en-us-qwerty,3.any,4.true,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.; rdpClientConGotConnection: rdpClientConGotConnection: g_sck_accept ok new_sck 9 rdpClientConGetConnection: idle_disconnect_timeout set to non-positive value, idle timer turned off rdpAddClientConToDev: adding first clientCon 0x55a4bab91350 rdpClientConProcessMsgVersion: version 0 0 0 1 rdpClientConProcessScreenSizeMsg: set width 1920 height 969 bpp 16 rdpClientConProcessScreenSizeMsg: shmemid 1 shmemptr 0x154ac54bf000 rdpRRScreenSetSize: width 1920 height 969 mmWidth 508 mmHeight 256 rdpRRGetInfo: screen resized to 1920x969 rdpClientConProcessScreenSizeMsg: RRScreenSizeSet ok=[1] rdpClientConProcessMsgClientInput: invalidate x 0 y 0 cx 1920 cy 969 rdpClientConProcessMsgClientInfo: got client info bytes 7072 jpeg support 0 offscreen support 0 offscreen size 0 offscreen entries 0 client supports glyph cache but server disabled client can not do offscreen to offscreen blits client can do new(color) cursor client can not do multimon rdpRRSetRdpOutputs: numCrtcs 1 numOutputs 1 monitorCount 0 rdpRRSetRdpOutputs: update output 0 left 0 top 0 width 1920 height 969 rdpRRUpdateOutput: rdpLoadLayout: keylayout 0x00000409 variant display 10 rdpkeybChangeKeyboardControl: rdpkeybChangeKeyboardControl: autoRepeat on rdpkeybChangeKeyboardControl: rdpkeybChangeKeyboardControl: autoRepeat on rdpInDeferredRepeatCallback: rdpkeybChangeKeyboardControl: rdpkeybChangeKeyboardControl: autoRepeat off rdpInDeferredRepeatCallback: rdpkeybChangeKeyboardControl: rdpkeybChangeKeyboardControl: autoRepeat off [2022-09-21 00:50:06] [Connection 2] Closing guacd connection [2022-09-21 00:50:06] [Connection 2] Client connection closed rdpClientConRecv: g_sck_recv failed(returned 0) rdpClientConRecvMsg: error rdpClientConCheck: rdpClientConGotData failed rdpClientConDisconnect: rdpRemoveClientConFromDev: removing clientCon 0x55a4bab91350 cont-init: info: /etc/cont-init.d/98-calibre exited 0 cont-init: info: running /etc/cont-init.d/99-custom-files /config/custom-cont-init.d/README.txt: line 1: data: command not found /config/custom-cont-init.d/README.txt: line 2: data: command not found /config/custom-cont-init.d/README.txt: line 3: data: command not found /config/custom-cont-init.d/README.txt: line 4: data: command not found /config/custom-cont-init.d/README.txt: line 5: data: command not found /config/custom-cont-init.d/README.txt: line 6: data: command not found /config/custom-cont-init.d/README.txt: line 7: data: command not found /config/custom-cont-init.d/README.txt: line 8: data: command not found /config/custom-cont-init.d/README.txt: line 9: data: command not found /config/custom-cont-init.d/README.txt: line 10: data: command not found /config/custom-cont-init.d/README.txt: line 11: data: command not found /config/custom-cont-init.d/README.txt: line 12: data: command not found /config/custom-cont-init.d/README.txt: line 13: data: command not found /config/custom-cont-init.d/README.txt: line 14: data: command not found cont-init: info: /etc/cont-init.d/99-custom-files exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-mods: starting s6-rc: info: service init-mods successfully started s6-rc: info: service init-mods-package-install: starting s6-rc: info: service init-mods-package-install successfully started s6-rc: info: service init-mods-end: starting s6-rc: info: service init-mods-end successfully started s6-rc: info: service init-services: starting s6-rc: info: service init-services successfully started s6-rc: info: service legacy-services: starting services-up: info: copying legacy longrun calibre-web (no readiness notification) s6-rc: info: service legacy-services successfully started s6-rc: info: service 99-ci-service-check: starting s6-rc: info: service 99-ci-service-check successfully started Setting up desktop integration...

____ WARNING ____ Setting up desktop integration failed with error:


    Traceback (most recent call last):
      File "calibre/linux.py", line 852, in setup_desktop_integration
      File "calibre/linux.py", line 874, in do_setup_desktop_integration
      File "calibre/linux.py", line 905, in install_xdg_junk
      File "calibre/linux.py", line 890, in install_icons
      File "calibre/linux.py", line 884, in install_single_icon
      File "subprocess.py", line 364, in check_call
      File "subprocess.py", line 345, in call
      File "subprocess.py", line 966, in __init__
      File "subprocess.py", line 1842, in _execute_child
    FileNotFoundError: [Errno 2] No such file or directory: 'xdg-icon-resource'

Creating un-installer: /usr/bin/calibre-uninstall

There were 2 warnings

github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

demozthenz commented 1 year ago

Apologies. Didn't realize there was already a workaround.

timgilbert commented 1 year ago

Sorry, what is the workaround? I'm having the same issue with 6.5.0 in an x64-86 unraid host.

aptalca commented 1 year ago

it's in the readme

demozthenz commented 1 year ago

@timgilbert https://docs.linuxserver.io/faq#jammy

Add "--security-opt seccomp=unconfined" to the extra args for your container.

aptalca commented 1 year ago

https://github.com/linuxserver/docker-calibre#parameters

isrdude commented 1 year ago

For those of us new to all of this, how do you:

Add "--security-opt seccomp=unconfined" to the extra args for your container.

In Unraid?

Thanks in advance

aptalca commented 1 year ago

it's really a question for unraid, but you click on advanced and enter it into extra arguments

cpuks commented 1 year ago

For those of us new to all of this, how do you:

Add "--security-opt seccomp=unconfined" to the extra args for your container.

In Unraid?

Thanks in advance

image

isrdude commented 1 year ago

Thank you for the help! The Unraid crew pushed me to here and gave me no help at all. Surprised me as the Unraid Forum is usually on of the best for helping out!

Thanks again