Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 462. (Read 5805537 times)

legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Well if sockets are actually working (the link there is about how to enable them when they aren't working) then it's a problem with the socket connecting to the target.

So it's a firewall/port forwarding problem if sockets are installed properly and enabled in PHP
(they are on by default usually in linux, but not always in windows)

That's what I figured.  I will update this thread if I ever find a solution. I am trying out some experiments from the php.net website.
If you 'roll' on over to FreeNode #cgminer it's usually easy to sort out where the problem is.
sr. member
Activity: 322
Merit: 250
Well if sockets are actually working (the link there is about how to enable them when they aren't working) then it's a problem with the socket connecting to the target.

So it's a firewall/port forwarding problem if sockets are installed properly and enabled in PHP
(they are on by default usually in linux, but not always in windows)

That's what I figured.  I will update this thread if I ever find a solution. I am trying out some experiments from the php.net website.
full member
Activity: 182
Merit: 100
Perfect, thanks GlenBot!
newbie
Activity: 46
Merit: 0
How to enter multiple pools from the command line?

Here's my shortcut that launches it upon startup (win7):
C:\cgminer\cgminer.exe -o http://pool.bitclockers.com:8332 -u MyPoolUsername1 -p MyPoolPassword1 -o http://mtred.com:8337 -u MyPoolUsername2 -p MyPoolPassword2 --load-balance

Hope that helps...

full member
Activity: 182
Merit: 100
How to enter multiple pools from the command line?
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
... as per API-README - you say in cgminer what IP addresses are allowed to access cgminer.
Then in miner.php you say the IP:port:randomshortname of the cgminer
Yeah, I forgot to mention that I did that. I set the allowed addresses in the config file, and as you saw below that statement, I added it to miner.php.

... as per the README FAQ ... it means sockets are either disabled on not installed in your PHP
There is a link in the FAQ.

That's the part I can't figure out.

Code:
Q: I run PHP on windows to access the API with the example miner.php. Why does
it fail when php is installed properly but I only get errors about Sockets not
working in the logs?
A: http://us.php.net/manual/en/sockets.installation.php
 

I am not running PHP on windows. I have bluehost, and they use apache.  Visiting that link doesn't help me. I don't know what this means, or how to do it:

Code:
The socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure. 

There's a user note on that page that says you need to uncomment the line that reads
;extension=php_sockets.dll (by removing the semi colon), or if it's not there, to add it.  I don't know where to add it, so I added it to the end.  Still having same error.

So, AS PER THE README FAQ, I am not running php on windows to access the API, so I didn't think it applied.

This is not a priority because I only want to monitor one rig, and I can use CMD.exe to run API calls. (it's just that it doesn't like when I use the pipe, for some reason)

Thanks for your help. Anyone got it working on bluehost? LMK.

I will continue to interface with the google for now.
Well if sockets are actually working (the link there is about how to enable them when they aren't working) then it's a problem with the socket connecting to the target.

So it's a firewall/port forwarding problem if sockets are installed properly and enabled in PHP
(they are on by default usually in linux, but not always in windows)
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I notice that i am getting many more rejected shares now that im using 2.8.4 compared to 2.7.5. I usualy get about 10 rejected shares per 20 000 accepted shares. Now with 2.8.4 ive gotten 200
Nothing's changed in management therein, so I can only assume it's coincidence and pool related.

I immediately stopped the 2.8.4 and restarted 2.7.5 and i have no stale shares at all yet. Soemthing is definetly up
Did you move to stratum with 2.8.4?

EDIT: To explain why I ask that, cgminer + stratum gets notification of block changes much faster than ever so it should reduce the number of stales. On the other hand, I have noticed that slush uses that as an excuse to ignore any shares that are returned from the previous block immediately once it has stratum notified you of the new block saying job not recognised, so to me it looks like stales on slush went up, not down, despite the potential advantages. I'm not sure how btcguild fares there.
member
Activity: 70
Merit: 10
I notice that i am getting many more rejected shares now that im using 2.8.4 compared to 2.7.5. I usualy get about 10 rejected shares per 20 000 accepted shares. Now with 2.8.4 ive gotten 200
Nothing's changed in management therein, so I can only assume it's coincidence and pool related.

I immediately stopped the 2.8.4 and restarted 2.7.5 and i have no stale shares at all yet. Soemthing is definetly up
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I notice that i am getting many more rejected shares now that im using 2.8.4 compared to 2.7.5. I usualy get about 10 rejected shares per 20 000 accepted shares. Now with 2.8.4 ive gotten 200
Nothing's changed in management therein, so I can only assume it's coincidence and pool related.
sr. member
Activity: 322
Merit: 250
... as per API-README - you say in cgminer what IP addresses are allowed to access cgminer.
Then in miner.php you say the IP:port:randomshortname of the cgminer
Yeah, I forgot to mention that I did that. I set the allowed addresses in the config file, and as you saw below that statement, I added it to miner.php.

... as per the README FAQ ... it means sockets are either disabled on not installed in your PHP
There is a link in the FAQ.

That's the part I can't figure out.

Code:
Q: I run PHP on windows to access the API with the example miner.php. Why does
it fail when php is installed properly but I only get errors about Sockets not
working in the logs?
A: http://us.php.net/manual/en/sockets.installation.php
 

I am not running PHP on windows. I have bluehost, and they use apache.  Visiting that link doesn't help me. I don't know what this means, or how to do it:

Code:
The socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure. 

There's a user note on that page that says you need to uncomment the line that reads
;extension=php_sockets.dll (by removing the semi colon), or if it's not there, to add it.  I don't know where to add it, so I added it to the end.  Still having same error.

So, AS PER THE README FAQ, I am not running php on windows to access the API, so I didn't think it applied.

This is not a priority because I only want to monitor one rig, and I can use CMD.exe to run API calls. (it's just that it doesn't like when I use the pipe, for some reason)

Thanks for your help. Anyone got it working on bluehost? LMK.

I will continue to interface with the google for now.
member
Activity: 70
Merit: 10
I notice that i am getting many more rejected shares now that im using 2.8.4 compared to 2.7.5. I usualy get about 10 rejected shares per 20 000 accepted shares. Now with 2.8.4 ive gotten 200
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
What are the limitations of miner.php when used on a webhost (such as bluehost, hostgator, etc.) ? [I am familiar with php btw]

I was thinking that first of all, I have to set api-allow to the host's shared IP to my config file, or allow all.
... as per API-README - you say in cgminer what IP addresses are allowed to access cgminer.
Then in miner.php you say the IP:port:randomshortname of the cgminer
Quote
2nd: I have to forward public port 4028 on my router to my rig's internal ip address and private port. (in this case it's the same port as the public one)

3rd: I have to instruct miner.php to look at my public IP address:port.
 line 45:
$rigs = array(':4028:QUADMINER');

4th: Huh

5th: PROFIT!

I am having an error...
Error getting device list: ERR: socket connect(,4028) failed 'Operation now in progress'

error_log shows
Code:
[22-Oct-2012 14:32:59] PHP Warning:  socket_connect() [function.socket-connect]: unable to connect [115]: Operation now in progress in /home2//public_html/test/miner.php on line 315

line 315 has
$res socket_connect($socket$addr$port);
... as per the README FAQ ... it means sockets are either disabled on not installed in your PHP
There is a link in the FAQ.
sr. member
Activity: 322
Merit: 250
What are the limitations of miner.php when used on a webhost (such as bluehost, hostgator, etc.) ? [I am familiar with php btw]

I was thinking that first of all, I have to set api-allow to the host's shared IP to my config file, or allow all.

2nd: I have to forward public port 4028 on my router to my rig's internal ip address and private port. (in this case it's the same port as the public one)

3rd: I have to instruct miner.php to look at my public IP address:port.
 line 45:
$rigs = array(':4028:QUADMINER');

4th: Huh

5th: PROFIT!

I am having an error...
Error getting device list: ERR: socket connect(,4028) failed 'Operation now in progress'

error_log shows
Code:
[22-Oct-2012 14:32:59] PHP Warning:  socket_connect() [function.socket-connect]: unable to connect [115]: Operation now in progress in /home2//public_html/test/miner.php on line 315

line 315 has
$res socket_connect($socket$addr$port);
legendary
Activity: 2702
Merit: 1261
Put the stratum URL in without any prefix in the config file.

Without the prefix:

Code:
...
"url" : "api-stratum.bitcoin.cz:3333",
...
"url" : "stratum.btcguild.com:9332",

I get:

Code:
0: Enabled Alive Priority 0: http://api-stratum.bitcoin.cz:3333 ...
1: Enabled Alive Priority 1: http://stratum.btcguild.com:9332 ...

So this seems to work now. Only the http:// prefix in the user interface is misleading.
newbie
Activity: 32
Merit: 0
I am running the debug cgminer 2.8.4 on my Win7 machine for about a day now without any problems. It is connected to Slush's Pool via stratum and it has an Nvidia card so it's about 110Mh/s and it it also used for games.

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Ok so what I've done to try and help debug this is I've built a special windows build of cgminer that uses a special dll to help print out the backtrace if it crashes that should help me find where it's crashing.

To use it, grab the following 2 files:
http://ck.kolivas.org/apps/cgminer/temp/cgminer.exe
http://ck.kolivas.org/apps/cgminer/temp/backtrace.dll

and put them into a regular 2.8.4 windows directory. Start it as you normally would, but with the -T option otherwise the display gets corrupted when the program exits, and if it crashes while mining stratum, send me what is output when it crashes please!
Meh doesn't seem to do what it's advertised as doing... sigh need to think of another strategy.
sr. member
Activity: 383
Merit: 250
Just upgrade3d from 2.7.x to 2.8.x   

Can someone please provide a plain english explination of the "Diff" data in the HW mining lines? eg Diff: 100/25

Thanks in advance

It is right in the README file included with Cgminer...

"The 2 diff values are the actual difficulty target that share reached followed by the difficulty target the pool is currently asking for."
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
hero member
Activity: 1162
Merit: 500
OK - so here the last lines before my cgminer crashed (v2.8.4 on Win7x64).

Note: I lost Internet connection for a few hours - maybe that caused the crash?

[2012-10-22 02:37:39] 64.0 C  F: 55%(1984RPM)  E: 940MHz  M: 200Mhz  V: 1.175V  A: 99%  P: 0%
 [2012-10-22 02:37:41] [thread 0: 1174405120 hashes, 210719.1 khash/sec]
 [2012-10-22 02:37:42] 64.0 C  F: 55%(1984RPM)  E: 940MHz  M: 200Mhz  V: 1.175V  A: 99%  P: 0%
 [2012-10-22 02:37:44] [thread 1: 1174405120 hashes, 210681.4 khash/sec]
 [2012-10-22 02:37:45] 64.0 C  F: 55%(1983RPM)  E: 940MHz  M: 200Mhz  V: 1.175V  A: 99%  P: 0%
 [2012-10-22 02:37:46] Reusing stratum work
 [2012-10-22 02:37:46] Generated stratum merkle 21fccc1ae2762046362be1c31c71a92c40ce2a82dd4ccf81e6c96f4c218980c1

 [2012-10-22 02:37:46] Generated stratum header 000000021cc6ab9ee271679f7e235158cdc5dfa57fad35ffa0554412000000c50000000021fccc1 a
e2762046362be1c31c71a92c40ce2a82dd4ccf81e6c96f4c218980c15084950a1a0575ef0000000 0000000800000000000000000000000000000000000000000
000000000000000000000000000000000000000080020000
 [2012-10-22 02:37:46] Work job_id 23349 nonce2 46000000 ntime 5084950a
 [2012-10-22 02:37:46] Generated target 0000000000000000000000000000000000000000000000000000ffff00000000
 [2012-10-22 02:37:46] Reusing stratum work
 [2012-10-22 02:37:46] Generated stratum merkle 12962fdf3b3660e6e478991e90540812fd076649ad1040cde70d48d00e193d6b

 [2012-10-22 02:37:46] Generated stratum header 000000021cc6ab9ee271679f7e235158cdc5dfa57fad35ffa0554412000000c50000000012962fd f
3b3660e6e478991e90540812fd076649ad1040cde70d48d00e193d6b5084950a1a0575ef0000000 0000000800000000000000000000000000000000000000000
000000000000000000000000000000000000000080020000
 [2012-10-22 02:37:46] Work job_id 23349 nonce2 47000000 ntime 5084950a
 [2012-10-22 02:37:46] Generated target 0000000000000000000000000000000000000000000000000000ffff00000000
 [2012-10-22 02:37:46] [thread 0: 1207959552 hashes, 209158.4 khash/sec]
 [2012-10-22 02:37:48] 64.0 C  F: 55%(1983RPM)  E: 940MHz  M: 200Mhz  V: 1.175V  A: 99%  P: 0%
 [2012-10-22 04:38:48] Work stale due to expiry
C:\bitcoin\cgminer-2.8.4-win32>
hero member
Activity: 591
Merit: 500
Just upgrade3d from 2.7.x to 2.8.x   

Can someone please provide a plain english explination of the "Diff" data in the HW mining lines? eg Diff: 100/25

Thanks in advance
The first number is the difficulty of the share, the second number is the minimum difficulty accepted by the pool. If the difficulty of the share is higher than the current Bitcoin network difficulty, you found a block.
Jump to: