Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RPi Distcc - failed to distribute running locally - [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 562
Location: Texas

PostPosted: Tue May 14, 2013 7:00 pm    Post subject: RPi Distcc - failed to distribute running locally - [SOLVED] Reply with quote

I am posting this because I was regularly getting "failed to distribute running locally" in my distcc pump mode when compiling on my Raspberry Pi. It would compile remotely, but preprocessing always ran locally.

The other day I was running a reallly long compile and was looking into this again and I found a solution in the depths of some forum linked to some other forum, linked again to some other post. I have been unable to re-find this, but I was able to figure out what I did. I decided to post this here for others in case they run into this issue, or if I need to do this again someday.

Problem. Distcc is setup properly, but you still see "failed to get includes from include server, failed to distrbute running locally" in emerge and in ("DISTCC_DIR=/var/tmp/portage/.distcc/" distccmon-text 1) distccmon shows preproccessing always running locally.

Solution. On the distcc compling host, the one referenced inside the '/etc/distcc/hosts' file, there is a file in python under the following path:

/usr/lib/python2.7/site-packages/include_server/basics.py

Inside this file there is a value for USER_TIME_QUOTA and its set to 3.8 seconds. I increased this value to 10.8 seconds (it was arbitrary but works, you can experiment with other values). This made my failed to distrbutes disappear.

Also as an added bonus, I had an issue in the hosts file unrelated to this, but make sure the hosts line syntax is correct in /etc/distcc/hosts. "w.x.y.z/#,lzo,cpp" is how I have it. I left a comma at end and it also failed to pump.

happy compiling!


Another note: when I wrote this I was setting this up again, I still got the failed to distribute error, I increased the USER_TIME_QUOTA to 20.8 second and it started to work properly, so I guess there is some experimenting with the number of seconds.

Another note 2: Started to get a message actually saying I ran past the 3.8 secs of USER_TIME_QUOTA on the pi again. I changed basic.py on the pi as well and the error cleared and started preprossesing remote again.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.


Last edited by njcwotx on Tue May 14, 2013 11:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7113
Location: ~Brussels - Belgique

PostPosted: Tue May 14, 2013 7:47 pm    Post subject: Reply with quote

Good to know!

But isn't there a better place to configure that?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 562
Location: Texas

PostPosted: Tue May 14, 2013 8:05 pm    Post subject: Reply with quote

XavierMiller wrote:
But isn't there a better place to configure that?


Feel free to share! I lifted this from somewhere and gave it a try. I suppose one might set an env variable or put it in make.conf or even possibly the /etc/conf.d/distccd file, but I am not sure what would be best.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7113
Location: ~Brussels - Belgique

PostPosted: Tue May 14, 2013 8:08 pm    Post subject: Reply with quote

Me neither. I watch this topic :)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7113
Location: ~Brussels - Belgique

PostPosted: Sat May 18, 2013 10:39 am    Post subject: Reply with quote

Hmm, this file comes from distcc, so we can define a patch to apply to distcc, or use an environment variable.

I tried in make.conf, and it seems working.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 562
Location: Texas

PostPosted: Fri May 24, 2013 8:54 pm    Post subject: Reply with quote

good to know.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 114

PostPosted: Sun Jun 04, 2017 4:33 pm    Post subject: Reply with quote

I found this rather old topic because I have the same problem. My machine is so slow that the include-server runs out of time before finishing its job. Is there already a better solution to configure the timeout than manually modifying the Python source code?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 5740

PostPosted: Sun Jun 04, 2017 4:50 pm    Post subject: Reply with quote

You must have a really slow host, or misconfiguration in distcc.
Make sure that the pump server appears after localhost in distcc hosts file
Pump use lzo compression, if really the localhost cannot get enough time to compress and upload the files, you should find a different solution to your problem (binary host)
Or you could still edit the python file as i don't know another way myself.
Back to top
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 114

PostPosted: Mon Jun 05, 2017 6:31 am    Post subject: Reply with quote

krinn wrote:
Make sure that the pump server appears after localhost in distcc hosts file
Why? I thought the opposite should be used? From the manual:
Quote:
The host list is a simple whitespace separated list of host specifications. The simplest and most common form is a host names [...]. distcc prefers hosts towards the start of the list, so machines should be listed in descending order of speed.

Placing localhost at the right point in the list is important to getting good performance. Because overhead for running jobs locally is low, localhost should normally be first. However, it is important that the client have enough cycles free to run the local jobs and the distcc client. If the client is slower than the volunteers, or if there are many volunteers, then the client should be put later in the list or not at all. As a general rule, if the aggregate CPU speed of the client is less than one fifth of the total, then the client should be left out of the list.
Hence, leaving out the localhost is sometimes even recommended. And many HowTos are doing so or at least place localhost last. Now you are telling me the opposite?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 5740

PostPosted: Mon Jun 05, 2017 10:02 am    Post subject: Reply with quote

sorry, s/after/before... :/
you got it right of course.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum