# Not able to start apache service.

## manu_leo

Hi Experts, I recently installed apache on my server. When I try to restart the service for it, I get the below error :-

```
htdocs # /etc/init.d/apache2 restart

 * Bringing up interface eno1

 *   You are using a bash array for config_eno1.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eno1.

 *   192.168.101.226 ...

RTNETLINK answers: File exists                                                                                                                                                         [ !! ]

 * ERROR: net.eno1 failed to start

 * Bringing up interface eno1

 *   You are using a bash array for config_eno1.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eno1.

 *   192.168.101.226 ...

RTNETLINK answers: File exists                                                                                                                                                         [ !! ]

 * ERROR: net.eno1 failed to start

 * ERROR: cannot start netmount as net.eno1 would not start

 * ERROR: cannot start apache2 as net.eno1 would not start
```

I am not sure what exactly is the issue because eno1 is up and it has the management ip on it. 

 *Quote:*   

> # cd /sys/class/net
> 
> # ls
> 
> eno1  eno2  enp3s0f0  enp3s0f1  enp4s0f0  enp4s0f1  lo
> ...

 

```
net # ifconfig

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.101.226  netmask 255.255.255.0  broadcast 192.168.101.255

        inet6 fe80::7a45:c4ff:fef7:abf4  prefixlen 64  scopeid 0x20<link>

        ether 78:45:c4:f7:ab:f4  txqueuelen 1000  (Ethernet)

        RX packets 715244171  bytes 93576961795 (87.1 GiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 164771774  bytes 43993032586 (40.9 GiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

Appreciate all your help in advance.

----------

## eccerr0r

How did you start up net.eno1 - did you let openrc start it up, or did you ifconfig it manually?

What does

# rc-status|grep net\\.

say?

You may be able to cheat openrc by

# cd /run/openrc/started && ln -s /etc/init.d/net.eno1 .

and try restarting apache, but it looks like you have the openrc net.eno1 setup wrong - heed the warning openrc gives.

----------

## manu_leo

Thanks for your prompt replay. 

I have made an entry for the eno1 under /etc/conf.d/net and have created a softlink for it under /etc/init.d as below

```
ln -s net.eno1 net.lo
```

I then go ahead and restart the net.lo and net.eno1 as below

Requested o/p is below :-

```
/etc/init.d/net.lo restart and 

/etc/init.d/net.eno1 restart
```

```
# rc-status|grep net

 netmount                                                          [  stopped  ]

 xinetd                                                            [  started  ]

 net.lo                                                            [  started  ]

Angad net # rc-status|grep net\\.

 net.lo                                                            [  started  ]
```

Please suggest if I am missing something here.

Thanks

----------

## Syl20

 *manu_leo wrote:*   

> I have made an entry for the eno1 under /etc/conf.d/net 

 

And what did you put in /etc/conf.d/net ? Visibly, that is the problem.

 *Quote:*   

> 
> 
> ```
> # rc-status|grep net
> 
> ...

 

You should add net.eno1 to your default runlevel :

```
# rc-update add net.eno1 default
```

For now, that "works" because apache depends on "net", which forces net.* to start.

----------

## manu_leo

This is what I have under /etc/conf.d/net

```
config_eno1=("192.168.101.226 netmask 255.255.255.0 broadcast 192.168.101.255")

```

please let me know in case I am missing something here.

----------

## manu_leo

Guys , please suggest. Is there something wrong with the syntax I mentioned under /etc/conf.d/net ? I am not able to start multiple services like apache, vnc etc.

```
# /etc/init.d/vnc restart

 * Bringing up interface eno1

 *   You are using a bash array for config_eno1.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eno1.

 *   192.168.101.226 ...

RTNETLINK answers: File exists                                                                                                                                                         [ !! ]

 * ERROR: net.eno1 failed to start

 * ERROR: cannot start vnc as net.eno1 would not start
```

I never saw this error before so really confused. net.eno1 status is stopped however I am still able to ssh to it.

```
Angad ~ # /etc/init.d/net.eno1 status

 * status: stopped

Angad ~ # /etc/init.d/net.eno1 start

 * Bringing up interface eno1

 *   You are using a bash array for config_eno1.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eno1.

 *   192.168.101.226 ...

RTNETLINK answers: File exists                                                                                                                                                         [ !! ]

 * ERROR: net.eno1 failed to start
```

Appreciate all your help and time.

Thanks.

----------

## NeddySeagoon

manu_leo,

You actually have interfaces 

```
eno1 eno2 enp3s0f0 enp3s0f1 enp4s0f0 enp4s0f1 lo 
```

By default, the net service is only considered up if they are all started.

Read the comments in /etc/rc.conf and understand what rc_depend_strict does.

The syntax 

```
config_eno1=("192.168.101.226 netmask 255.255.255.0 broadcast 192.168.101.255") 
```

is depreciated.

Read the handbook to see the newer syntax.  That's not your issue with things not starting though.  It does provoke

```
 *   You are using a bash array for config_eno1.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eno1. 
```

----------

