LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2013, 06:09 AM   #16
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13

Quote:
Originally Posted by mddesai View Post
To check for mail, just enter 'mail'
Apparently I have no mail.



Quote:
Originally Posted by mddesai View Post

If you are using GUI, then why dont you start program at startup in System -> Preferences -> Startup Application
I have done that. Sometimes the computer forgets to start Deluge. I've had a look and there is no log file for Deluge.
 
Old 07-10-2013, 09:45 AM   #17
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It doesn't forget. It can't.

Something is wrong with deluge that causes it to exit.
 
Old 07-10-2013, 09:48 AM   #18
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
Quote:
Originally Posted by jpollard View Post
It doesn't forget. It can't.

Something is wrong with deluge that causes it to exit.
But if I log in remotely through SSH and start it then it starts without a problem. What changes from boot to boot to make it so deluge starts one minute but not the other?
 
Old 07-10-2013, 09:55 AM   #19
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Network not ready when it starts.

Due to the way Fedora now works you cannot guarantee that the network is actually up. Only that systemd considers it up, which at best depends on whether NetworkManager considers it up - whether it really is or not.

I think this is more likely since it works when you ssh into the system - obviously the network is up then. But during any other time... not necessarily.

Logging in locally depends on whether the network is already running (at boot time for instance) or happens to come up because the network is under user control... but hasn't come up yet (sometimes) when the autostart list is processed.

Fedora has become a very unreliable system. Especially when used for servers.

Last edited by jpollard; 07-10-2013 at 09:58 AM.
 
1 members found this post helpful.
Old 07-10-2013, 09:57 AM   #20
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
So basically I have an impossible situation, as I would need to create a script to resolve this, but you cannot have a script run by the system start a GUI, unless you manually run the script?
 
Old 07-10-2013, 10:10 AM   #21
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It depends on what is going on. Sometimes yes, sometimes no.

Starting a daemon does not require a GUI.

Starting a GUI application to start a daemon does require a GUI - which is only available if the user has logged in.

In both cases, if a daemon requires network services then it cannot start until after the network is available for use. If that network is only started by a user logging in (frequent desktop case) then it depends on WHEN NetworkManager actually starts the net, and WHEN the net is actually usable - currently there is no reliable way.

In starting a daemon, NetworkManager really can't tell. It runs a script/program to initialize the network - but it takes TIME for the network get initialized. By default, systemd assumes that the network is available if NetworkManager has been started (a false assumption). So they added a kludge: NetworkManager-wait-online. This works most of the time... The major scenario I have run across is where the network is actually started by DHCP. This can take a long time (in terms of "is it ready" - from a second or so, to about a minute when the DHCP server is busy, which doesn't happen that often). But within that second, a LOT of things can be running. And if it runs BEFORE the network is actually stable - it just might not run. Even when the return is "immediate" doesn't mean the network has stablized... There can be a LOT of jitter around the actual setting of the parameters to when the parameters are effective, and any process that needs the net before then is SOL.
 
Old 07-10-2013, 10:21 AM   #22
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
This is why the script that I created that I have to run through SSH manually kind of would work perfectly for this situation. If deluge fails to start due to the network not being up, then it will check to see if deluge is running, which it isn't, and start it again, rinse and repeat.

I really don't understand why I can run this script and it work perfectly through SSH but the computer can't run it itself. What I also don't understand is why deluge would need the network to be up before running. Then again, this isn't entirely to me, computers have never made any sense to me.

I think my solution will have to be to buy a new computer and hope I don't run into the same problem when setting it up.
 
Old 07-10-2013, 11:18 AM   #23
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by NotAComputerGuy View Post
This is why the script that I created that I have to run through SSH manually kind of would work perfectly for this situation. If deluge fails to start due to the network not being up, then it will check to see if deluge is running, which it isn't, and start it again, rinse and repeat.

I really don't understand why I can run this script and it work perfectly through SSH but the computer can't run it itself. What I also don't understand is why deluge would need the network to be up before running. Then again, this isn't entirely to me, computers have never made any sense to me.
SSH requires a network to be functional. What is so hard about that. The deluge daemon requires the network to be functional. If it isn't, it isn't going to run.

Quote:
I think my solution will have to be to buy a new computer and hope I don't run into the same problem when setting it up.
Waste of money. You won't be fixing the problem as it has nothing to do with hardware.
 
1 members found this post helpful.
Old 07-10-2013, 12:33 PM   #24
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
Quote:
Originally Posted by jpollard View Post
SSH requires a network to be functional. What is so hard about that. The deluge daemon requires the network to be functional. If it isn't, it isn't going to run.
I appreciate what you're saying, however even if I disable the auto-login, SSH will still run. This suggests to me that the network is up before logging into MATE and it after MATE has logged in that Deluge launches


Quote:
Originally Posted by jpollard View Post
Waste of money. You won't be fixing the problem as it has nothing to do with hardware.
I see no other solution, short of finding a program that will type a series of keyboard commands after login. A fresh install will ensure it's not something else that's causing the problem. I dislike fettling with computers, for me it's time wasted I could be doing something productive with. I like things to just work.
 
Old 07-10-2013, 12:38 PM   #25
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 502

Rep: Reputation: 137Reputation: 137
How about this:
Code:
crontab -e
*/30 * * * * export DISPLAY=:0 && /home/madhu/bin/delugeit.sh
PHP Code:
cat /home/madhu/bin/delugeit.sh
#!/bin/bash
ans=$(ps grep deluge)
if [[ 
"x$ans"x" ]]
then
    
echo "Starting Deluge..."
    
deluge &
fi 
 
Old 07-10-2013, 12:54 PM   #26
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
i have this in my htpc to guerentee that the network is up at the time:
Code:
@reboot sleep 45 && /usr/bin/sshfs schneidz@192.168.1.1:/media/win/stuff /home/xbmc/hyper
also since cron doesnt provide a full session maybe the $PATH variable is wrong ?
 
Old 07-10-2013, 01:44 PM   #27
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by mddesai View Post
How about this:
Code:
crontab -e
*/30 * * * * export DISPLAY=:0 && /home/madhu/bin/delugeit.sh
PHP Code:
cat /home/madhu/bin/delugeit.sh
#!/bin/bash
ans=$(ps grep deluge)
if [[ 
"x$ans"x" ]]
then
    
echo "Starting Deluge..."
    
deluge &
fi 
Doesn't always work - when you aren't logged in, No display. When you are logged in, it may not be under display 0. SSH for instance, starts at display 10 by default.
 
Old 07-10-2013, 01:49 PM   #28
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by NotAComputerGuy View Post
I appreciate what you're saying, however even if I disable the auto-login, SSH will still run. This suggests to me that the network is up before logging into MATE and it after MATE has logged in that Deluge launches
Mate doesn't need the network. And when you login via ssh you are not using mate on the system you logged into.

Quote:
I see no other solution, short of finding a program that will type a series of keyboard commands after login. A fresh install will ensure it's not something else that's causing the problem. I dislike fettling with computers, for me it's time wasted I could be doing something productive with. I like things to just work.
Then don't use fedora. It is an experimental system anyway. I find that the last reliable version of Fedora was Fedora 14. Everything since uses systemd, which cannot be made reliable as it depends on a thundering herd scheduling for service startup - since things are not serialized, nothing can really depend on any other services.
 
Old 07-10-2013, 01:51 PM   #29
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by schneidz View Post
i have this in my htpc to guerentee that the network is up at the time:
Code:
@reboot sleep 45 && /usr/bin/sshfs schneidz@192.168.1.1:/media/win/stuff /home/xbmc/hyper
also since cron doesnt provide a full session maybe the $PATH variable is wrong ?
I suspect the problem is in deluge using a GUI to start a daemon that requires the network, when the network may not be available.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cronjob - Shell Script Not Running rcrosoer Linux - General 5 05-22-2013 08:35 AM
[SOLVED] cronjob is running several times project.linux.proj Linux - Newbie 2 04-01-2013 04:15 AM
cronjob not running! user1221 Linux - Newbie 6 05-26-2009 06:08 AM
script not running in cronjob dningale Solaris / OpenSolaris 2 08-14-2008 01:27 AM
script expression not running in cronjob dningale Solaris / OpenSolaris 2 08-13-2008 01:04 AM


All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration