Keep getting an error

I get this error running acestream on Linux:

▶ acestreamengine --client-console --live-cache-type memory --vod-cache-type memory
2024-07-07 08:23:06,959|MainThread|acestream|init segmenter done: log_path=/home/backoff/.ACEStream/logs/segmenter.log
2024-07-07 08:23:06,960|MainThread|acestream|Start Ace Stream 3.2.3
2024-07-07 08:23:06,960|MainThread|acestream|platform=linux
2024-07-07 08:23:06,960|MainThread|acestream|app=acestream
2024-07-07 08:23:06,960|MainThread|acestream|version=3.2.3 code=3020300 revision=be4471a date=2024-04-22
2024-07-07 08:23:06,960|MainThread|acestream|use_local_db=True
2024-07-07 08:23:06,960|MainThread|acestream|is_gui_mode=0
2024-07-07 08:23:06,960|MainThread|acestream|user_agent=Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36 AceStream/3.2.3
2024-07-07 08:23:06,960|MainThread|acestream|python_version=3.10.14-final-0
2024-07-07 08:23:06,960|MainThread|acestream|enable debug: 0
2024-07-07 08:23:06,960|MainThread|acestream|set debug level: 0
2024-07-07 08:23:06,963|MainThread|acestream.coreapp|pid=10693
2024-07-07 08:23:06,963|MainThread|acestream.coreapp|process monitor initialized
2024-07-07 08:23:06,964|MainThread|acestream|get_default_api_version: 2
2024-07-07 08:23:06,964|MainThread|acestream.coreapp|use fixed i2i_port: 62062
2024-07-07 08:23:06,964|MainThread|acestream.coreapp|state_dir='/home/backoff/.ACEStream'
2024-07-07 08:23:07,056|MainThread|acestream.coreapp|set_debug_from_ui: level=0
2024-07-07 08:23:07,056|MainThread|acestream|enable debug: 0
2024-07-07 08:23:07,056|MainThread|acestream|set debug level: 0
2024-07-07 08:23:07,067|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:51804
2024-07-07 08:23:07,067|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=8623
2024-07-07 08:23:07,067|MainThread|acestream.LM|listen on 8623
2024-07-07 08:23:07,227|MainThread|acestream.httpserver|start: addr= port=33953 allow_remote=0 allow_intranet=1
2024-07-07 08:23:07,227|MainThread|acestream.httpserver|start: bound on ('0.0.0.0', 33953)
2024-07-07 08:23:07,266|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:41989
2024-07-07 08:23:07,266|MainThread|acestream.SocketHandler.SocketHandler|failed to bind: addrinfo=[<AddressFamily.AF_INET: 2>, None, None, None, ('', 62062)]
2024-07-07 08:23:07,266|MainThread|acestream.APIServer|port 62062 is busy, rebind on dynamic port
2024-07-07 08:23:07,266|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=42353
2024-07-07 08:23:07,267|Instance2InstanceThread-31|acestream.APIServer|run: ready to receive remote commands on 42353
2024-07-07 08:23:07,267|PlaylistTaskManagerThread-32 (_run)|acestream.TaskManager|started
2024-07-07 08:23:07,267|MainThread|acestream.coreapp|update_runtime_info: error
Traceback (most recent call last):
  File "core/src/CoreApp.pyx", line 25028, in 
PermissionError: [Errno 13] Permission denied: '/usr/lib/acestream-engine/engine_runtime.json'
2024-07-07 08:23:09,280|Thread-19 (__forward)|acestream.upnp|Unable to create Port Forward. Error: UnknownError: <class 'Exception'>:UnknownError

All help is appreciated

btw I’m using Arch Linux and python 3.10.14. I Installed acestream using the AUR. The OS is running on bare metal.

When I try to run a stream using acestream-launcher this happens:

▶ acestream-launcher "acestream://d63d8a57cf471394bfa9f619bbd68b01ae27a801"
Cannot connect to Acestream engine!

Exiting...
Exception in thread Thread-1 (_start_process):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/acestream/engine.py", line 58, in _start_process
    self.emit('started')
  File "/usr/lib/python3.12/site-packages/acestream/object.py", line 23, in emit
    self._events[event_name](*callback_args)
  File "/usr/lib/python3.12/site-packages/acestream_launcher/stream.py", line 105, in _on_engine_started
    self._timeout(self.server, 'available', 'Cannot connect to Acestream engine!')
  File "/usr/lib/python3.12/site-packages/acestream_launcher/stream.py", line 102, in _timeout
    self.emit('error')
  File "/usr/lib/python3.12/site-packages/acestream/object.py", line 23, in emit
    self._events[event_name](*callback_args)
  File "/usr/lib/python3.12/site-packages/acestream_launcher/launcher.py", line 112, in quit
    self.stream.stop()
  File "/usr/lib/python3.12/site-packages/acestream_launcher/stream.py", line 54, in stop
    self.playlist.remove()
  File "/usr/lib/python3.12/site-packages/acestream_launcher/stream.py", line 28, in remove
    if os.path.isfile(self.path):
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen genericpath>", line 30, in isfile
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

This error can be fixed by setting correct permissions for ‘/usr/lib/acestream-engine’ directory - it should be writable by user/group, which used to run ‘acestream-engine’.
‘acestream-launcher’ - is not a part of official Ace Stream package, so you should ask for support on Arch Linux forums or contact package maintainer directly.

1 лайк

What should the correct permissions be for /usr/lib/acestream-engine?

I did add myself to the acestream group but that didn’t solve the error.

We know nothing about how Ace Stream is started in this AUR package - you may check with top/htop what user is used to run acestreamengine and either change ownership (chown -R) of ‘/usr/lib/acestream-engine’ directory and files within or set dir permissions to RWX (chmod 755).

Permissions are set to 755 out of the box

░▒▓   /usr/lib/acestream-engine   22:27  
▶ ll
Permissions Size User Date Modified Name
drwxr-xr-x     - root  7 jul 12:23   data
drwxr-xr-x     - root  7 jul 12:23   lib
.rw-r--r--   461 root 13 jul 19:03   acestream.conf
.rwxr-xr-x   14k root  7 jul 12:22   acestreamengine

The following is a copy of the relevant part of the acestream-engine PKGBUILD from the AUR:

package() {
  sed -i "/ROOT=/c\ROOT=\/usr/lib\/${pkgname}" "start-engine"

  install -Dm755 "start-engine"                "$pkgdir/usr/bin/$pkgname"
  install -Dm644 "acestream.conf"              "$pkgdir/usr/lib/$pkgname/acestream.conf"
  install -Dm755 "acestreamengine"             "$pkgdir/usr/lib/$pkgname/acestreamengine"
  cp -a "data"                                 "$pkgdir/usr/lib/$pkgname/"
  cp -a "lib"                                  "$pkgdir/usr/lib/$pkgname/"
  install -Dm644 "data/images/streamer-32.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"

  install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 "LICENSE"          "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  ln -sf "/usr/bin/$pkgname" "$pkgdir/usr/bin/acestreamengine"

Since the program functions as it should apart from the error I will ask the maintainer of the package. Thak you for your help.

Слава России!