<p>One possible reason may that with Bitcoin Core 0.13.1, it was mandatory to use SegWit-compatible mining software. When SegWit transactions are included in a block, a coinbase commitment to the witnesses is required by consensus rules. As the eventual selection of transaction in the block is done by the mining software, old mining software cannot be used to construct a SegWit block. On testnet, SegWit (BIP141) has been active since May 2016.</p>

<p>In Bitcoin Core 0.14, a change was made that permits old mining software to continue to operate. When such software is detected, Bitcoin Core will simply return a block template that excludes any SegWit transactions, alleviating the need for a coinbase commitment.</p>

CC BY-SA 3.0
2017-07-30T01:51:04.050Z
2017-07-30T01:51:04.050Z
Pieter Wuille
<p>I think your subnet definition in rpcallowip is wonky.
You are only allowing connections 0.0.0.1 - 0.0.0.254 to connect to your client. This excludes your localhost and probably your LAN.</p>

<p><a href="http://jodies.de/ipcalc?host=0.0.0.0&amp;mask1=24&amp;mask2=" rel="nofollow noreferrer">http://jodies.de/ipcalc?host=0.0.0.0&amp;mask1=24&amp;mask2=</a></p>

<p>What you are probably after is 127.0.0.1/32, or use your LAN subnet (192.168.0.1/24 ?).</p>

<pre><code>rpcallowip=127.0.0.1
rpcbind=127.0.0.1:18332
</code></pre>

CC BY-SA 3.0
2017-05-30T19:46:00.130Z
Well allowip=0.0.0.0 allows everything (the current config is quite the same as the one that I use on the real network, witch works). I tried your solution but it wasn't the problem, still have the same error :/
max-lt
CC BY-SA 3.0
2017-05-30T19:51:50.670Z
I would check the bitcoind debug.log file, it may hold a clue. Are you connecting cgminer directly or using a stratum layer?
lavajumper
CC BY-SA 3.0
2017-05-30T19:54:59.683Z
Tried too from the local network, but I've got the same results in the bitcoind debug console: > Received a POST request for / from 192.168.0.15:44976 
> Received a POST request for / from 192.168.0.15:44978``` it said that it receive the request but in other hand cgminer gives the same error --- Edit: I'm connecting cgminer directly with `cgminer --anu-freq 250 -o http://192.168.0.15:18332 -u $BITCOIN_CORE_USER -p $BITCOIN_CORE_PASS --btc-address $ADDRESS --btc-sig $SIG -D`
max-lt
CC BY-SA 3.0
2017-05-30T20:00:47.447Z
https://en.bitcoin.it/wiki/Running_Bitcoin ; rpcbind uses host:port notation for ipv6, otherwise I set the 'rpcport' option. Also, I usually set rpcuser and rpcpassword. The 500 error suggests there is something on the bitcoind side that is not right.
lavajumper
CC BY-SA 3.0
2017-05-30T20:12:03.540Z
rpcuser and rpcpassword are set, I just did not posted it, tried with or without rpcbind, the bitcoind log doens't report any error at this stage, it doesn't at all actually ...
max-lt
CC BY-SA 3.0
2017-05-30T20:31:16.043Z
I'm a little stumped at that point myself. Things I would check first: Are you connected to testnet? Have you checked connecting with bitcoin-cli to confirm its synced? Can you get 'getpeerinfo' ? Can you get 'getmininginfo'? Maybe try to set up a stratum proxy and see if that can connect. ? Like I said, the 500 errors suggests that cgminer is talking to bitcoind, but bitcoind ( at least the json-rpc server part ) is choking. I don't believe cgminer would report 500 if it wasn't getting it from bitcoind.
lavajumper
CC BY-SA 3.0
2017-05-30T20:36:23.727Z
Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/59574/discussion-between-lavajumper-and-maxx-t).
lavajumper
CC BY-SA 3.0
2017-05-30T19:39:14.560Z
2017-05-30T19:45:32.300Z
2017-05-30T19:45:32.300Z
lavajumper
<p>I want to try mining on testnet, I'm using cgminer and I got it working on the main network but when i'm runnig it on testnet I got (in debug mode):</p>

<pre><code>] Testing pool http://127.0.0.1:18332
] Probing for GBT support
] HTTP request failed: The requested URL returned error: 500 Internal Server Error
] Failed to connect in json_rpc_call
] No GBT coinbase + append support found, pool unusable if it has no stratum
] HTTP request failed: The requested URL returned error: 500 Internal Server Error
] Failed to connect in json_rpc_call
] No Stratum, GBT or Solo support in pool 0 http://127.0.0.1:18332 unable to use
</code></pre>

<p>I've tried with the generate=0 and gen=0 options but it seems to have no effect.</p>

<p>Currently my .conf file looks like: 
<code>
testnet=1
server=1
txindex=1
rpcallowip=0.0.0.0/24
rpcbind=0.0.0.0:18332
printtoconsole=-1
debug=1
</code></p>

<p>I'am running bitcoind version 130100.</p>

<p>It seems that many tuturials are outdated and that some options/features changed (like bitcoin core <a href="https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner" rel="nofollow noreferrer">Removal of internal miner</a>)<br><br>Is there something that I've missed ? </p>

<p><strong>EDIT</strong>:
@lavajumper: actually you where right about rpcallowip, but in my case there were others rpcallowip definition and it wasn't the cause of my problem (0.0.0.0/24 leads to a 403 (unauthorized) error).</p>

<p>After upgrading the version of bitcoind (version 140100, protocolversion 70015), I was able to run it, (but during the blockchain verifcation, there were 500 errors too).</p>

<p>For now i'm stil not able to run it with bitcoind 130100, and i don't know why...</p>

<bitcoind><testnet><solo-mining>
Unable to mine on testnet
max-lt
# Unable to mine on testnet

(Asked by: username_0 on 2017-05-30)

I want to try mining on testnet, I'm using cgminer and I got it working on the main network but when i'm runnig it on testnet I got (in debug mode):

```
] Testing pool http://127.0.0.1:18332
] Probing for GBT support
] HTTP request failed: The requested URL returned error: 500 Internal Server Error
] Failed to connect in json_rpc_call
] No GBT coinbase + append support found, pool unusable if it has no stratum
] HTTP request failed: The requested URL returned error: 500 Internal Server Error
] Failed to connect in json_rpc_call
] No Stratum, GBT or Solo support in pool 0 http://127.0.0.1:18332 unable to use

```

I've tried with the generate=0 and gen=0 options but it seems to have no effect.

Currently my .conf file looks like:
`testnet=1
server=1
txindex=1
rpcallowip=0.0.0.0/24
rpcbind=0.0.0.0:18332
printtoconsole=-1
debug=1`

I'am running bitcoind version 130100.

It seems that many tuturials are outdated and that some options/features changed (like bitcoin core [Removal of internal miner](https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner))  
  
Is there something that I've missed ?

**EDIT**:
@username_2: actually you where right about rpcallowip, but in my case there were others rpcallowip definition and it wasn't the cause of my problem (0.0.0.0/24 leads to a 403 (unauthorized) error).

After upgrading the version of bitcoind (version 140100, protocolversion 70015), I was able to run it, (but during the blockchain verifcation, there were 500 errors too).

For now i'm stil not able to run it with bitcoind 130100, and i don't know why...

**Tags:** bitcoind, testnet, solo-mining


---

## 2 answers

### Answer by username_1 on 2017-07-30. Score: 2 | Accepted answer

One possible reason may that with Bitcoin Core 0.13.1, it was mandatory to use SegWit-compatible mining software. When SegWit transactions are included in a block, a coinbase commitment to the witnesses is required by consensus rules. As the eventual selection of transaction in the block is done by the mining software, old mining software cannot be used to construct a SegWit block. On testnet, SegWit (BIP141) has been active since May 2016.

In Bitcoin Core 0.14, a change was made that permits old mining software to continue to operate. When such software is detected, Bitcoin Core will simply return a block template that excludes any SegWit transactions, alleviating the need for a coinbase commitment.


---

### Answer by username_2 on 2017-05-30. Score: 0

I think your subnet definition in rpcallowip is wonky.
You are only allowing connections 0.0.0.1 - 0.0.0.254 to connect to your client. This excludes your localhost and probably your LAN.

<http://jodies.de/ipcalc?host=0.0.0.0&mask1=24&mask2=>

What you are probably after is 127.0.0.1/32, or use your LAN subnet (192.168.0.1/24 ?).

```
rpcallowip=127.0.0.1
rpcbind=127.0.0.1:18332

```

> **Comments:**
> **username_0**: Well allowip=0.0.0.0 allows everything (the current config is quite the same as the one that I use on the real network, witch works). I tried your solution but it wasn't the problem, still have the same error :/  
> **username_2**: I would check the bitcoind debug.log file, it may hold a clue. Are you connecting cgminer directly or using a stratum layer?  
> **username_0**: Tried too from the local network, but I've got the same results in the bitcoind debug console: > Received a POST request for / from 192.168.0.15:44976  > Received a POST request for / from 192.168.0.15:44978``` it said that it receive the request but in other hand cgminer gives the same error --- Edit: I'm connecting cgminer directly with `cgminer --anu-freq 250 -o http://192.168.0.15:18332 -u $BITCOIN_CORE_USER -p $BITCOIN_CORE_PASS --btc-address $ADDRESS --btc-sig $SIG -D`  
> **username_2**: https://en.bitcoin.it/wiki/Running_Bitcoin ; rpcbind uses host:port notation for ipv6, otherwise I set the 'rpcport' option. Also, I usually set rpcuser and rpcpassword. The 500 error suggests there is something on the bitcoind side that is not right.  
> **username_0**: rpcuser and rpcpassword are set, I just did not posted it, tried with or without rpcbind, the bitcoind log doens't report any error at this stage, it doesn't at all actually ...  
> **username_2**: I'm a little stumped at that point myself. Things I would check first: Are you connected to testnet? Have you checked connecting with bitcoin-cli to confirm its synced? Can you get 'getpeerinfo' ? Can you get 'getmininginfo'? Maybe try to set up a stratum proxy and see if that can connect. ? Like I said, the 500 errors suggests that cgminer is talking to bitcoind, but bitcoind ( at least the json-rpc server part ) is choking. I don't believe cgminer would report 500 if it wasn't getting it from bitcoind.  
> **username_2**: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/59574/discussion-between-username_2-and-maxx-t).  

---

