kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
March 02, 2012, 09:41:28 PM |
|
Tell you what, when my BFL's arrive I'll throw something your way. With my current 0.1 BTC/day, I'll take whatever I can get (What with the extension not being too useful until they DO arrive!) Well I did say " IF you need this" Plural BFL - that will be a big jump! (2 would be 10x your current)
|
|
|
|
The LT
|
|
March 03, 2012, 10:29:15 PM |
|
Just for everyone's information, if you use syslog-logging in cgminer, it won't provide 5-second data via the API. Should be disabled in cgminer's config. Haven't really looked into it, but seems like cgminer's bug...
|
|
|
|
Eveofwar
|
|
March 04, 2012, 10:01:41 PM |
|
Just clone'd the latest into a folder...somehow I'm missing all the edit buttons and have no way of controlling CGMiner from the page. Using CGMiner version 2.3.1-2 Windows
Missing in FF, Chrome and IE...any thoughts ?
|
|
|
|
P_Shep
Legendary
Offline
Activity: 1804
Merit: 1230
This is not OK.
|
|
March 05, 2012, 04:34:44 AM |
|
need to enable the 'write' privileges to the webhost. See the cgminer documentation. --api-allow Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets] This overrides --api-network and you must specify 127.0.0.1 if it is required W: in front of the IP address gives that address privileged access to all api commands --api-description Description placed in the API status header (default: cgminer version) --api-listen Listen for API requests (default: disabled) By default any command that does not just display data returns access denied See --api-allow to overcome this --api-network Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1) --api-port Port number of miner API (default: 4028)
|
|
|
|
Eveofwar
|
|
March 05, 2012, 04:36:58 AM Last edit: March 05, 2012, 04:47:21 AM by Eveofwar |
|
need to enable the 'write' privileges to the webhost. See the cgminer documentation. --api-allow Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets] This overrides --api-network and you must specify 127.0.0.1 if it is required W: in front of the IP address gives that address privileged access to all api commands --api-description Description placed in the API status header (default: cgminer version) --api-listen Listen for API requests (default: disabled) By default any command that does not just display data returns access denied See --api-allow to overcome this --api-network Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1) --api-port Port number of miner API (default: 4028)
Sweet, guess that's something new. I'll get it going. EDIT: Bingo
|
|
|
|
kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
March 05, 2012, 12:27:09 PM |
|
... Sweet, guess that's something new. I'll get it going. EDIT: Bingo Actually I added it 2 weeks ago So it's been in the releases since 2.3.0 (11 days ago) In case it wasn't obvious, the idea is that you have to give extra access if you want to allow access to change your cgminer ... including shut down cgminer, turn off the fans, mine on some other pool with a different username and password, over volt the GPU and destroy it ... things like that I realised it was a security issue/hole that needed to be closed for anyone using cgminer and a new command defined to allow people to decide to give the extra write/privileged access So I added the extra --api-allow argument and the W: option The old options still work ... almost as before ... except you can only successfully access commands that only report cgminer info. All other cgminer API commands (that change cgminer) return "Access denied to '%s' command" unless the IP address has the extra W: access Edit: posted in this thread 13 days ago https://bitcointalk.org/index.php?topic=57342.msg760859#msg760859
|
|
|
|
Eveofwar
|
|
March 05, 2012, 06:30:48 PM |
|
... Sweet, guess that's something new. I'll get it going. EDIT: Bingo Actually I added it 2 weeks ago So it's been in the releases since 2.3.0 (11 days ago) In case it wasn't obvious, the idea is that you have to give extra access if you want to allow access to change your cgminer ... including shut down cgminer, turn off the fans, mine on some other pool with a different username and password, over volt the GPU and destroy it ... things like that I realised it was a security issue/hole that needed to be closed for anyone using cgminer and a new command defined to allow people to decide to give the extra write/privileged access So I added the extra --api-allow argument and the W: option The old options still work ... almost as before ... except you can only successfully access commands that only report cgminer info. All other cgminer API commands (that change cgminer) return "Access denied to '%s' command" unless the IP address has the extra W: access Edit: posted in this thread 13 days ago https://bitcointalk.org/index.php?topic=57342.msg760859#msg760859Yar, moved from CGMiner 2.2.7 to 2.3.1-2 without reading too much into the changelog. I was reading on the CGMiner home thread about --api-allow, but it didn't give any hint towards W: giving write privileges. I'm completely tracking you with the need for security; great job.
|
|
|
|
tynt
Member
Offline
Activity: 61
Merit: 10
|
|
March 06, 2012, 01:13:48 PM |
|
webserver is running on 192.168.0.1 cgminer is running on 192.168.0.2 cgminer.exe --api-listen ^ --api-allow W:192.168.0.1 ^ --api-network
Firewalls are disabled. Workers are not showing up on anubis. What am I missing?
|
5830 mining for life
|
|
|
kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
March 06, 2012, 02:34:08 PM |
|
webserver is running on 192.168.0.1 cgminer is running on 192.168.0.2 cgminer.exe --api-listen ^ --api-allow W:192.168.0.1 ^ --api-network
Firewalls are disabled. Workers are not showing up on anubis. What am I missing? Just an aside ... You don't need "--api-network" since it is ignored if you use "--api-allow" and you can also use W:192.168.0/24 just to check the IP addresses are correct also note (as the README says) if you also want to talk to cgminer from the cgminer machine you need to add ",W:127.0.0.1"
|
|
|
|
P_Shep
Legendary
Offline
Activity: 1804
Merit: 1230
This is not OK.
|
|
March 06, 2012, 05:22:59 PM |
|
Are sockets enabled in PHP?
|
|
|
|
tynt
Member
Offline
Activity: 61
Merit: 10
|
|
March 06, 2012, 06:54:29 PM |
|
Solved now. I was using PHP 5.1.6, upgraded to 5.3.3, now it works
|
5830 mining for life
|
|
|
P_Shep
Legendary
Offline
Activity: 1804
Merit: 1230
This is not OK.
|
|
March 06, 2012, 07:06:17 PM |
|
I think it should work with all of 5, and probably 4. Probably some configuration issue fixed with the re-install.
|
|
|
|
kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
March 06, 2012, 08:19:33 PM |
|
Ah well - yeah there is a log for that /var/log/apache2/error.log (for debian/ubuntu etc) or /var/log/httpd/error.log (for redhat/fedora etc) or ... not sure where else for any others.
|
|
|
|
tynt
Member
Offline
Activity: 61
Merit: 10
|
|
March 06, 2012, 10:55:39 PM |
|
I think it should work with all of 5, and probably 4. Probably some configuration issue fixed with the re-install.
PHP 5.2.x lacks native support for json_encode() and json_decode() functions. Just needed to upgrade PHP or install PECL extension and PECL JSON package.
|
5830 mining for life
|
|
|
P_Shep
Legendary
Offline
Activity: 1804
Merit: 1230
This is not OK.
|
|
March 06, 2012, 11:48:01 PM |
|
I see... interesting.
|
|
|
|
The LT
|
|
March 06, 2012, 11:55:23 PM |
|
Thanks a lot P_Shep for implementing new functions into Anubis! These are a boon when tuning rigs! Also, thanks a lot to kano for working on the API in the first place!
|
|
|
|
exahash
|
|
April 06, 2012, 02:02:07 PM |
|
I just started trying out Anubis; thanks to ocminer and p_shep, its very nice.
One odd thing I noticed... if one (or more) of my rigs is hung or in the process of going down, it takes a really long time (more than a minute) to load the Anubis home/hosts page. If a rig is down, the page comes up quickly (less than one second) showing 'Connection refused' or 'Operation now in progress' I have 20 rigs on the local network. Anubis is served from a non-mining machine.
I tried lowering the timeout in the socket_set_option on line 81 of func.inc.php and that seemed to help a little, but I think whats happening is that cgminer is hanging on exit (when shutting down due to a sick or dead card) and not responding to Anubis. Anubis then sits waiting for a response from that rig which may never come.
I added the following receive timeout to line 82 and it seems to have fixed my problem:
socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => '1', 'usec' => '0')); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => '1', 'usec' => '0'));
I'm not sure what your patch policy is, and I'm not familiar enough yet with git/github, so forgive me if this is the wrong place to submit this.
I suppose the timeout values could be variables in the config if you wanted, and 1s is probably not long enough for people monitoring rigs across the internet, but this seems to be working for me and I hope it helps someone.
|
|
|
|
P_Shep
Legendary
Offline
Activity: 1804
Merit: 1230
This is not OK.
|
|
April 06, 2012, 05:46:49 PM |
|
That's a good one. I'll add it when I next do an update. I'll make the timeout configurable in the config file.
|
|
|
|
nedbert9
Sr. Member
Offline
Activity: 252
Merit: 250
Inactive
|
|
April 08, 2012, 06:46:05 PM |
|
usesless is not a word.
p.s. Linux is much better suited to run apache web server and php then Windows server 2003, and if you cant see that then your just as usesless as windows
Dude, seriously, what makes you think the person wants to run APACHE as their Webserver? What makes you think that the only thing he needs to run "better" is Anubis on PHP? Did it ever occur to you that he also needs to run something else which is, as you say, BETTER SUITED, for running on Windows rather than Linux. And dude, I can't see that... Cross-platform, ever heard of that? We've been running Apache on all platforms since 1997 and NT 4.0 and it has been working fine. End of story. +1
|
|
|
|
kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
April 08, 2012, 10:34:56 PM |
|
That's a good one. I'll add it when I next do an update. I'll make the timeout configurable in the config file.
If you are restarting cgminer, the issue is most likely the side effect of the socket being in the TIME_WAIT state as is somewhat considered mandatory by internet protocol standards. There is a way around it in Linux by doing something considered bad: messing with net.ipv4.tcp_fin_timeout There's also the socket option SO_REUSEADD that I STILL haven't got around to testing if there are any issues with using it in cgminer.
|
|
|
|
|