You are not logged in.

#1 2013-05-30 10:13:07

doru001
Member
Registered: 2013-01-25
Posts: 138

netctl not active on boot [SOLVED]

$ sudo systemctl status netctl@ethernet\x2dstatic.service
netctl@ethernetx2dstatic.service - Networking for netctl profile ethernetx2dstatic
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

$ sudo journalctl -b
netctl[230]: Could not read state file '/var/lib/netctl/netctl.state'
kernel: sky2 0000:02:00.0 enp2s0: disabling interface
systemd[1]: Unit netctl@ethernet\x2dstatic.service entered failed state.

I need to issue:

$ sudo netctl start ethernet-static

to bring netctl up and access the network:

$ systemctl status netctl
netctl.service - (Re)store the netctl profile state
   Loaded: loaded (/usr/lib/systemd/system/netctl.service; enabled)
   Active: active (exited) since Thu 2013-05-30 13:02:00 EEST; 12min ago
  Process: 230 ExecStart=/usr/bin/netctl restore (code=exited, status=1/FAILURE)

Last edited by doru001 (2013-07-01 15:57:19)

Offline

#2 2013-05-30 13:21:50

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

Maybe this can also help (after I issued $ sudo netctl start ethernet-static):

$ systemctl | grep net
sys-devi...et-enp2s0.device loaded active plugged   Marvell 88E8036 Fast Ethernet Controller (Compal)
sys-subs...es-enp2s0.device loaded active plugged   Marvell 88E8036 Fast Ethernet Controller (Compal)
netctl.service              loaded active exited    (Re)store the netctl profile state
netctl@e...2dstatic.service loaded active exited    lan
network.service             loaded active exited    lan
network.target              loaded active active    Network
$ systemctl status netctl@ethernet\x2dstatic.service net-auto-wired.service netctl.service network.service network.target 
netctl@ethernetx2dstatic.service - Networking for netctl profile ethernetx2dstatic
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)


net-auto-wired.service
   Loaded: error (Reason: No such file or directory)
   Active: inactive (dead)


netctl.service - (Re)store the netctl profile state
   Loaded: loaded (/usr/lib/systemd/system/netctl.service; disabled)
   Active: active (exited) since Thu 2013-05-30 13:02:00 EEST; 3h 52min ago
 Main PID: 230 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/netctl.service


network.service - lan
   Loaded: loaded (/etc/systemd/system/network.service; enabled)
   Active: active (exited) since Thu 2013-05-30 13:01:59 EEST; 3h 52min ago
 Main PID: 218 (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/network.service


network.target - Network
   Loaded: loaded (/usr/lib/systemd/system/network.target; static)
   Active: active since Thu 2013-05-30 13:02:00 EEST; 3h 52min ago
     Docs: man:systemd.special(7)
           http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

net-auto-wired.service is not installed (what package? do I need it just to start ethernet-static?)
netctl@ethernetx2dstatic.service is not active. Maybe this is the problem?

Last edited by doru001 (2013-05-30 13:53:32)

Offline

#3 2013-05-30 16:20:16

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

net-auto-wired.service is left from netcfg, there is some dead symlink under /etc/systemd/system/, it's safe to delete it.

What's in /etc/systemd/system/network.service? As it is under /etc and not /usr/lib, I'd say it's user-created...

I don't see if netctl@ethernetx2dstatic.service is enabled - could you show output of 'systemctl list-unit-files | grep netctl'?

Offline

#4 2013-05-31 06:20:35

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

lahwaacz wrote:

net-auto-wired.service is left from netcfg, there is some dead symlink under /etc/systemd/system/, it's safe to delete it.

What's in /etc/systemd/system/network.service? As it is under /etc and not /usr/lib, I'd say it's user-created...

I don't see if netctl@ethernetx2dstatic.service is enabled - could you show output of 'systemctl list-unit-files | grep netctl'?

Thank you for your answer.

You are right, I added this file when I configured netcfg during system installation:

/etc/systemd/system $ cat network.service 
[Unit]
Description=lan
Requires=iptables.service
After=iptables.service
Wants=network.target
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network
ExecStart=/sbin/ip link set dev ${interface} up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
ExecStart=/sbin/ip route add default via ${gateway}
ExecStop=/sbin/ip addr flush dev ${interface}
ExecStop=/sbin/ip link set dev ${interface} down
[Install]
WantedBy=multi-user.target

The variables were (are) taken from:

/etc/conf.d $ cat network
interface=enp2s0
address=192.168.69.73
netmask=24
broadcast=192.168.69.255
gateway=192.168.69.1
$ systemctl list-unit-files | grep netctl
netctl-auto@.service                   disabled
netctl-ifplugd@.service                disabled
netctl-sleep.service                   disabled
netctl.service                         disabled
netctl@.service                        static  
netctl@ethernet\x2dstatic.service      enabled 

Last edited by doru001 (2013-05-31 06:23:23)

Offline

#5 2013-05-31 06:25:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netctl not active on boot [SOLVED]

So if you have a network.service that is custom, why are you then trying to use netctl.service and netctl@.service?  You need to choose one method of connecting your setup and go with it.  Enabling every network management service on your machine isn't going to make your connection any better.

Offline

#6 2013-05-31 06:31:12

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

I think you need to decide which one you're going to use - you can't use network.service and netctl@ethernet-static.service at the same time. The network interface can be configured only once (resp. netctl expects the interface to be unconfigured, it doesn't reconfigure it). Obviously network.service started before netctl@ethernet-static.service and therefore it failed.

Offline

#7 2013-05-31 07:07:06

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

Thank you,

sudo systemctl disable network

solved the problem.

So there are two network manager services installed on my system even after netcfg was uninstalled by netctl install program?

Offline

#8 2013-05-31 07:56:03

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

You said that you created the network.service - I don't see how it's related to netcfg? The netcfg package doesn't (never did) contain such service, the only similar service I found on the wiki is this.

As to your entry on the wiki - please remove it as it is not related to netctl/netcfg migration. Some note in the beginning of the page to disable other network management services should be sufficient (but it should also be obvious and therefore unnecessary).

Offline

#9 2013-06-01 08:27:43

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

lahwaacz wrote:

You said that you created the network.service - I don't see how it's related to netcfg? The netcfg package doesn't (never did) contain such service, the only similar service I found on the wiki is this.

As to your entry on the wiki - please remove it as it is not related to netctl/netcfg migration. Some note in the beginning of the page to disable other network management services should be sufficient (but it should also be obvious and therefore unnecessary).

Nothing would be necessary if we all would know everything.

The story is simple: I followed Beginner's Guide (which may have changed since then) and I never did install netcfg by myself. When I read this on archlinux.org, I checked my system and netcfg was happily installed. So I thought that I am using netcfg as a default. When I installed netctl it did remove netcfg and I could enjoy my Internet connection until reboot, even though I have carefully followed the netcfg to netctl migration guide.

Now, since a number of people, who, like me, have carefully read the documentation, will end up in the same position as I did, and since disabling network twice does not hurt anybody, please allow that information to stay there until the documentation becomes clear enough to make it redundant.

I also believe that this was a sort of collision between services, since none of them actually established a connection.

While we are at it, please tell me what is that '@' doing in services names?

Last edited by doru001 (2013-06-01 09:16:27)

Offline

#10 2013-06-01 09:33:16

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

I found it! Your service file is here.

I haven't read Beginner's Guide in a while, so I don't really know where it leads to, but in current form it covers basic network configuration using netctl. Just remember for the next time, the fact that you have some program installed doesn't mean you are actually using it wink.

Offline

#11 2013-06-01 10:14:46

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

lahwaacz wrote:

I found it! Your service file is here.

I haven't read Beginner's Guide in a while, so I don't really know where it leads to, but in current form it covers basic network configuration using netctl. Just remember for the next time, the fact that you have some program installed doesn't mean you are actually using it wink.

So why did they put it there, against the arch linux minimalistic philosophy?

So how about my arguments in favor of maintaining the info on the netctl page?

And what is that '@' doing in the names of the services?

Offline

#12 2013-06-01 10:45:00

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

doru001 wrote:

So why did they put it there, against the arch linux minimalistic philosophy?

So how about my arguments in favor of maintaining the info on the netctl page?

And what is that '@' doing in the names of the services?

What do you mean by it? Beginner's Guide is very verbose 'Guide through the whole process of installing and configuring Arch Linux; written for new or inexperienced users.' so it's appropriate to include networking section. Network Configuration covers network configuration more in-depth, it's written for experienced users. It covers mainly manual configuration without netctl - in minimalistic Arch you don't need netctl at all. It seems to mee that everything is perfectly reasonable.

My argument still stands - the note to disable network.service isn't related to netcfg/netctl transition, therefore it doesn't belong into that section. You could write a general note to disable every other network management application/service (please discuss it first on the Talk Page).

It means that the file is just a template, from which you can create multiple services with different arguments. You should read systemd.unit manpage, after that you can add explanation into Systemd article as I don't see it there...

Offline

#13 2013-06-01 11:07:45

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

Sorry, I meant, why did they put netcfg on the arch system, if it was not required? But maybe it is a small and often necessary utility.

lahwaacz wrote:
doru001 wrote:

So why did they put it there, against the arch linux minimalistic philosophy?

So how about my arguments in favor of maintaining the info on the netctl page?

And what is that '@' doing in the names of the services?

What do you mean by it? Beginner's Guide is very verbose 'Guide through the whole process of installing and configuring Arch Linux; written for new or inexperienced users.' so it's appropriate to include networking section. Network Configuration covers network configuration more in-depth, it's written for experienced users. It covers mainly manual configuration without netctl - in minimalistic Arch you don't need netctl at all. It seems to mee that everything is perfectly reasonable.

My argument still stands - the note to disable network.service isn't related to netcfg/netctl transition, therefore it doesn't belong into that section. You could write a general note to disable every other network management application/service (please discuss it first on the Talk Page).

It means that the file is just a template, from which you can create multiple services with different arguments. You should read systemd.unit manpage, after that you can add explanation into Systemd article as I don't see it there...

Offline

#14 2013-06-01 11:28:02

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: netctl not active on boot [SOLVED]

netcfg/netctl is not necessary, but it's very convenient - not everybody can use static IP configuration for example... Or imagine management of dozens of manual wireless connections.

Offline

#15 2013-06-01 14:16:06

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

lahwaacz wrote:

netcfg/netctl is not necessary, but it's very convenient - not everybody can use static IP configuration for example... Or imagine management of dozens of manual wireless connections.

Very well, I suppose that dhcp can work without netctl, but a dozen wireless connections would be horrific without it.

Now, don't you think that we should add a line here saying that please disable all competing services, like for example those listed here (I don't know where) using sudo systemctl disable service-name?

Offline

#16 2013-06-01 16:06:00

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netctl not active on boot [SOLVED]

doru001 wrote:

Sorry, I meant, why did they put netcfg on the arch system, if it was not required? But maybe it is a small and often necessary utility.

I feel like i need to clarify something here.  There is no "they" that are maliciously installing extra crap onto your computer without your knowledge.  You installed that on your system.

Sure, netcfg may have been part of the "base" group (now replaced by netctl), but that doens't mean that anyone forced it ont your system.  The grouping of "base" packages is simply for convenience.  Just as "base-devel" is a set of packages that enable you to build things.  But though I have the whole group installed, it doens't mean that I know for certain that I am making use of every single package there.

Netcfg/netctl are just some simple shell scripts.  I think that their inclusion into the "base" group is simply because all the dependencies that are required for it were already in base, so adding a 73KB set of scripts brings far more benefit than not.


Edit: BTW, I figured out what you two were talking about in reference to a wiki entry that is unnecessary.  It is gone now (thanks lahwaacz), but it really doesn't belong there.  That page is about netctl and netctl only.  It has nothing to do with a random self made service that you had enabled.  Since you did make that service yourself, you have to understand that you are probably only one of a very, very small percentage of people that might have this problem.  I helped someone else in these threads the other day who also had this service file, but it is the exception rather than the rule.

Last edited by WonderWoofy (2013-06-01 16:12:39)

Offline

#17 2013-06-02 11:16:56

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

I have explained here why there are a number of people who share my configuration and my problem: I just followed installation instructions.

I know about my freedom to choose the programs that I install. I asked why did they include netcfg into the base group, which is installed by those who follow install instructions. I was misled by its presence to think that I'm using it, and now I needed to understand the reason behind its presence.

Finally, the netctl wiki page has a paragraph on migration from netcfg to netctl. Since many people, like me, will need to disable competing networking services, I believe that it would be normal to mention this in that paragraph. It does not hurt anybody and it helps a number of users. It is part of the migration process. The paragraph is not written for those who already know how to migrate from netcfg to netctl.

WonderWoofy wrote:
doru001 wrote:

Sorry, I meant, why did they put netcfg on the arch system, if it was not required? But maybe it is a small and often necessary utility.

I feel like i need to clarify something here.  There is no "they" that are maliciously installing extra crap onto your computer without your knowledge.  You installed that on your system.

Sure, netcfg may have been part of the "base" group (now replaced by netctl), but that doens't mean that anyone forced it ont your system.  The grouping of "base" packages is simply for convenience.  Just as "base-devel" is a set of packages that enable you to build things.  But though I have the whole group installed, it doens't mean that I know for certain that I am making use of every single package there.

Netcfg/netctl are just some simple shell scripts.  I think that their inclusion into the "base" group is simply because all the dependencies that are required for it were already in base, so adding a 73KB set of scripts brings far more benefit than not.


Edit: BTW, I figured out what you two were talking about in reference to a wiki entry that is unnecessary.  It is gone now (thanks lahwaacz), but it really doesn't belong there.  That page is about netctl and netctl only.  It has nothing to do with a random self made service that you had enabled.  Since you did make that service yourself, you have to understand that you are probably only one of a very, very small percentage of people that might have this problem.  I helped someone else in these threads the other day who also had this service file, but it is the exception rather than the rule.

Offline

#18 2013-06-02 13:26:32

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netctl not active on boot [SOLVED]

doru001 wrote:

Finally, the netctl wiki page has a paragraph on migration from netcfg to netctl. Since many people, like me, will need to disable competing networking services, I believe that it would be normal to mention this in that paragraph. It does not hurt anybody and it helps a number of users. It is part of the migration process. The paragraph is not written for those who already know how to migrate from netcfg to netctl.

I'm not saying that something about competing network management in the wiki is not appropriate for the nectl page.  I am saying that telling people to disable a service that you wrote yourself (not one provided by a package) does not make sense, as people are a whole hell of a lot less likely to have or use a sevice called "network.service".  In fact, I could create a service with the exact same contents and call it the wonderwoofy.service.  So would I then feel the need to go to the netctl page and tell eveyone to disable the wonderwoofy.service?  No that doens't make any sense.  Put a note in there that says something more general.  Others could have NetworkManager activated while trying to use netctl... or wicd.  I'm just saying that what you put in there was too specific, and entirely personalized.  Make it general, and it is fine.

Offline

#19 2013-06-02 15:25:50

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

WonderWoofy wrote:

I'm not saying that something about competing network management in the wiki is not appropriate for the nectl page.  I am saying that telling people to disable a service that you wrote yourself (not one provided by a package) does not make sense, as people are a whole hell of a lot less likely to have or use a sevice called "network.service".  In fact, I could create a service with the exact same contents and call it the wonderwoofy.service.  So would I then feel the need to go to the netctl page and tell eveyone to disable the wonderwoofy.service?  No that doens't make any sense.  Put a note in there that says something more general.  Others could have NetworkManager activated while trying to use netctl... or wicd.  I'm just saying that what you put in there was too specific, and entirely personalized.  Make it general, and it is fine.

Very well, how about this: *If you were using a network service other than netcfg to bring up your interface then do #systemctl disable the-network-service.service?

A note on '@' in systemd unit names: it is well explained here (just search @) and badly explained in man systemd.unit (just search @, too).

Offline

#20 2013-06-02 16:02:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netctl not active on boot [SOLVED]

doru001 wrote:

Very well, how about this: *If you were using a network service other than netcfg to bring up your interface then do #systemctl disable the-network-service.service?

Well now you don't even mention the potential of having conflicting network managers as you said was your intent.  Besides that it soudns as though you want to put this in te section about moving from netcfg to netctl.  I also think that it would be the wrong place for that as well.  You may have had issues when you converted because you tried to enable everything under the sun, but this is not unique to conversion to netctl.  This will happen regardless of whether your intent is to use NetworkManager but forgot to disable wicd, or if you use connman, but still have dhcpcd@.service enabled.  If anything, just put a small note under there that says "It may be a good idea to use "systemctl --type=service" to ensure that no other service is running that may want to configure the network.  Multiple networking services will conflict." 

That way you have something simple, to the point, that covers all instances. 

A note on '@' in systemd unit names: it is well explained here (just search @) and badly explained in man systemd.unit (just search @, too).

I don't understand how it is not clear.  It seems pretty clear to me, particularly if you make it down the the table of different variables and how they work with the service name.  Did you read the whole man page, or did you simply "just search @" and read those parts?  But assuming the explanantion is bad, that can be frusturating, yes.  Now look at the line you had added to the wiki, and notice the total lack of reference to anything else, or any kind of explanation, or anything.  On >99% of systems that "systemctl disable network" command would have just errored out, leaving others potentially thinking that they might still have "the conflicting network service".

In any case, I agree that Lennart's blog series is pretty great, and provides some amaznig information.  But you have to consider that he is writing in his blog there and not in the documentation for the program.  He can be much more informal, and use lenghtier examples as he pleases, as there is no proper formatting he is trying to adhere to.

The documentation for systemd is some of the best I have seen.  So it always rather confuses me when people come asking about how to do some of the simpler things with tools like systemctl.  Though it was designed with a lot of power in mind, it seems as though the developers also tried to make intefacing with it as simple as possible as well.  I think this is best exemplified by the formatting of the service files themselves, which are based off of microsoft's INI format.

Offline

#21 2013-06-03 02:38:09

doru001
Member
Registered: 2013-01-25
Posts: 138

Re: netctl not active on boot [SOLVED]

WonderWoofy wrote:

"It may be a good idea to use "systemctl --type=service" to ensure that no other service is running that may want to configure the network.  Multiple networking services will conflict." 

That way you have something simple, to the point, that covers all instances.

Thank you, I have added this to the wiki.

I don't understand how it is not clear.  It seems pretty clear to me, particularly if you make it down the the table of different variables and how they work with the service name.

Yes, I know that the table helps to clarify the meaning of the explanation, but it is cumbersome to rely on that if you did not read the blog entry first. It is true that it is difficult to write a good manual which is also a good reference.

Thank you for your help.

Last edited by doru001 (2013-06-03 02:42:27)

Offline

#22 2013-06-04 11:04:32

Peg-leg
Member
Registered: 2013-06-04
Posts: 2

Re: netctl not active on boot [SOLVED]

I run exactly into this issue. For two weeks I had to start the network manually trough `netctl start ethernet-static` because of this.

I also had "network.service" runnig and I didn't create that service. It was left from the `netcfg` days.

If I didn't find this post I wouldn't have known to disable that service.

Mentioning to run `netctl disable network.service` in "Migrating from netcfg" would have helped me with this issue.

Offline

Board footer

Powered by FluxBB