Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Not able to start apache service.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Sat Apr 30, 2016 3:33 pm    Post subject: Not able to start apache service. Reply with quote

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

Code:
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

Code:
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.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sat Apr 30, 2016 4:04 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Sat Apr 30, 2016 4:33 pm    Post subject: Reply with quote

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

Code:
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 :-

Code:
/etc/init.d/net.lo restart and
/etc/init.d/net.eno1 restart



Code:
# 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
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Mon May 02, 2016 8:59 am    Post subject: Reply with quote

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:
Code:
# rc-status|grep net
 netmount                                                          [  stopped  ]
 xinetd                                                            [  started  ]
 net.lo                                                            [  started  ]

Angad net # rc-status|grep net\\.
 net.lo                                                            [  started  ]

You should add net.eno1 to your default runlevel :
Code:
# rc-update add net.eno1 default

For now, that "works" because apache depends on "net", which forces net.* to start.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Mon May 02, 2016 1:46 pm    Post subject: Reply with quote

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

Code:
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.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Tue May 03, 2016 5:24 pm    Post subject: Reply with quote

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.

Code:
# /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.

Code:
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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Tue May 03, 2016 6:52 pm    Post subject: Reply with quote

manu_leo,

You actually have interfaces
Code:
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
Code:
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
Code:
 *   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.

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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