PDA

View Full Version : [ViX_Misc] OSCAM with SSL



chaser
25-11-14, 22:19
Hi,

Running Apollo build 090 on a Duo2, Solo2 and Ultimo and have been experimenting with SSL builds of OSCAM and my local card. Everything seemed to be working fine, but after a while I noticed that the boxes would grind to a halt and would need a reboot. This was never the case with the non SSL versions of OSCAM.

Today, I think I've worked out why. If I start the SSL version of OSCAM from the Softcam Manager page (green button), it starts okay, clears channels, and is reported as active. However, the green button doesn't change from 'start' to 'stop', so I can't actually stop OSCAM from the Softcam Manager. This is a bit of a pain as I have to restart the box if I want to kill the current running copy of OSCAM, and upgrade to a newer version (I guess there will be a way to kill it from the command line without a reboot), but is not the main issue...

When I go into the Softcam Manager info page I can see the SSL version of OSCAM is being restarted every 6 mins. The 'Enable Frozen Check' function seems to think that this version of OSCAM isn't running when it actually is, and then I guess it starts another instance. I presume this is what is causing the box to slow down over time. I've temporarily disabled the 'Enable Frozen Check' to see if that stops the box from grinding to a halt.

I'm using the latest 10035 version of OSCAM (oscam-svn10035-mips-tuxbox-oe2.0-webif-libusb-ssl-Distribution.tar.gz) downloaded from download.oscam.cc, and also a self compiled version at the same revision. I've also tried several older copies. All give the same result.

Any suggestions on how I can get this setup running more reliably without disabling the 'Enable Frozen Check'? :confused:

TIA
Chaser.

Edit: Ok, so running PS AUX from the command line seems to show an ever growing number of instances of OSCAM running when I have 'Enable Frozen Check' enabled (set to 1 min check):


login as: root
root@vuduo2:~# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.0 1900 656 ? Ss 21:29 0:00 init [3]
root 2 0.0 0.0 0 0 ? S 21:29 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 21:29 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S 21:29 0:00 [kworker/0:0]
root 5 0.0 0.0 0 0 ? S< 21:29 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S 21:29 0:00 [kworker/u4:0]
root 7 0.0 0.0 0 0 ? S 21:29 0:00 [rcu_sched]
root 8 0.0 0.0 0 0 ? S 21:29 0:00 [rcu_bh]
root 9 0.1 0.0 0 0 ? S 21:29 0:00 [migration/0]
root 10 0.4 0.0 0 0 ? S 21:29 0:02 [migration/1]
root 11 0.0 0.0 0 0 ? S 21:29 0:00 [ksoftirqd/1]
root 12 0.0 0.0 0 0 ? S 21:29 0:00 [kworker/1:0]
root 13 0.0 0.0 0 0 ? S< 21:29 0:00 [kworker/1:0H]
root 14 0.0 0.0 0 0 ? S< 21:29 0:00 [khelper]
root 15 0.0 0.0 0 0 ? S 21:29 0:00 [kdevtmpfs]
root 16 0.0 0.0 0 0 ? S< 21:29 0:00 [writeback]
root 17 0.0 0.0 0 0 ? S< 21:29 0:00 [bioset]
root 18 0.0 0.0 0 0 ? S< 21:29 0:00 [kblockd]
root 19 0.0 0.0 0 0 ? S< 21:29 0:00 [ata_sff]
root 20 0.0 0.0 0 0 ? S 21:29 0:00 [khubd]
root 21 0.0 0.0 0 0 ? S< 21:29 0:00 [cfg80211]
root 23 0.0 0.0 0 0 ? S< 21:29 0:00 [rpciod]
root 24 0.0 0.0 0 0 ? S 21:29 0:00 [kworker/1:1]
root 25 0.0 0.0 0 0 ? S 21:29 0:00 [kswapd0]
root 26 0.0 0.0 0 0 ? S 21:29 0:00 [fsnotify_mark]
root 27 0.0 0.0 0 0 ? S< 21:29 0:00 [nfsiod]
root 28 0.0 0.0 0 0 ? S< 21:29 0:00 [cifsiod]
root 29 0.0 0.0 0 0 ? S< 21:29 0:00 [crypto]
root 44 0.0 0.0 0 0 ? S 21:29 0:00 [scsi_eh_0]
root 45 0.0 0.0 0 0 ? S 21:29 0:00 [scsi_eh_1]
root 46 0.0 0.0 0 0 ? S 21:29 0:00 [kworker/u4:1]
root 48 0.0 0.0 0 0 ? S 21:29 0:00 [scsi_eh_2]
root 49 0.0 0.0 0 0 ? S 21:29 0:00 [usb-storage]
root 54 0.0 0.0 0 0 ? S< 21:29 0:00 [deferwq]
root 55 0.0 0.0 0 0 ? S 21:29 0:00 [ubi_bgt0d]
root 58 0.0 0.0 0 0 ? S 21:29 0:00 [ubifs_bgt0_0]
root 87 0.0 0.0 0 0 ? S< 21:29 0:00 [kworker/0:1H]
root 109 0.0 0.0 0 0 ? S 21:29 0:00 [jbd2/sda1-8]
root 110 0.0 0.0 0 0 ? S< 21:29 0:00 [ext4-rsv-conver]
root 120 0.0 0.0 0 0 ? S< 21:29 0:00 [kworker/1:1H]
root 174 0.0 0.0 0 0 ? S 21:29 0:00 [nx_sched]
root 175 0.5 0.0 0 0 ? S 21:29 0:02 [nx_sched_high_s]
root 176 0.0 0.0 0 0 ? S 21:29 0:00 [nx_sched_low_st]
root 177 0.0 0.0 0 0 ? S 21:29 0:00 [dpcr_integrator]
root 178 0.0 0.0 0 0 ? S 21:29 0:00 [nx_sched_idle_s]
root 179 0.0 0.0 0 0 ? S 21:29 0:00 [nx_sched_low]
root 180 0.0 0.0 0 0 ? S 21:29 0:00 [nx_sched_high]
root 216 0.0 0.0 0 0 ? S 21:29 0:00 [fbt0]
root 232 0.2 0.0 0 0 ? S 21:29 0:01 [lcd2]
root 248 0.0 0.0 0 0 ? S 21:29 0:00 [ci_kthread]
root 250 0.0 0.0 0 0 ? S 21:29 0:00 [ci_kthread]
daemon 437 0.0 0.0 1984 504 ? Ss 21:29 0:00 /sbin/portmap
root 482 0.0 0.0 2840 252 ? Ss 21:29 0:00 udhcpc -R -b -x hostname vuduo2 -p /var/run/
998 501 0.0 0.0 2940 904 ? Ss 21:29 0:00 /usr/bin/dbus-daemon --system
root 506 0.0 0.0 2584 536 ? Ss 21:29 0:00 /usr/sbin/dropbear -r /etc/dropbear/dropbear
root 515 0.0 0.0 0 0 ? S 21:29 0:00 [lockd]
root 516 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 517 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 518 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 519 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 520 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 521 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 522 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 523 0.0 0.0 0 0 ? S 21:29 0:00 [nfsd]
root 525 0.0 0.0 2772 604 ? Ss 21:29 0:00 /usr/sbin/rpc.mountd -f /etc/exports
rpc 531 0.0 0.0 2744 816 ? Ss 21:29 0:00 /usr/sbin/rpcbind
rpcuser 544 0.0 0.0 2236 888 ? Ss 21:29 0:00 /usr/sbin/rpc.statd
root 556 0.0 0.1 32524 1540 ? Ssl 21:29 0:00 automount
root 567 0.0 0.0 2956 664 ? Ss 21:29 0:00 /usr/sbin/inetd
root 574 0.0 0.0 2840 712 ? S 21:29 0:00 /sbin/syslogd -n -O /var/log/messages
root 577 0.0 0.0 2840 704 ? S 21:29 0:00 /sbin/klogd -n
avahi 585 0.0 0.1 3512 1660 ? S 21:29 0:00 avahi-daemon: running [vuduo2.local]
avahi 586 0.0 0.0 3512 476 ? S 21:29 0:00 avahi-daemon: chroot helper
root 590 0.0 0.0 2840 616 ? Ss 21:29 0:00 /bin/sh /usr/bin/enigma2.sh
root 597 9.7 7.1 267256 100180 ? Sl 21:29 0:48 /usr/bin/enigma2
root 600 0.0 0.0 0 0 ? S 21:29 0:00 [ca08]
root 601 0.0 0.0 0 0 ? S 21:29 0:00 [ci_kthread]
root 646 0.0 0.0 0 0 ? S 21:30 0:00 [kworker/0:2]
root 675 0.0 0.0 0 0 ? S 21:30 0:00 [kdvb-ad-0-fe-0]
root 724 0.0 0.0 5252 780 ? Ss 21:30 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 725 0.7 0.2 11396 3520 ? S<l 21:30 0:03 /usr/softcams/oscam-svn10035-ssl -b
root 795 0.3 0.0 2840 1056 ? Rs 21:30 0:01 /usr/sbin/dropbear -r /etc/dropbear/dropbear
root 804 0.0 0.0 3160 952 pts/0 Ss 21:30 0:00 -sh
root 929 0.0 0.0 5252 780 ? Ss 21:31 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 930 0.2 0.2 10460 2884 ? S<l 21:31 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1139 0.0 0.0 5252 780 ? Ss 21:32 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1140 0.2 0.2 10460 2884 ? S<l 21:32 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1341 0.0 0.0 5252 780 ? Ss 21:33 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1342 0.2 0.2 10460 2884 ? S<l 21:33 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1545 0.0 0.0 5252 780 ? Ss 21:34 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1546 0.1 0.2 10460 2884 ? S<l 21:34 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1770 0.0 0.0 5252 780 ? Ss 21:35 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1771 0.1 0.2 10460 2884 ? S<l 21:35 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1978 0.0 0.0 5252 780 ? Ss 21:36 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 1979 0.0 0.1 5964 2172 ? S<l 21:36 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 2189 0.0 0.0 5252 780 ? Ss 21:37 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 2190 0.0 0.1 5964 2172 ? S<l 21:37 0:00 /usr/softcams/oscam-svn10035-ssl -b
root 2334 0.0 0.0 0 0 ? S 21:37 0:00 [kworker/1:2]
root 2355 0.0 0.0 2720 980 pts/0 R+ 21:38 0:00 ps aux
root@vuduo2:~#

chaser
27-11-14, 09:18
More than 24hrs with 'Enable frozen check' disabled, and the boxes still running reliability.

So, is this just a problem with the way I've set things up,or can others replicate this problem?

timofee
27-11-14, 14:37
I can't help you with the technical aspects of your questions.

But I have always disable the frozen check whenever I load a new image. I can't see the point of leaving it enabled, and having it disabled permanently causes no problems with my boxes.

chaser
27-11-14, 19:51
But I have always disable the frozen check whenever I load a new image. I can't see the point of leaving it enabled, and having it disabled permanently causes no problems with my boxes.

Yeah. I get the impression it's a legacy thing when softcams might have been a bit less reliable on boxes with less memory. I've been running OSCAM with the frozen check disabled for a couple of days now without any issues. The only issue I'm now left with is that once I've started the softcam, there's no way to stop it from the UI. I need to kill it from the command line.

DaMacFunkin
27-11-14, 21:31
Can you not stop it from webif?

chaser
27-11-14, 22:07
Can you not stop it from webif?

I can't find any way to do it from OpenWebIf, but yes, I probably can stop it from the OSCAM webif. Using either the OSCAM webif or the command line, I need access to a PC to stop the softcam. It would be nice if I could do this from the normal UI.

chaser
11-01-15, 19:57
Still having problems with this on the latest (build 121). With 'Enable Frozen Check' enabled, I end up with multiple copies of OSCAM (built with SSL) running to the point that my box grinds to a halt. Has this been acknowledged by the devs as a 'bug'?

As posted earlier, the work around for me is to disable the frozen check, and it's not really caused me any problem; but it's still a work around.

TIA.

chaser
23-03-15, 00:23
Ran into this problem again today after doing a fresh install of build ViX 156 without restore. I initially forgot to disable the frozen check when re-applying all my settings. Any chance of getting a fix for this, or at least an acknowledgement of the problem?

Larry-G
24-03-15, 17:15
I can't help you with the technical aspects of your questions.

But I have always disable the frozen check whenever I load a new image. I can't see the point of leaving it enabled, and having it disabled permanently causes no problems with my boxes.

It is designed so that if your cam freezes or stops working after a set period of time (by default 6 Minutes but this can be changed by the user) the softcam manager will auto restart it. It is a very valuable feature and always has been.


Sent from my iPad Air using Tapatalk

chaser
24-03-15, 19:43
Thanks for the reply, Phoenix. I understand the benefit of the frozen cam check. But the problem I have is when running OSCAM with SSL, ViX only partially recognises that the cam is running (it is reported as active, but the option to stop / start the cam via the green button doesn't change - it always just gives me the option to start, even if it's already reported as active). This results in multiple instances of OSCAM starting (a new instance every 6 minutes), to the point that the box crashes out.

BTW, I can't see the code I previously attached to my first post. It says I need to be registered to view the code, but I'm already registered and logged in :confused:

abu baniaz
24-03-15, 19:58
Can you provide a config file to run tests against please?

chaser
24-03-15, 22:00
That's actually a bit more difficult than it first appears! To get OSCAM running securely in your test environment, you would also need appropriately signed SSL certs for your network installed in your sat box. My certificates wouldn't work in your test environment (and in any case it needs a copy of my private key that I wouldn't want to release).

In the first instance I've attached a copy of the OSCAM binary from my VU+ Box that has been compiled with SSL (compiled using the excellent simplebuild script created by Gorgone @ streamboard.tv). If you just replace your existing OSCAM binary with this one (keeping your own config), you should see the problem when you start the cam from the ViX Softcam manager GUI. You will see it go active, but the green button won't change from start to stop. OSCAM will be running, and you should be able to clear channels as normal, but because you don't have any SSL certs installed, you won't be able to negotiate a secure https connection to the OSCAM web interface from your web browser. That shouldn't really matter for the purposes of your test, and you should still be able to access it unsecurely.

Also, if you SSH into the box and run ps aux, you will notice that a new instance will start every time you hit the green start button via the Softcam manager on the box GUI. A new instance will also start every time the frozen check runs.

Many thanks for looking into this. I'm guessing that not many people are running OSCAM with SSL! If you need any further info, please just ask.

41409

timofee
25-03-15, 15:42
It is designed so that if your cam freezes or stops working after a set period of time (by default 6 Minutes but this can be changed by the user) the softcam manager will auto restart it. It is a very valuable feature and always has been.


I have always used disable frozen check on all my boxes for the last 18 months and never had a problem with cams not restarting.

Larry-G
25-03-15, 16:30
I have always used disable frozen check on all my boxes for the last 18 months and never had a problem with cams not restarting.

It's nothing to do with cams not restarting, it only kicks in if the cams stops working or freezes unexpectedly, then it will restart the cam.


Sent from my iPad Air using Tapatalk

chaser
25-03-15, 18:01
I have always used disable frozen check on all my boxes for the last 18 months and never had a problem with cams not restarting.

It's nothing to do with cams not restarting, it only kicks in if the cams stops working or freezes unexpectedly, then it will restart the cam.

Indeed, my issue is not that the cam doesn't restart. Quite the opposite in fact. The cam is being restarted multiple times, because the E2 code doesn't fully recognise that the SSL (https) version of OSCAM is running. It continually thinks it's frozen, and triggers multiple restarts. The devs are looking into this issue.

abu baniaz
25-03-15, 18:36
Can you try this. Enable debug logs please. These will be required

Extract file and place file in following location then restart
/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX

chaser
25-03-15, 20:29
Replaced the file, rebooted the box and tested, but get the same result. I've sent you a PM giving you a link to the debug file.

Thx.

abu baniaz
25-03-15, 20:46
Please try this file.

The debug log was not long enough. I'll also run on my end

chaser
26-03-15, 00:35
Ok. Sorry for the delay. Installed the new file (deleted the original .py & .pyo files first) and rebooted the box, but getting the same result. Uploaded 2 debug log files on my file server for you to pick up. Note that one of the debug log files has the same file name as the one I posted earlier. It's just got more stuff in it now.

This time I did multiple green button presses, which should have started & stopped the cam, but all this did was start multiple instances. Hopefully you can see this in the log files.

judge
26-03-15, 01:07
Out of interest, any particular reason you need to use Oscam over SSL & not the version available in the feeds?

abu baniaz
26-03-15, 02:41
The hypens/underscores are causing issues. Name your cam Oscam10639 or just plain old Oscam and you will be fine.



job Components.Task.Job name=AutoTimer #tasks=0 completed with [] in None
[SoftcamManager] oscam10639 already running
[SoftcamManager] Checking if oscam10639 is frozen
poll: unhandled POLLERR/HUP/NVAL for fd 60(16)
[SoftcamManager] oscam10639 is responding like it should
job Components.Task.Job name=SoftcamCheck #tasks=1 completed with [] in None

chaser
26-03-15, 09:11
Out of interest, any particular reason you need to use Oscam over SSL & not the version available in the feeds?

It was really just a general attempt to tighten up the security on my network. Initially triggered when I set up my own mail server, and has just expanded from there. If I can make a secure connection to a device, then that's what I try to do. I noticed that OSCAM could be compiled with SSL, so I set about trying to get that working.


The hypens/underscores are causing issues. Name your cam Oscam10639 or just plain old Oscam and you will be fine.

Thanks! That's worked (well sort of). If I have more than one cam in the softcam folder then the names need to be completely unique otherwise it doesn't work correctly. What I mean by that, is the name of one cam can't be a subset of the other. For example, I can't have one named 'oscam', and the other named 'oscam12345'. If I do this and start 'oscam12345', then the softcam manager incorrectly assumes both are running (although it only reports 'oscam12345' as active). If I then try to stop 'oscam', then the GUI hangs. If the cams are uniquely named 'oscam12345' and 'oscam23456', then it works fine.