Code Monkey home page Code Monkey logo

Comments (7)

narfa0215 avatar narfa0215 commented on September 28, 2024

Additionally, it needs to be clarified: what are the differences between xpra-server.service and xpra.service? Can xpra-server.service be enabled by default, or are there other viable solutions?

from xpra.

totaam avatar totaam commented on September 28, 2024

The solution to this problem is to remove the /etc/systemd/system/sockets.target.wants/xpra-server.socket file and restart the computer

No, this only stops xpra's proxy service from starting.

What you need to figure out is what else is claiming that port.
In any case, there's not enough information to act on, please see https://github.com/Xpra-org/xpra/wiki/Reporting-Bugs

from xpra.

narfa0215 avatar narfa0215 commented on September 28, 2024

The solution to this problem is to remove the /etc/systemd/system/sockets.target.wants/xpra-server.socket file and restart the computer

No, this only stops xpra's proxy service from starting.

What you need to figure out is what else is claiming that port. In any case, there's not enough information to act on, please see https://github.com/Xpra-org/xpra/wiki/Reporting-Bugs

You can try these steps in a Docker container or a virtual machine. The version is Ubuntu 22.04. Run the following commands:

DISTRO=jammy
#install https support for apt (which may be installed already):
apt update
apt install apt-transport-https software-properties-common
apt install ca-certificates
# add xpra GPG key:
wget -O "/usr/share/keyrings/xpra.asc" https://xpra.org/xpra.asc
# add the xpra repository:
wget -O "/etc/apt/sources.list.d/xpra.sources" https://xpra.org/repos/$DISTRO/xpra.sources
# add the optional beta channel:
# wget -O "/etc/apt/sources.list.d/xpra-beta.sources" https://xpra.org/repos/$DISTRO/xpra-beta.sources
# install the xpra package:
apt update
apt install xpra

To start the service using systemctl start xpra-server, you might encounter the error "systemd[39455]: xpra.socket: Failed to create listening socket ([::]:14500): Address already in use."

If you delete /etc/systemd/system/sockets.target.wants/xpra-server.socket, run systemctl enable xpra-server, and restart the computer, you should be able to access https://127.0.0.1:14500/ using a browser. Otherwise, you won't be able to access it.

I noticed that my issue has been marked as invalid, but I still believe it's a valid concern. If possible, please reconsider and consider reopening the issue for further discussion. Thank you!

from xpra.

totaam avatar totaam commented on September 28, 2024

The xpra proxy service is socket activated, that's what xpra.socket does.
You don't need to start the server, just connect to the socket and systemd will start the server.

from xpra.

MortenVinding avatar MortenVinding commented on September 28, 2024

I have the same problem.
Clean install of Xpra from:
https://raw.githubusercontent.com/Xpra-org/xpra/master/packaging/repos/jammy/xpra.sources

So systemd is listning on 14500 but as soon as I try to connect to it it fails because it can't spawn the server on port 14500...

Changing the proxy server to listen on port 8080 instead solves the problem:
systemctl edit --full xpra-server.socket

#ListenStream=14500
ListenStream=8080

from xpra.

totaam avatar totaam commented on September 28, 2024

My build logs show that Ubuntu 22.04 is using sd_listen:

$ grep '* sd_listen' logs/ubuntu-jammy.log 
* sd_listen            : Yes
* sd_listen            : Yes
* sd_listen            : Yes
* sd_listen            : Yes
* sd_listen            : Yes

And based on this, the build will include the socket activated version of the service file:

xpra/setup.py

Lines 1983 to 1989 in 3e0cd93

if os.path.exists("/bin/systemctl") or os.path.exists("/usr/bin/systemctl") or sd_listen_ENABLED:
if sd_listen_ENABLED:
copytodir("fs/lib/systemd/system/xpra.service", systemd_dir,
subs=subs)
else:
copytodir("fs/lib/systemd/system/xpra-nosocketactivation.service", systemd_dir,
dst_name="xpra.service", subs=subs)

As well as the socket file:

xpra/setup.py

Lines 1992 to 1993 in 3e0cd93

if sd_listen_ENABLED:
copytodir("fs/lib/systemd/system/xpra.socket", systemd_dir)


After a clean install, I see that they're there.
But there are also some extra duplicate files...
Probably the result of split packaging and Debian's automagic packaging scripts.
The commits below should fix that.


Until this lands in a stable release near you, you can just nuke all the xpra*.service and xpra*.socket files and use the latest ones instead:

from xpra.

MortenVinding avatar MortenVinding commented on September 28, 2024

Until this lands in a stable release near you, you can just nuke all the xpra*.service and xpra*.socket files and use the latest ones instead:

* [xpra-server.service](https://github.com/Xpra-org/xpra/blob/8d091417d1e415bc1c8b60fcdd666a83c7c8c5b5/packaging/debian/xpra/xpra-server.service)

* [xpra-server.socket](https://github.com/Xpra-org/xpra/blob/8d091417d1e415bc1c8b60fcdd666a83c7c8c5b5/packaging/debian/xpra/xpra-server.socket)

Thanks a lot @totaam that solved it :)

Now I have a new problem: we are using FreeIPA to manage user permissions.
So the users are not effectively created on the server until first login.

But I have created following FR to track that: #4141

from xpra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.