fresh 3.61 install not working ("Program stalled")

Having issues with your Timekoin Server? Someone might be able to answer your questions here.
tkoinuser
Posts: 20
Joined: Tue Jul 03, 2012 7:01 am

fresh 3.61 install not working ("Program stalled")

Post by tkoinuser »

I installed a fresh 3.61, can login etc. Currency generation disabled.

I had to manually update the database for QBI, maybe that should not be necessary for a fresh install?
Then I was able to have the server fetch the Transaction History Records (383,346), but the rest all stays at 0. Transaction Foundations and all 3 hashes - all 0.
When I start timekoin and the watchdog, they both show "Normal Operations", then after about a minute they both go to "Program Stalled". All the others (Treasurer to Balance) always stay at OFFLINE.

Basically I think a total fresh install of 3.61 doesn't work, or I was unlucky with some incompatibility of my system? (Linux, PHP, mysql).
How can I debug this further?
Thanks!
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: fresh 3.61 install not working ("Program stalled")

Post by KnightMB »

tkoinuser wrote:I installed a fresh 3.61, can login etc. Currency generation disabled.

I had to manually update the database for QBI, maybe that should not be necessary for a fresh install?
Then I was able to have the server fetch the Transaction History Records (383,346), but the rest all stays at 0. Transaction Foundations and all 3 hashes - all 0.
When I start timekoin and the watchdog, they both show "Normal Operations", then after about a minute they both go to "Program Stalled". All the others (Treasurer to Balance) always stay at OFFLINE.

Basically I think a total fresh install of 3.61 doesn't work, or I was unlucky with some incompatibility of my system? (Linux, PHP, mysql).
How can I debug this further?
Thanks!
The QBI is part of the database template, so if you loaded this new, you have it installed. There are no QBI records yet because the transaction history isn't complete. But don't worry, installing again inside the GUI doesn't hurt anything because it checks if it already exist and leaves it alone if you try to install over it. The extra button was added for server admins to upgrade an existing server and don't want to install the QBI via external commands.

What Linux OS are you running? If it is Ubuntu, try changing the "CLI Mode" in the system tab from Enabled to Disabled. In the same section make sure the "Local Server Port" port is filled in with the same port number of your web server, which is probably 80. Save all the settings before attempting another start.

One the final things I test before a release is installing to a few test machines (CentOS Linux, Ubuntu Linux, Mageia Linux, Windows 7, Mac OS 10.8, etc.) and letting it run from a blank database all the way up to current, but I could be missing something that I have not seen yet, so let me know.
tkoinuser
Posts: 20
Joined: Tue Jul 03, 2012 7:01 am

Re: fresh 3.61 install not working ("Program stalled")

Post by tkoinuser »

I'm pretty sure after new install the QBI was "NOT INSTALLED", and then I updated, and then it said "INSTALLED". Maybe I redo the entire install later.
CLI was already disabled, the server port was empty, I then set it to 80, but the same problems exist. I set it to ipv4-only as well, just to narrow things down.

Both Main Program Processor and Watchdog go to "Program Stalled" after about a minute, everything else never leaves OFFLINE. Something very fundamentally is not working on the server. Is there any way to log what happens?
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: fresh 3.61 install not working ("Program stalled")

Post by KnightMB »

tkoinuser wrote:I'm pretty sure after new install the QBI was "NOT INSTALLED", and then I updated, and then it said "INSTALLED". Maybe I redo the entire install later.
When you do the install, it just puts in a dummy record as place holder so it won't say "NOT INSTALLED" all the time and cause further confusion. I checked the sql template in the file downloads and github, both have the QBI in there properly. :D
CLI was already disabled, the server port was empty, I then set it to 80, but the same problems exist. I set it to ipv4-only as well, just to narrow things down.

Both Main Program Processor and Watchdog go to "Program Stalled" after about a minute, everything else never leaves OFFLINE. Something very fundamentally is not working on the server. Is there any way to log what happens?
Since it doesn't start *at all*, nothing exist to log for Timekoin that can reviewed. Sounds like it is setting the database flag to start, but none of the components are starting (thus it just sits as offline because of no status update from anything).

Timekoin setups a database variable for "on", writes out the "status.php" file to make sure all components are enabled (so status.php needs read/write access), then fires up the main.php file. When main.php is running, it does a database check, then checks which components are running (peerlist, generation, treasurer, etc.) and any of those are offline; fires them up to start running. It's only purpose after that is to maintain the IP banlist, check if the server sits behind a firewall, trim the database of old log entries, and occasionally check if a software update exist for the server to notify the administrator.

Just to run down the troubleshooting list.
1) Files have proper read/execute/write permissions
2) Check the web server logs to see if any errors are being logged, especially when using non-CLI mode
3) What version of PHP are you running?
4) What web server? (Apache, Nginx, etc.)
5) What database server? (mySQL, MariaDB, etc.)
6) What OS Distro? (CentOS, Ubuntu, Arch, etc.)

I'll need more details to help.

You can also try to manually start it, when in the GUI and after pressing the "Start Timekoin" button, open up another browser tab and put in your server IP to the file like this http://12.12.12.12/timekoin/main.php?action=begin_main
At least then you will be able to tell if it "hangs" on startup or redirects back to the system page with either a "success" or "failure" message.
User avatar
PoisonWolf
Posts: 186
Joined: Fri Apr 12, 2013 10:39 am

Re: fresh 3.61 install not working ("Program stalled")

Post by PoisonWolf »

KnightMB wrote:
1) Files have proper read/execute/write permissions
This is the most important thing. I remember having something similar to this when I first started trying to get Timekoin working on my own personal ubuntu computer.
tkoinuser
Posts: 20
Joined: Tue Jul 03, 2012 7:01 am

Re: fresh 3.61 install not working ("Program stalled")

Post by tkoinuser »

I deleted the database, imported v3.61 new_install_sql/timekoin.sql, and sure enough under Options / Database Update it says "NOT INSTALLED".
I don't know why but that's what it says.When I click the Install QDI button it then says INSTALLED in green.
This is not related to my Program Stalled problems but I think it's not good anyhow.

You were right about the permissions, I looked at the permissions of the php files in the v3.61 zip file more closely and some php files are 755, some are 644 - after unpacking on Linux.
The ones with 644 are api.php, balance.php and RSA.php. Why is that so? If all php files have to be 755, then why are most set to 755, but those three are 644 ?
I don't know how permissions are stored in a zip file but some php files come out one way, and some another way - strange.

Changing those three to 755 still didn't fix Program Stalled however.
tkoinuser
Posts: 20
Joined: Tue Jul 03, 2012 7:01 am

Re: fresh 3.61 install not working ("Program stalled")

Post by tkoinuser »

After looking in the PHP sources, I enabled "CLI mode" because it changes how the sub-php are called, so I thought I try. Result: The watchdog now stays "Active" permanently (no more stalled), the Transaction Clerk says "Idle" for the first time (yay!), but the Main Program Processor still goes to "Program Stalled" quickly. All others remain OFFLINE.

I'm playing with Timekoin since 2012, but have to say from my perspective, as a user, maybe I'm unlucky but it appears unstable frequently - I remember lots of problems in years past until I just didn't care anymore and uninstalled it. I've heard similar stories from others. Very briefly looking at a PHP file today I saw three spellings of "database" - datbase, databaes, database. I hope that's not a sign for the overall quality.

Remove features, unused options, cut down on supported OSes and databases, test more. Make it ipv6 only (yes people will complain but I am trying to make a point about painful focus). Just aggressively reduce the codebase, reduce features, increase quality. That'd be my 2 cents. I will keep trying but getting tired of 3.61 now.
Thanks for the quick and friendly and detailed help - as before! That's the cool part about Timekoin. Quality of the implementation is one thing, but the community is great.
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: fresh 3.61 install not working ("Program stalled")

Post by KnightMB »

tkoinuser wrote:I deleted the database, imported v3.61 new_install_sql/timekoin.sql, and sure enough under Options / Database Update it says "NOT INSTALLED".
I don't know why but that's what it says.When I click the Install QDI button it then says INSTALLED in green.
This is not related to my Program Stalled problems but I think it's not good anyhow.
That was already answered earlier.
You were right about the permissions, I looked at the permissions of the php files in the v3.61 zip file more closely and some php files are 755, some are 644 - after unpacking on Linux.
The ones with 644 are api.php, balance.php and RSA.php. Why is that so? If all php files have to be 755, then why are most set to 755, but those three are 644 ?
I don't know how permissions are stored in a zip file but some php files come out one way, and some another way - strange.

Changing those three to 755 still didn't fix Program Stalled however.
Because having execute permissions doesn't matter, Read/Write access was the important one for each to have. That all these set properly when I looked in the zip file.
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: fresh 3.61 install not working ("Program stalled")

Post by KnightMB »

tkoinuser wrote:After looking in the PHP sources, I enabled "CLI mode" because it changes how the sub-php are called, so I thought I try. Result: The watchdog now stays "Active" permanently (no more stalled), the Transaction Clerk says "Idle" for the first time (yay!), but the Main Program Processor still goes to "Program Stalled" quickly. All others remain OFFLINE.

I'm playing with Timekoin since 2012, but have to say from my perspective, as a user, maybe I'm unlucky but it appears unstable frequently - I remember lots of problems in years past until I just didn't care anymore and uninstalled it. I've heard similar stories from others. Very briefly looking at a PHP file today I saw three spellings of "database" - datbase, databaes, database. I hope that's not a sign for the overall quality.

Remove features, unused options, cut down on supported OSes and databases, test more. Make it ipv6 only (yes people will complain but I am trying to make a point about painful focus). Just aggressively reduce the codebase, reduce features, increase quality. That'd be my 2 cents. I will keep trying but getting tired of 3.61 now.
Thanks for the quick and friendly and detailed help - as before! That's the cool part about Timekoin. Quality of the implementation is one thing, but the community is great.
We can't really help you when we have no idea what environment you are running in. It sounds as though you aren't sure either. Your only, easier option would be to run the Windows version.
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: fresh 3.61 install not working ("Program stalled")

Post by KnightMB »

I took one last shot at this on a test machine. I changed all the file permissions to 0660 which is just user/group with read/write permissions only. Everything was still working just fine. What I changed to make it Not work was assign "root" permissions to the same files and it produced the same result you see. So, as one last try, make sure all the files in your timekoin folder are assigned to the web server permissions (apache, httpd, etc.) that your Linux OS distro uses. Many Linux distro out there have different security models when setting up a web server.
Post Reply