/etc/network/interfaces:4: option with empty value - dns

I am trying to install OpenIMSCore and following the steps from this link and I am getting the below error when trying to restart the network,
root#ubuntu16:~/.test/OpenIMSCore# /etc/init.d/networking restart
[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
root#ubuntu16:~/.test/OpenIMSCore# systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Sat 2018-08-04 01:17:51 IST; 19s ago
Docs: man:interfaces(5)
Process: 27064 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=1/FAILURE)
Process: 27167 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 27164 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=ex
Main PID: 27167 (code=exited, status=1/FAILURE)
Aug 04 01:17:51 ubuntu16 systemd[1]: Starting Raise network interfaces...
Aug 04 01:17:51 ubuntu16 sh[27164]: /etc/network/interfaces:4: option with empty value
Aug 04 01:17:51 ubuntu16 sh[27164]: ifquery: couldn't read interfaces file "/etc/network/interfaces"
Aug 04 01:17:51 ubuntu16 ifup[27167]: /etc/network/interfaces:4: option with empty value
Aug 04 01:17:51 ubuntu16 ifup[27167]: /sbin/ifup: couldn't read interfaces file "/etc/network/interfaces"
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 04 01:17:51 ubuntu16 systemd[1]: Failed to start Raise network interfaces.
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Unit entered failed state.
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Failed with result 'exit-code'.
After debugging I found that the issue was with the /etc/network/interfaces file, when added the below params (from DEVICE, HWADDR to PEERDNS) and start the network I am getting the above error.
Did anyone face the same issues while modifying the interfaces file (my /etc/hosts file & /etc/resolv.conf file are similar to the once provided in the above link).
Any reference on this would also be of great help !
Thanks in advance.

You'll probably kick yourself, but you've got the same typo on two lines. It should be iface eth0 inet dhcp not dchp.
ifup and ifdown will break if they can't parse the file.

Related

Error with code=exited, status=2 when starting VNC

I have problem when starting VNC it giving error looks like this :
Job for vncserver#:1.service failed because the control process exited with error code. See "systemctl status vncserver#:1.service" and "journalctl -xe" for details.
when i check the status the error looks like this :
vncserver#:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver#:1.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-05-07 07:43:11 UTC; 10s ago
Process: 2442 ExecStart=/usr/bin/vncserver %I (code=exited, status=2)
Process: 2436 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
May 07 07:43:11 dev-srv-nlr systemd[1]: Starting Remote desktop service (VNC)...
May 07 07:43:11 dev-srv-nlr systemd[1]: vncserver#:1.service: control process exited, code=exited status=2
May 07 07:43:11 dev-srv-nlr systemd[1]: Failed to start Remote desktop service (VNC).
May 07 07:43:11 dev-srv-nlr systemd[1]: Unit vncserver#:1.service entered failed state.
May 07 07:43:11 dev-srv-nlr systemd[1]: vncserver#:1.service failed.
do you know how to solve this ? Thanks in advance.

Apache on my rPi LAMP box stopped working for no reason

I was editing /etc/crontab when things turned south. I have no idea why, and I rolled back my changes on the /etc/crontab file but apache is still messed up and I can't access local development websites hosted on this machine. When I run systemctl status apache2.service this is what I get:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-10-04 11:27:33 MDT; 6min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 2413 ExecStart=/usr/sbin/apachectl start (code=exited, status=203/EXEC)
Oct 04 11:27:33 pidev.local systemd[1]: Starting The Apache HTTP Server...
Oct 04 11:27:33 pidev.local systemd[2413]: apache2.service: Failed to execute command: No such file or directory
Oct 04 11:27:33 pidev.local systemd[2413]: apache2.service: Failed at step EXEC spawning /usr/sbin/apachectl: No such file or directory
Oct 04 11:27:33 pidev.local systemd[1]: apache2.service: Control process exited, code=exited, status=203/EXEC
Oct 04 11:27:33 pidev.local systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 04 11:27:33 pidev.local systemd[1]: Failed to start The Apache HTTP Server.
Any ideas? I can't seem to trace what's wrong here.

haproxy error on restarting

HAProxy error on restarting. This is the error i have:
# systemctl status haproxy
● haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
Loaded: loaded (/etc/rc.d/init.d/haproxy; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-11-03 03:34:04 EDT; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 6170 ExecStart=/etc/rc.d/init.d/haproxy start (code=exited, status=1/FAILURE)
Nov 03 03:34:04 server systemd[1]: Starting SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments....
Nov 03 03:34:04 server haproxy[6170]: /etc/rc.d/init.d/haproxy: line 26: [: =: unary operator expected
Nov 03 03:34:04 server haproxy[6170]: Starting haproxy: [WARNING] 306/033404 (6178) : config : frontend 'GLOBAL' has no 'bind' directive. Please declare it... intended.
Nov 03 03:34:04 server haproxy[6170]: [ALERT] 306/033404 (6178) : Starting frontend http_front: cannot bind socket [0.0.0.0:80]
Nov 03 03:34:04 server haproxy[6170]: [FAILED]
Nov 03 03:34:04 server systemd[1]: haproxy.service: control process exited, code=exited status=1
Nov 03 03:34:04 server systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments..
Nov 03 03:34:04 server systemd[1]: Unit haproxy.service entered failed state.
Nov 03 03:34:04 server systemd[1]: haproxy.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
My configuration file:
haproxy.cfg
Since you are using systemd, you should use systemd unit file instead of the init.d script.
I don't know how you installed haproxy, you can find haproxy.service in haproxy source directory(contrib/systemd), copy it to systemd folder and use it.
cp contrib/systemd_haproxy.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable haproxy
systemctl start haproxy
systemctl status haproxy

Cannot Start Elastic Search on Ubuntu 17

I installed the Elastic Search by downloading the .deb package from this link.
After installing I tried to browse to http://localhost:9200/ where I'm getting connection refused error, so I checked the status of elastic search service by running the following command sudo service elasticsearch status and I'm getting the below logs :
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-08-04 18:15:59 IST; 3s ago
Docs: http://www.elastic.co
Process: 23168 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --
Process: 23163 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited,
Main PID: 23168 (code=exited, status=1/FAILURE)
Aug 04 18:15:59 mrrobot-Inspiron-N5110 systemd[1]: Starting Elasticsearch...
Aug 04 18:15:59 mrrobot-Inspiron-N5110 systemd[1]: Started Elasticsearch.
Aug 04 18:15:59 mrrobot-Inspiron-N5110 systemd[1]: elasticsearch.service: Main process exited, code=exit
Aug 04 18:15:59 mrrobot-Inspiron-N5110 systemd[1]: elasticsearch.service: Unit entered failed state.
Aug 04 18:15:59 mrrobot-Inspiron-N5110 systemd[1]: elasticsearch.service: Failed with result 'exit-code'
lines 1-13/13 (END)
Can some one tell me how to start the service?

Unable to activate sendmail due to error

I installed sendmail on my Fedora 21 Server installation but when I start it and check it's status I get the following:
[root#localhost mail]# systemctl status sendmail
● sendmail.service - Sendmail Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled)
Active: failed (Result: resources) since Thu 2015-06-04 11:23:31 CEST; 2min 39s ago
Process: 31776 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS)
Process: 31766 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
Process: 31763 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
Jun 04 11:23:31 localhost.localdomain sendmail[31776]: -bd is not supported by sSMTP
Jun 04 11:23:31 localhost.localdomain systemd[1]: Failed to start Sendmail Mail Transport Agent.
Jun 04 11:23:31 localhost.localdomain systemd[1]: Unit sendmail.service entered failed state.
Jun 04 11:23:31 localhost.localdomain systemd[1]: sendmail.service failed.
What is the problem here? I thought the -bd is not supported by sSMTP was a hint. But I can't find anything on this either.
sSMTP is a send-only sendmail emulator. It does not support -bd option when run as a daemon (see "man ssmtp"). Current sendmail in F21 is an alias to ssmtp. You need to remove ssmtp entirely from F21 (yum erase sSMTP).

Resources