I'm experimenting with Portable Services, but the "walkthrough" example [1]
doesn't seem to work. The error:
  Failed to execute /usr/bin/portable-walkthrough-go: No such file or
directory
probably means something fairly fundamental is wrong, but I can't seem to
figure out what that might be. Any suggestions?

[1] http://0pointer.net/blog/walkthrough-for-portable-services-in-go.html

# systemd --version
systemd 249 (249.11-0ubuntu3.7pop1~1680050939~22.04~c5d2663)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS
+OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD
+LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4
+XZ +
ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
# uname -srvmpio
Linux 6.2.6-76060206-generic #202303130630~1679424972~22.04~4a8cde1 SMP
PREEMPT_DYNAMIC Tue M x86_64 x86_64 x86_64 GNU/Linux
# portablectl attach ./portable-walkthrough-go.raw
(Matching unit files with prefix 'portable-walkthrough-go'.)
Created directory /etc/systemd/system.attached.
Created directory
/etc/systemd/system.attached/portable-walkthrough-go.service.d.
Written
/etc/systemd/system.attached/portable-walkthrough-go.service.d/20-portable.conf.
Created symlink
/etc/systemd/system.attached/portable-walkthrough-go.service.d/10-profile.conf
→ /usr/lib/systemd/portable/profile/default/service.conf.
Copied /etc/systemd/system.attached/portable-walkthrough-go.service.
Created directory
/etc/systemd/system.attached/portable-walkthrough-go.socket.d.
Written
/etc/systemd/system.attached/portable-walkthrough-go.socket.d/20-portable.conf.
Copied /etc/systemd/system.attached/portable-walkthrough-go.socket.
Created symlink /etc/portables/portable-walkthrough-go.raw →
/home/ctuffli/dev/portables/portable-walkthrough-go/portable-walkthrough-go.raw.
# systemctl start portable-walkthrough-go.socket
# curl localhost:8080
curl: (56) Recv failure: Connection reset by peer
# systemctl status portable-walkthrough-go.socket
× portable-walkthrough-go.socket - Portable Walkthrough Go Edition Socket
     Loaded: loaded
(/etc/systemd/system.attached/portable-walkthrough-go.socket; disabled;
vendor preset: enabled)
    Drop-In: /etc/systemd/system.attached/portable-walkthrough-go.socket.d
             └─20-portable.conf
     Active: failed (Result: service-start-limit-hit) since Sun 2023-04-02
16:30:22 PDT; 11s ago
   Triggers: ● portable-walkthrough-go.service
     Listen: [::]:8080 (Stream)
        CPU: 866us

Apr 02 16:30:12 thelio systemd[1]: Listening on Portable Walkthrough Go
Edition Socket.
Apr 02 16:30:22 thelio systemd[1]: portable-walkthrough-go.socket: Failed
with result 'service-start-limit-hit'.
# systemctl status portable-walkthrough-go
× portable-walkthrough-go.service - Portable Walkthrough Go Edition Service
     Loaded: loaded
(/etc/systemd/system.attached/portable-walkthrough-go.service; static)
    Drop-In: /etc/systemd/system.attached/portable-walkthrough-go.service.d
             └─10-profile.conf, 20-portable.conf
     Active: failed (Result: exit-code) since Sun 2023-04-02 16:30:22 PDT;
20s ago
TriggeredBy: × portable-walkthrough-go.socket
    Process: 278282 ExecStart=/usr/bin/portable-walkthrough-go
(code=exited, status=203/EXEC)
   Main PID: 278282 (code=exited, status=203/EXEC)
        CPU: 41ms

Apr 02 16:30:22 thelio systemd[1]: Starting Portable Walkthrough Go Edition
Service...
Apr 02 16:30:22 thelio systemd[278282]: portable-walkthrough-go.service:
Failed to execute /usr/bin/portable-walkthrough-go: No such file or
directory
Apr 02 16:30:22 thelio systemd[278282]: portable-walkthrough-go.service:
Failed at step EXEC spawning /usr/bin/portable-walkthrough-go: No such file
or directory
Apr 02 16:30:22 thelio systemd[1]: portable-walkthrough-go.service: Main
process exited, code=exited, status=203/EXEC
Apr 02 16:30:22 thelio systemd[1]: portable-walkthrough-go.service: Failed
with result 'exit-code'.
Apr 02 16:30:22 thelio systemd[1]: Failed to start Portable Walkthrough Go
Edition Service.
Apr 02 16:30:22 thelio systemd[1]: portable-walkthrough-go.service: Start
request repeated too quickly.
Apr 02 16:30:22 thelio systemd[1]: portable-walkthrough-go.service: Failed
with result 'exit-code'.
Apr 02 16:30:22 thelio systemd[1]: Failed to start Portable Walkthrough Go
Edition Service.
# ./portable-walkthrough-go &
[1] 278308
# curl localhost:8080
Hello! You are visitor #3!
# fg
./portable-walkthrough-go
^C
#

Reply via email to