Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for systemd sockets? #357

Open
Ra2-IFV opened this issue Nov 23, 2024 · 2 comments
Open

Support for systemd sockets? #357

Ra2-IFV opened this issue Nov 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Ra2-IFV
Copy link

Ra2-IFV commented Nov 23, 2024

Useful information:

Please, try to gather as much of useful information as possible and follow
these instructions:

  • Version:
    • Run this command: wayvnc -V

0.8.0-2

  • Try to reproduce while capturing a trace log:

    • wayvnc -Ltrace | tee wayvnc-crash.log
  • Get the stack trace:

    • If have coredumpctl, you can gather the stack trace after a crash using
      coredumpctl gdb wayvnc and then run bt full to obtain the stack trace.
    • Otherwise, you can either locate the core file and load it into gdb or run
      wayvnc in gdb like so:
      • gdb --args wayvnc -Ltrace
    • If the lines mentioning wayvnc, neatvnc or aml have ??, please compile
      wayvnc and those other projects from source with debug symbols and try
      again.
Info: Capturing output OUTPUT
Info: >> Headless output 11 1920x1080+0x0 Power:ON
Info: -- MONITOR 0000000000000 (HDMI-1) 1920x1080+0x0 Power:ON
ERROR: ../wayvnc/src/main.c: 893: Failed to bind to address. Add -Ldebug to the argument list for more info.
Process 100000 (wayvnc) of user 10000 dumped core.

Stack trace of thread 626156:
#0  0x000073d0600d4984 aml_ref (libaml.so.0 + 0x2984)
#1  0x000073d0600d53c8 aml_stop (libaml.so.0 + 0x33c8)
#2  0x00005ada052260ba n/a (wayvnc + 0xb0ba)
#3  0x00005ada05227a9b n/a (wayvnc + 0xca9b)
#4  0x00005ada0522083e n/a (wayvnc + 0x583e)
#5  0x000073d05fe42e08 n/a (libc.so.6 + 0x25e08)
#6  0x000073d05fe42ecc __libc_start_main (libc.so.6 + 0x25ecc)
#7  0x00005ada05221395 n/a (wayvnc + 0x6395)
ELF object binary architecture: x86-64
  • Describe how to reproduce the problem

wayvnc.socket

[Unit]
Description=WayVNC socket

[Socket]
ListenStream=0.0.0.0:5901

[Install]
WantedBy=sockets.target

wayvnc.service

[Unit]
After=network.target

[Service]
Type=simple
Environment='WAYLAND_DISPLAY=wayland-0'
ExecStart=wayvnc -Ltrace --unix-socket

config

# address=0.0.0.0
# port=5901

enable_auth=false

use_relative_paths=true
@Ra2-IFV Ra2-IFV added the bug Something isn't working label Nov 23, 2024
@layercak3
Copy link
Contributor

There is support via the external listener fd feature introduced in 0.9.0 (but not the specific sd_listen_fds(3) protocol). With your set of units you would use ExecStart=wayvnc [...] -x 3 to treat the address argument (3) as an fd which is where systemd's socket would be accessible from. You should also have Requires=wayvnc.socket in the [Unit] section of wayvnc.service in case you ever start wayvnc.service manually without it being triggered by socket activation, otherwise wayvnc would start with fd 3 being unusable.

@Ra2-IFV
Copy link
Author

Ra2-IFV commented Nov 23, 2024

My distro is still on 0.8.0 I'll report once I got the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants