You are not logged in.

#1 2013-03-30 00:42:18

jesu
Member
Registered: 2013-03-21
Posts: 19

vsftpd service doesn't start at boot

Hi,

I've recently installed and configured vsftpd on my machine, tested it and used it. So far so good.
The problem appears when I reboot.  The service/daemon doesn't start automatically. I checked it out and systemctl's output is:

$ systemctl status vsftpd
vsftpd.service - vsftpd daemon
          Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled)
          Active: failed (Result: exit-code) since vie 2013-03-29 21:10:55 ART; 1min 7s ago
         Process: 283 ExecStart=/usr/sbin/vsftpd (code=exited, status=2)

after I boot. And yes, I've already enabled the service. In fact, starting manually the service after that works:

# systemctl start vsftpd
# systemctl status vsftpd
vsftpd.service - vsftpd daemon
          Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled)                                                                                                                                                        
          Active: active (running) since vie 2013-03-29 21:12:12 ART; 1s ago                                                                                                                                                      
        Main PID: 1981 (vsftpd)                                                                                                                                                                                                   
          CGroup: name=systemd:/system/vsftpd.service                                                                                                                                                                             
                  └─1981 /usr/sbin/vsftpd      

I've booted several times checking some things out, changing configs, but the result is always the same. Also I've checked journalctl, /var/log/messages.log, /var/log/vsftpd.log, /var/log/errors.log, and I haven't found anything useful.

System is up to date and the rest of systemd's services start and work normally.
I feel it's something pretty simple but I really can't figure it out.

Any help would be appreciated, thanks.

Offline

#2 2013-03-30 14:30:24

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 170

Re: vsftpd service doesn't start at boot

I'm personally not familiar with vsftpd, but it could possibly just be a bug in the program itself, or depending on what order you are loading things, it could be getting loaded before something it requires. If it indeed does work when you manually start it, this may only be a jurryrig, but just have your ~/.xinitrc or your WM's autostart file start it.

As I was writing this, I'm sure I am wrong and will make myself look like a complete idiot by mentioning this, but vsftpd would need a user to run as. Did you give it a user and check it's configuration files? It may just be running as your user or root when you manually start it. Again, I may have made myself look like a idiot saying that, as I have never used vsftpd.


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#3 2013-03-30 16:31:09

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: vsftpd service doesn't start at boot

Well Multimoon, starting it with my WM's autostart works, as it's like starting it myself manually. I mean, it's starting it after all the boot process.
I've thought it may need some other thing to start before it. I've tried changing it's systemd unit, making it start after NetworkManager for example, but nothing changed.

And I don't think it may need a user, 'cause, otherwise, it should be documented, and I haven't found anything. I've read ArchWiki's page, the manual, and a couple of tutorials, and they don't say anything about a specific user for the ftp. They doesn't say anything either about needing some specific daemon or service to start first (besides the systemd's unit doesn't specify it either).

Thanks anyway man.

Offline

#4 2013-03-30 16:35:46

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 170

Re: vsftpd service doesn't start at boot

Glad I could suggest something. If that's working for you, follow the old BSD saying "If it's not broken don't fix it"
If you happen to find out what caused that, you may want to add to the Wiki page to help future users.


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#5 2013-03-30 19:36:33

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: vsftpd service doesn't start at boot

Well, sure, the ftp server itself works and that's the most important for me. What I want with this is systemd to properly start vsftpd as it should be.
And if I find the proper solution, I'd be glad to add it to the Wiki.

Offline

#6 2013-05-14 22:42:36

spuffin
Member
Registered: 2013-05-14
Posts: 3

Re: vsftpd service doesn't start at boot

jesu wrote:

Well, sure, the ftp server itself works and that's the most important for me. What I want with this is systemd to properly start vsftpd as it should be.
And if I find the proper solution, I'd be glad to add it to the Wiki.

jesu,

Navigate to /usr/lib/systemd/system and edit vsftpd.service

Add the following line in the [Unit] section:
After=network.target

Let us know if that solves your issue.

Offline

#7 2013-05-14 23:00:29

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: vsftpd service doesn't start at boot

The binary was moved to /usr/bin. The units were updated along with them. systemctl status shows that you still have the old unit loaded.

Offline

#8 2013-05-15 15:27:24

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: vsftpd service doesn't start at boot

spuffin wrote:
jesu wrote:

Well, sure, the ftp server itself works and that's the most important for me. What I want with this is systemd to properly start vsftpd as it should be.
And if I find the proper solution, I'd be glad to add it to the Wiki.

jesu,

Navigate to /usr/lib/systemd/system and edit vsftpd.service

Add the following line in the [Unit] section:
After=network.target

Let us know if that solves your issue.

Thanks, this finally worked.

Previously I'd tried adding to the [Unit] section:
After=NetworkManager.service
thinking "network.target" was deprecated. I've probably must have read some wiki wrong.
Anyway, this worked, so great.


falconindy wrote:

The binary was moved to /usr/bin. The units were updated along with them. systemctl status shows that you still have the old unit loaded.

Yes, though in those days vsftpd binary was located at /usr/sbin and it would start manually. Anyway, issue solved, it required network.target to start correctly.
Should this be considered a bug?

Offline

#9 2013-05-15 15:40:00

spuffin
Member
Registered: 2013-05-14
Posts: 3

Re: vsftpd service doesn't start at boot

jesu wrote:
spuffin wrote:
jesu wrote:

Well, sure, the ftp server itself works and that's the most important for me. What I want with this is systemd to properly start vsftpd as it should be.
And if I find the proper solution, I'd be glad to add it to the Wiki.

jesu,

Navigate to /usr/lib/systemd/system and edit vsftpd.service

Add the following line in the [Unit] section:
After=network.target

Let us know if that solves your issue.

Thanks, this finally worked.

Previously I'd tried adding to the [Unit] section:
After=NetworkManager.service
thinking "network.target" was deprecated. I've probably must have read some wiki wrong.
Anyway, this worked, so great.

Should this be considered a bug?

Glad it worked for you. I would consider it a bug (but have not submit a bug report) as I ran into the same issue as you did and that's how I solved it. If the devs have a better way to solve it, I'm not partial to this solution.

Offline

#10 2013-05-15 15:41:49

spuffin
Member
Registered: 2013-05-14
Posts: 3

Re: vsftpd service doesn't start at boot

falconindy wrote:

The binary was moved to /usr/bin. The units were updated along with them. systemctl status shows that you still have the old unit loaded.

Neither here nor there at this point but even if he was using an old unit, it would not have made a difference if it was started on boot or started manually as they would both point to the wrong location. In this case, the unit works fine if started manually but fails on boot. The variable is not the unit.

Offline

Board footer

Powered by FluxBB