Bitcoin Forum
May 22, 2024, 02:48:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: mmcFE issues- need help, please!  (Read 1196 times)
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
May 29, 2013, 04:25:38 PM
 #1

So I have been trying to set up a private LTC pool for some students involved in an after school program at a high school in the district I work for.  I'm using Ubuntu server 13.04.  I have the latest apache2, mysql, and php5 installed, as well as all the required additions to run Litecoind and pushpool.  Both Litecoind and pushpool work without error.  I set up mmcFE via Chrgr's github repo.  I beat my head against a wall for a few days getting everything figured out, but I got it working.  I tested the site for a few days using the IP address of the VPS(hosted onsite).  I can register via the register page, log in to the site, add workers, etc.  Mining works fine, and stats populate on the site, charts display hashrates, etc.  It's a working pool.  The students are happy, and I've fostered a new generation of cryptocoin users... HUZZAH!

Now here is where it gets fun.  So I decided to create another private pool now that I know how to make it all work.  I figured I'd use it for my friends and coworkers and maybe even open it up to private registration when I get it all set in stone.  I set everything up on an outside VPS, installed everything, and viola... it worked without issues.  I decided I'd get snazzy and register a domain name for the site so I didn't have to access it via IP.  I set the DNS records on the registrar and the VPS provider, and I can now access the site from the new domain name.  However, I can not log into the site when using the domain name.  I can mine with the domain name, as well as with the IP.  I can ping the domain name without issues.  Everything points to it working fine.  But the login doesn't work.  I've found that when I use the IP address to access the site, when I log in, it hands out a login cookie, much like all the other pools.  When I use the domain name, the site never issues the cookie, and therefor never proceeds past the login page.  It loads the news.php page and that's it.  I've looked at the error logs for mysql and apache, and nothing is wrong.  The access.log for apache looks fine.  I've traced the code for the login and cookie functions, but nothing screams at me.  So that leads me to an issue with my Ubuntu server or Apache settings.  I've hit a wall with trying to figure this out.

I'm just trying to see if anyone has run into this before.  I figured with all the pools/pool operators out there, there has to be someone that can steer me in the right direction.

HELP PLEASE!

-Fuse

Community > Devs
the1silverwolf
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
May 29, 2013, 04:54:33 PM
 #2

So I have been trying to set up a private LTC pool for some students involved in an after school program at a high school in the district I work for.  I'm using Ubuntu server 13.04.  I have the latest apache2, mysql, and php5 installed, as well as all the required additions to run Litecoind and pushpool.  Both Litecoind and pushpool work without error.  I set up mmcFE via Chrgr's github repo.  I beat my head against a wall for a few days getting everything figured out, but I got it working.  I tested the site for a few days using the IP address of the VPS(hosted onsite).  I can register via the register page, log in to the site, add workers, etc.  Mining works fine, and stats populate on the site, charts display hashrates, etc.  It's a working pool.  The students are happy, and I've fostered a new generation of cryptocoin users... HUZZAH!

Now here is where it gets fun.  So I decided to create another private pool now that I know how to make it all work.  I figured I'd use it for my friends and coworkers and maybe even open it up to private registration when I get it all set in stone.  I set everything up on an outside VPS, installed everything, and viola... it worked without issues.  I decided I'd get snazzy and register a domain name for the site so I didn't have to access it via IP.  I set the DNS records on the registrar and the VPS provider, and I can now access the site from the new domain name.  However, I can not log into the site when using the domain name.  I can mine with the domain name, as well as with the IP.  I can ping the domain name without issues.  Everything points to it working fine.  But the login doesn't work.  I've found that when I use the IP address to access the site, when I log in, it hands out a login cookie, much like all the other pools.  When I use the domain name, the site never issues the cookie, and therefor never proceeds past the login page.  It loads the news.php page and that's it.  I've looked at the error logs for mysql and apache, and nothing is wrong.  The access.log for apache looks fine.  I've traced the code for the login and cookie functions, but nothing screams at me.  So that leads me to an issue with my Ubuntu server or Apache settings.  I've hit a wall with trying to figure this out.

I'm just trying to see if anyone has run into this before.  I figured with all the pools/pool operators out there, there has to be someone that can steer me in the right direction.

HELP PLEASE!

-Fuse

It has to do with the cookie configuration in requiredFunctions.php or configuration.php depending on which fork of mmcFE you are using.  You have to set the domain name correctly, or possibly leave it blank in the configuration before it will work right.

Also, a bit of advice, keep a close eye on the payouts.  mmcFE has tons of bugs in the payout logic if you don't fix them you'll run into problems eventually.


--
the1silverwolf
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
May 29, 2013, 05:03:31 PM
 #3

I've added the domain before into the configuration.php.  When I do, it doesn't issue the cookie on either the IP or the domain.  That's originally what led me to the cookies being the issue.  I haven't tried leaving the domain blank though.  I'll give it a shot and update this post with the results in a few minutes.

Thanks for the heads up.

EDIT:  Leaving the "cookieDomain" string empty fixed the issue.

the1silverwolf, You are the man.  PM me your LTC address and I'll shoot you a tip in a little bit.

Community > Devs
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 05:06:11 PM
 #4

How did you get pushpool working with litecoind? i tried setting pushpool up with franko and various other coins but when loading it never says initialized?

Bitrated user: ahmedbodi.
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
May 29, 2013, 05:49:34 PM
 #5

ahmed_bodi, is your sql database set up?  I was having issues with this before, but once I set up my sql database and put in the correct info in the server.json file, I was able to get it running.

You can debug issues as well by running pushpool with the command:

Code:
pushpoold -E -F -D=2 -c /location/of/your/server.json

It should output some additional information as to what it's doing when it starts up.  When you get it working, you can then start it with:

Code:
pushpoold -c /location/of/your/server.json

I'm sure there's a better way to do it, but that's the quick and dirty way that works for me.

Community > Devs
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 05:50:41 PM
 #6

i have it installed, however i dont really know anything about it being setup
ive tried that, the server.json file is in the folder with the executable. It just says listening on port 9000,90001, 9002 and 9003.

Bitrated user: ahmedbodi.
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
May 29, 2013, 06:01:27 PM
 #7

You'll need to set up a file titled server.json.  This is the file pushpoold uses to connect to your litecoind, sql db, and to set the ports for incoming connections.  Below is an example server.json file with spots that you'll need to fill in.

Code:
{
# network ports
"listen" : [
# binary protocol (default), port 8342
{ "port" : 8342 },

# HTTP JSON-RPC protocol, port 8341
{ "port" : 8341, "protocol" : "http-json" },

# HTTP JSON-RPC protocol, port 8344,
# ***THIS PORT IS THE MAIN CONNECTING PORT FOR LP***
{ "port" : 8344, "protocol" : "http-json",
  "proxy" : "127.0.0.1" },

# binary protocol, localhost-only port 8338
{ "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
],

# database settings
"database" : {
"engine" : "mysql",
"host" : "localhost",
"port" : 3306,
"name" : "*****DBNAME*****",
"username" : "*****DB_USERNAME*****",
"password" : "*****DB_PASSWORD*****",
"sharelog" : true,
"stmt.pwdb":"SELECT `password` FROM `pool_worker` WHERE `username` = ?",
"stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

},

# cache settings
"memcached" : {
"servers" : [
{ "host" : "127.0.0.1", "port" : 11211 }
]
},

"pid" : "/tmp/pushpoold.pid",

# overrides local hostname detection
"forcehost" : "localhost.localdomain",

"log.requests" : "/tmp/request.log",
"log.shares" : "/tmp/shares.log",

# the server assumes longpolling (w/ SIGUSR1 called for each blk)
"longpoll.disable" : false,

# length of time to cache username/password credentials, in seconds
"auth.cred_cache.expire" : 75,

# RPC settings | Notice how this ISN'T port number 8332 this is becuase the same port number should not becuase inconjunction with the JSON RPC port other wise you'll get 500 errors
"rpc.url" : "http://127.0.0.1:*****RPC_PORT*****/",
"rpc.user" : "*****LITECOIND_RPC_USERNAME*****",
"rpc.pass" : "*****LITECOIND_RPC_PASSWORD*****",

# rewrite returned 'target' to difficulty-1?
#"rpc.target.rewrite" : true,
        "rpc.target.bits" : 22
}

The end got a little confusing for me.  The rpc.target.rewrite : true didn't let me mine.  So I set the rpc.target bits manually, and that did.  However, make sure you change this value in your requiredFunctions.php/configuration.php file in the /www/includes/ folder of mmcfe.  If it doesn't match, your hashrates won't register correctly for the site.

If anyone can chime in to what the rpc.target.rewrite is supposed to do, or why you would set it to true, please chime in... this one stumps me.

Community > Devs
niteryder
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
May 29, 2013, 06:09:26 PM
 #8

You'll need to set up a file titled server.json.  This is the file pushpoold uses to connect to your litecoind, sql db, and to set the ports for incoming connections.  Below is an example server.json file with spots that you'll need to fill in.

Code:
{
# network ports
"listen" : [
# binary protocol (default), port 8342
{ "port" : 8342 },

# HTTP JSON-RPC protocol, port 8341
{ "port" : 8341, "protocol" : "http-json" },

# HTTP JSON-RPC protocol, port 8344,
# ***THIS PORT IS THE MAIN CONNECTING PORT FOR LP***
{ "port" : 8344, "protocol" : "http-json",
  "proxy" : "127.0.0.1" },

# binary protocol, localhost-only port 8338
{ "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
],

# database settings
"database" : {
"engine" : "mysql",
"host" : "localhost",
"port" : 3306,
"name" : "*****DBNAME*****",
"username" : "*****DB_USERNAME*****",
"password" : "*****DB_PASSWORD*****",
"sharelog" : true,
"stmt.pwdb":"SELECT `password` FROM `pool_worker` WHERE `username` = ?",
"stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

},

# cache settings
"memcached" : {
"servers" : [
{ "host" : "127.0.0.1", "port" : 11211 }
]
},

"pid" : "/tmp/pushpoold.pid",

# overrides local hostname detection
"forcehost" : "localhost.localdomain",

"log.requests" : "/tmp/request.log",
"log.shares" : "/tmp/shares.log",

# the server assumes longpolling (w/ SIGUSR1 called for each blk)
"longpoll.disable" : false,

# length of time to cache username/password credentials, in seconds
"auth.cred_cache.expire" : 75,

# RPC settings | Notice how this ISN'T port number 8332 this is becuase the same port number should not becuase inconjunction with the JSON RPC port other wise you'll get 500 errors
"rpc.url" : "http://127.0.0.1:*****RPC_PORT*****/",
"rpc.user" : "*****LITECOIND_RPC_USERNAME*****",
"rpc.pass" : "*****LITECOIND_RPC_PASSWORD*****",

# rewrite returned 'target' to difficulty-1?
#"rpc.target.rewrite" : true,
        "rpc.target.bits" : 22
}

The end got a little confusing for me.  The rpc.target.rewrite : true didn't let me mine.  So I set the rpc.target bits manually, and that did.  However, make sure you change this value in your requiredFunctions.php/configuration.php file in the /www/includes/ folder of mmcfe.  If it doesn't match, your hashrates won't register correctly for the site.

If anyone can chime in to what the rpc.target.rewrite is supposed to do, or why you would set it to true, please chime in... this one stumps me.

You also need to make sure you match the diff on pushpool and stratum.  Pushpool is something like a number only divisible by 2 and -1.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 06:20:11 PM
 #9

im trying to get pushpool working first and then moving onto stratum if i get it working. tbh im not sure no more if my sql database is installed properly so im reinstalling mysql

Bitrated user: ahmedbodi.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 06:23:41 PM
 #10

what do i enter for the db name, username and password in the mysql area?

Bitrated user: ahmedbodi.
niteryder
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
May 29, 2013, 06:26:47 PM
 #11

what do i enter for the db name, username and password in the mysql area?

An old wiseman once told me...  If you have no idea how to setup one of these pools, it's best that you don't.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 06:28:33 PM
 #12

Its the process of evolution You have to learn something. In order to know how to do it. Im sure all the other pool operators started somewhere

Bitrated user: ahmedbodi.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 06:30:10 PM
 #13

now ive sorted the rest out, i just need to know what to put for the database name? is it something specialised or just anything i want?

Bitrated user: ahmedbodi.
niteryder
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
May 29, 2013, 06:31:00 PM
 #14

now ive sorted the rest out, i just need to know what to put for the database name? is it something specialised or just anything i want?

It's a database you setup and imported the necessary tables to.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
May 29, 2013, 06:35:31 PM
 #15

would you be able to send me a copy of your database as a starting point, i could send you some mincoins or gamecoins if needed.

Bitrated user: ahmedbodi.
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
May 29, 2013, 06:37:06 PM
 #16

now ive sorted the rest out, i just need to know what to put for the database name? is it something specialised or just anything i want?

It's a database you setup and imported the necessary tables to.

You can name it anything you want.  The DB name is only used internally to direct pushpool and mmcfe to where the tables are located.


You can pull the sql file to import from any of the mmcfe github repos.

Community > Devs
ahmedbodi
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
June 03, 2013, 09:51:06 AM
 #17

sorry for the late replies.

It took a fresh install and now it seems to work fine. my only problem is setting the web page to the one of mmcfe and not the default webpage which comes with apache
ny2cafuse (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
June 03, 2013, 01:40:03 PM
 #18

Just delete the index.html file in the root of the web directory.  It's not needed, and the index.php file will automatically be picked up as the default.

Community > Devs
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!