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

sh: pzapit: not found #28

Closed
klara31 opened this issue Feb 12, 2021 · 18 comments
Closed

sh: pzapit: not found #28

klara31 opened this issue Feb 12, 2021 · 18 comments

Comments

@klara31
Copy link

klara31 commented Feb 12, 2021

linuxserver.io


Expected Behavior

Current Behavior

When starting the container, after a few moments the message sh: pzapit: not found appears. The container is running, but oscam is not working

Steps to Reproduce

Environment

OS:
CPU architecture: arm64
How docker service was installed:
From the official docker repo.

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

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    0
User gid:    0
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
sh: pzapit: not found
@project-bot project-bot bot added this to To do in Issue & PR Tracker Feb 12, 2021
@github-actions
Copy link

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

@tobbenb
Copy link
Member

tobbenb commented Feb 12, 2021

Please fill in all info we ask for!
Try running it as a normal user and not root.

@project-bot project-bot bot moved this from To do to Insufficient Info in Issue & PR Tracker Feb 12, 2021
@klara31
Copy link
Author

klara31 commented Feb 12, 2021

When running the container as non-root, oscam gives the following error:

2021/02/12 23:10:22 364424E5 r   (reader) smargo [smartreader] libusb_open error LIBUSB_ERROR_ACCESS : the user has insufficient permissions

My docker-compose.yml:

  oscam:
    image: ghcr.io/linuxserver/oscam:latest
    privileged: true
    container_name: oscam
    environment:
      - PUID=1000
      - PGID=100
      - TZ=${TZ}
    volumes:
      - ${USERDIR}/oscam:/config
      - /home/pi/picons/picons:/picons
    ports:
      - 8888:8888
      - 9000:9000
    network_mode: bridge
    devices:
      - /dev/bus/usb/001/004:/dev/bus/usb/001/004
    restart: unless-stopped

Removing the privileged: true has no effect. To get oscam running, I need PUID=0.

@tobbenb
Copy link
Member

tobbenb commented Feb 12, 2021

Change the permissions so that the pi user have permissions to the device.
Or you can add the ABC user to the same group inside the container as the group on the host.

@klara31
Copy link
Author

klara31 commented Feb 12, 2021

The user with ID 1000 (pi) is part of the plugdev group and the permissions of the device are:

pi@meter:~ $ id
UID=1000(pi) GID=1000(pi) groepen=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),994(docker),997(gpio),998(i2c),999(spi)
pi@meter:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev docker gpio i2c spi
pi@meter:~ $ ls -la /dev/bus/usb/001/004
crw-rw-r-- 1 root plugdev 189, 3 feb 12 10:05 /dev/bus/usb/001/004

So I think user 1000 should be able to access the device. However, with the docker-compose.yml as stated above, it doesn't...

@tobbenb
Copy link
Member

tobbenb commented Feb 12, 2021

I forgot it doesn't work like that. The plugdev group is not in the container, so it doesn't help that the user has permissions for it.
You can either set the permission on host or try adding the ABC user to the same gid as the plugdev group on the host. If there is no group with the same gid, then add it.

@klara31
Copy link
Author

klara31 commented Feb 12, 2021

OK, I have changed the following:

    environment:
      - PUID=1000
      - PGID=46

Where PGID=46 is the number for the plugdev group. Oscam is working OK with these settings. However, docker logs still gives the pzapit error

@tobbenb
Copy link
Member

tobbenb commented Feb 12, 2021

Not like that. You have to add the abc user to the group inside the container that has the gid 46. If there is no group with gid 46, then create it.

You can also just change the owner of the usb to the pi user on host.

@klara31
Copy link
Author

klara31 commented Feb 12, 2021

I'm not quite sure if I can follow you on the first part. User abc in the container has ID 1000, which is the PUID I am using. User 1000 on the host has access to GID 46. Group plugdev on the host has GID 46. What am I doing wrong?

@barzog
Copy link

barzog commented Mar 1, 2021

Regarding initial request - regarding pzapit. According to oscam source code (https://svn.streamboard.tv/oscam/trunk/module-dvbapi.c) we have following:
#if defined WITH_COOLAPI || defined WITH_COOLAPI2 || defined WITH_NEUTRINO
system("pzapit -rz");
#endif

So, if oscam compiled with coolapi/coolapi2 or neutrino - run pzapit -rz on start.
In docker oscam we have:
DVB API with COOLAPI support: no
DVB API with COOLAPI2 support: no
DVB API with NEUTRINO support: yes
So - it is compiled with neutrino. But zapit (https://github.com/tuxbox-neutrino/gui-neutrino/tree/master/src/zapit) is really absent.
I propose to drop neutriono support from docker image. For that we should in Dockerfile modify
./config.sh
--enable all
--disable
CARDREADER_DB2COM
CARDREADER_INTERNAL
CARDREADER_STINGER
CARDREADER_STAPI
CARDREADER_STAPI5
IPV6SUPPORT
LCDSUPPORT
LEDSUPPORT
READ_SDT_CHARSETS
WITH_NEUTRINO && \

@github-actions
Copy link

github-actions bot commented Apr 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@barzog
Copy link

barzog commented Jun 13, 2021

Any news on that?

@tobbenb
Copy link
Member

tobbenb commented Jun 13, 2021

Feel free to make a PR.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@joselzinga
Copy link

I'm having the same error-message, but Oscam is working fine in the container:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 01-migrations: executing...
[migrations] started
[migrations] no migrations found
[cont-init.d] 01-migrations: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...

      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1000
User gid: 20

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
sh: pzapit: not found

Judging source-code it is enough to rebuild without NEUTRINO support. Then again, the error does not bother me, but it might confuse others when they're having troubles with the container.

@tobbenb
Copy link
Member

tobbenb commented Mar 21, 2022

I'll look at removing neutrino when I get time.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
Issue & PR Tracker automation moved this from Insufficient Info to Done Apr 7, 2023
@github-actions
Copy link

github-actions bot commented May 7, 2023

This issue is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

4 participants