systemctl application not showing up on frontend or api? - node.js

I am using a droplet for an application and I am trying to set up my BACKEND server however I am getting these error's, but everything seems to be running however my frontend can't seem to pick it up. This server was working at one point but has since stopped working after the branch was changed to master.
Any help would be good
This looks correct as well
Mar 30 14:41:31 ids-bots node[2822]: at Server.emit (node:events:527:28)
Mar 30 14:41:31 ids-bots node[2822]: at parserOnIncoming (node:_http_server:951:12)
Mar 30 14:41:31 ids-bots node[2822]: at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
Mar 30 22:41:20 ids-bots systemd[1]: Stopping Jem...
Mar 30 22:41:21 ids-bots systemd[1]: jem.service: Main process exited, code=dumped, status=3/QUIT
Mar 30 22:41:21 ids-bots systemd[1]: jem.service: Failed with result 'core-dump'.
Mar 30 22:41:21 ids-bots systemd[1]: Stopped Jem.
Mar 30 22:41:21 ids-bots systemd[1]: Started Jem.
Mar 30 22:41:22 ids-bots node[6418]: Jem API listening on port 3001
Mar 30 22:41:22 ids-bots node[6418]: Connected database to mongodb://127.0.0.1:27017/jem```

Related

problems starting service that runs a bash script that in turn runs a python script

I have the following service file, enable, and start files located in /home/pi/poolboy/service:
[Unit]
Description=Pool Boy
After=network-online.target
[Service]
ExecStart=/home/pi/poolboy/start
WorkingDirectory=/home/pi/poolboy
StandardOutput=inherit
StandardError=inherit
Restart=always
[Install]
WantedBy=multi-user.target
I have an "enable" script to install it:
#!/bin/bash
sudo cp /home/pi/poolboy/service/poolboy.service /lib/systemd/system/
sudo systemctl enable poolboy.service
I have a "start" script to start the service:
#!/bin/bash
sudo systemctl start poolboy.service
the actual start script that runs the application (and is called by the service) is located in /home/pi/poolboy:
#!/bin/bash
cd "$(dirname "$0")"
VENV=venv
echo 'checking for ' $VENV
if [ ! -d $VENV ]
then
echo $VENV ' does not exist... initially creating it'
python3 -m venv $VENV
echo 'activating the virtual environment'
source venv/bin/activate
echo 'installing libraries from requirements.txt'
pip3 install -r requirements.txt
else
source $VENV/bin/activate
fi
echo 'starting...'
sudo $VENV/bin/python3 poolboy.py --standalone
After running the enable script I run the start script. I get the following output in my /var/log/syslog:
Jun 19 22:10:43 poolboy systemd[1]: Started Pool Boy.
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Main process exited, code=exited, status=200/CHDIR
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Service RestartSec=100ms expired, scheduling restart.
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Scheduled restart job, restart counter is at 1.
Jun 19 22:10:43 poolboy systemd[1]: Stopped Pool Boy.
Jun 19 22:10:43 poolboy systemd[1]: Started Pool Boy.
Jun 19 22:10:43 poolboy systemd[4980]: poolBoy.service: Changing to the requested working directory failed: No such file or directory
Jun 19 22:10:43 poolboy systemd[4980]: poolBoy.service: Failed at step CHDIR spawning /usr/bin/python3: No such file or directory
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Main process exited, code=exited, status=200/CHDIR
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Service RestartSec=100ms expired, scheduling restart.
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Scheduled restart job, restart counter is at 2.
Jun 19 22:10:43 poolboy systemd[1]: Stopped Pool Boy.
Jun 19 22:10:43 poolboy systemd[1]: Started Pool Boy.
Jun 19 22:10:43 poolboy systemd[4981]: poolBoy.service: Changing to the requested working directory failed: No such file or directory
Jun 19 22:10:43 poolboy systemd[4981]: poolBoy.service: Failed at step CHDIR spawning /usr/bin/python3: No such file or directory
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Main process exited, code=exited, status=200/CHDIR
Jun 19 22:10:43 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Service RestartSec=100ms expired, scheduling restart.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Scheduled restart job, restart counter is at 3.
Jun 19 22:10:44 poolboy systemd[1]: Stopped Pool Boy.
Jun 19 22:10:44 poolboy systemd[1]: Started Pool Boy.
Jun 19 22:10:44 poolboy systemd[4982]: poolBoy.service: Changing to the requested working directory failed: No such file or directory
Jun 19 22:10:44 poolboy systemd[4982]: poolBoy.service: Failed at step CHDIR spawning /usr/bin/python3: No such file or directory
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Main process exited, code=exited, status=200/CHDIR
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Service RestartSec=100ms expired, scheduling restart.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Scheduled restart job, restart counter is at 4.
Jun 19 22:10:44 poolboy systemd[1]: Stopped Pool Boy.
Jun 19 22:10:44 poolboy systemd[4984]: poolBoy.service: Changing to the requested working directory failed: No such file or directory
Jun 19 22:10:44 poolboy systemd[1]: Started Pool Boy.
Jun 19 22:10:44 poolboy systemd[4984]: poolBoy.service: Failed at step CHDIR spawning /usr/bin/python3: No such file or directory
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Main process exited, code=exited, status=200/CHDIR
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Service RestartSec=100ms expired, scheduling restart.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Scheduled restart job, restart counter is at 5.
Jun 19 22:10:44 poolboy systemd[1]: Stopped Pool Boy.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Start request repeated too quickly.
Jun 19 22:10:44 poolboy systemd[1]: poolBoy.service: Failed with result 'exit-code'.
Jun 19 22:10:44 poolboy systemd[1]: Failed to start Pool Boy.
After replacing poolBoy with poolboy, it looks better, but the application is still not starting:
Jun 20 11:09:28 poolboy systemd[1]: Started Pool Boy.
Jun 20 11:09:28 poolboy start[1373]: checking for venv
Jun 20 11:09:28 poolboy start[1373]: starting...
Jun 20 11:09:28 poolboy systemd[1]: poolboy.service: Succeeded.
Jun 20 11:09:58 poolboy systemd[1]: poolboy.service: Service RestartSec=30s expired, scheduling restart.
Jun 20 11:09:58 poolboy systemd[1]: poolboy.service: Scheduled restart job, restart counter is at 12.
Jun 20 11:09:58 poolboy systemd[1]: Stopped Pool Boy.
Jun 20 11:09:58 poolboy systemd[1]: Started Pool Boy.
Jun 20 11:09:58 poolboy start[1447]: checking for venv
Jun 20 11:09:58 poolboy start[1447]: starting...
Jun 20 11:09:58 poolboy systemd[1]: poolboy.service: Succeeded.
Jun 20 11:10:28 poolboy systemd[1]: poolboy.service: Service RestartSec=30s expired, scheduling restart.
Jun 20 11:10:28 poolboy systemd[1]: poolboy.service: Scheduled restart job, restart counter is at 13.
Jun 20 11:10:28 poolboy systemd[1]: Stopped Pool Boy.
Jun 20 11:10:28 poolboy systemd[1]: Started Pool Boy.
Jun 20 11:10:28 poolboy start[1521]: checking for venv
Jun 20 11:10:28 poolboy start[1521]: starting...
Jun 20 11:10:28 poolboy systemd[1]: poolboy.service: Succeeded.
Jun 20 11:10:58 poolboy systemd[1]: poolboy.service: Service RestartSec=30s expired, scheduling restart.
Jun 20 11:10:58 poolboy systemd[1]: poolboy.service: Scheduled restart job, restart counter is at 14.
Jun 20 11:10:58 poolboy systemd[1]: Stopped Pool Boy.
Jun 20 11:10:58 poolboy systemd[1]: Started Pool Boy.
Jun 20 11:10:59 poolboy start[1595]: checking for venv
Jun 20 11:10:59 poolboy start[1595]: starting...
Jun 20 11:10:59 poolboy systemd[1]: poolboy.service: Succeeded.
Jun 20 11:11:01 poolboy kernel: [ 458.537483]
Jun 20 11:11:01 poolboy kernel: [ 458.537513] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 5
Jun 20 11:11:13 poolboy kernel: [ 470.441646]
Jun 20 11:11:13 poolboy kernel: [ 470.441682] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 5
Jun 20 11:11:29 poolboy systemd[1]: poolboy.service: Service RestartSec=30s expired, scheduling restart.
Jun 20 11:11:29 poolboy systemd[1]: poolboy.service: Scheduled restart job, restart counter is at 15.
Jun 20 11:11:29 poolboy systemd[1]: Stopped Pool Boy.
Jun 20 11:11:29 poolboy systemd[1]: Started Pool Boy.
Jun 20 11:11:29 poolboy start[1670]: checking for venv
Jun 20 11:11:29 poolboy start[1670]: starting...
Jun 20 11:11:29 poolboy systemd[1]: poolboy.service: Succeeded.
Any suggestions?
duh... my /home/pi/poolboy/start script had an & in the last line :-/
Now working with the above files

Apache2 is not starting,I am using Ubuntu 16.04

Unable to start Apache2 server after I modifed dir.conf file, even after changing it back to normal
I modified /etc/apache2/mods-enabled/dir.conf and changed the order and wrote index.php in
the first place before index.html, so the file contents have been modified from
"DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm" to now
"DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm". But still
changing that back to original order, also does not start apache2 server, it gives the same
error. I tried restarting and stop and start, but none seem to work.
** Here are the details of systemctl status apache2.service **
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2020-11-24 12:28:31 IST; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 20300 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 25755 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Nov 24 12:28:31 localhost apache2[25755]: *
Nov 24 12:28:31 localhost apache2[25755]: * The apache2 configtest failed.
Nov 24 12:28:31 localhost apache2[25755]: Output of config test was:
Nov 24 12:28:31 localhost apache2[25755]: AH00534: apache2: Configuration error: More than one MPM loaded.
Nov 24 12:28:31 localhost apache2[25755]: Action 'configtest' failed.
Nov 24 12:28:31 localhost apache2[25755]: The Apache error log may have more information.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 24 12:28:31 localhost systemd[1]: Failed to start LSB: Apache2 web server.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Unit entered failed state.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Failed with result 'exit-code'.
**Here is the details of journalctl -xe**
Nov 24 12:44:42 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:42 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:43 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:43 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:44 localhost systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Unit entered failed state.
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Nov 24 12:44:44 localhost systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Nov 24 12:44:44 localhost systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.545855Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.545908Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.705792Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --expl
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.707018Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.16.04.1) starting as process 538
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709650Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No suc
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709678Z 0 [ERROR] Aborting
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709703Z 0 [Note] Binlog end
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709770Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]

Why is puppet server was running fine but failing after some time fails?

When I logged in to my VM (Ubuntu 18.04) for second time, its showing error:
# systemctl status puppetserver.service
puppetserver.service - puppetserver Service Loaded: loaded
(/lib/systemd/system/puppetserver.service; enabled; vendor preset: enabled)
**Active**: failed (Result: exit-code) since Wed 2019-10-02 11:42:52 UTC; 2min 31s ago
Process: 23034
ExecStart=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver
start (code=exited, status=1/FAILURE)
Oct 02 11:42:52 puppet-master systemd[1]: puppetserver.service:
Control process exited, code=exited status=1 Oct 02 11:42:52
puppet-master systemd[1]: puppetserver.service: Failed with result
'exit-code'. Oct 02 11:42:52 puppet-master systemd[1]: Failed to start
puppetserver Service. Oct 02 11:42:52 puppet-master systemd[1]:
puppetserver.service: Service hold-off time over, scheduling restart.
Oct 02 11:42:52 puppet-master systemd[1]: puppetserver.service:
Scheduled restart job, restart counter is at 5. Oct 02 11:42:52
puppet-master systemd[1]: Stopped puppetserver Service. Oct 02
11:42:52 puppet-master systemd[1]: puppetserver.service: Start request
repeated too quickly. Oct 02 11:42:52 puppet-master systemd[1]:
puppetserver.service: Failed with result 'exit-code'. Oct 02 11:42:52
puppet-master systemd[1]: Failed to start puppetserver Service.
Is there a way to identify the issue?
To troubleshoot more, you can run:
journalctl -xe -u puppetserver
And also check the /var/log/puppetlabs/puppetserver/puppetserver.log file for more info, but based on the error message:
Start request repeated too quickly
It seems that you didn't have patience to restart (as it can take few minutes).
The best to restart I recommend to you:
systemctl restart puppet*
systemctl restart puppet pxp-agent
In this way, the services manage the dependency between all puppet* services.
Note: Server Fault, part of Stack Exchange (includes Stack Overflow) provides support for managing information technology systems in a business environment.

MongoDB on Raspberry Pi fails to load

I just installed Mongodb on my Raspberry Pi 3 using the regular sudo apt install mongodb, which gave no errors. I then checked the status:
$ sudo service mongodb status
● mongodb.service - An object/document-oriented database
Loaded: loaded (/lib/systemd/system/mongodb.service; enabled)
Active: failed (Result: exit-code) since Fri 2017-02-17 08:53:47 UTC; 5s ago
Docs: man:mongod(1)
Process: 11569 ExecStart=/usr/bin/mongod --config /etc/mongodb.conf (code=exited, status=14)
Main PID: 11569 (code=exited, status=14)
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6(+0x4a9a0) [0x7680e9a0]
Feb 17 08:53:47 raspberrypi mongod[11569]: Fri Feb 17 08:53:47.612 Got signal: 6 (Aborted).
Feb 17 08:53:47 raspberrypi mongod[11569]: Fri Feb 17 08:53:47.613 Backtrace:
Feb 17 08:53:47 raspberrypi mongod[11569]: 0x664160 0x16e370 0x765e2180 0x765e0f70
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x2a0) [0x16e370]
Feb 17 08:53:47 raspberrypi mongod[11569]: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x765e2180]
Feb 17 08:53:47 raspberrypi mongod[11569]: /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x765e0f70]
Feb 17 08:53:47 raspberrypi systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
Feb 17 08:53:47 raspberrypi systemd[1]: Unit mongodb.service entered failed state.
And I tried starting it with sudo service mongodb start, but in the logs (using sudo journalctl -f) I only get this:
Feb 17 08:53:58 raspberrypi sudo[11586]: pi : TTY=pts/0 ; PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/usr/sbin/service mongodb start
Feb 17 08:53:58 raspberrypi sudo[11586]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Feb 17 08:53:59 raspberrypi systemd[1]: Starting An object/document-oriented database...
Feb 17 08:53:59 raspberrypi systemd[1]: Started An object/document-oriented database.
Feb 17 08:53:59 raspberrypi sudo[11586]: pam_unix(sudo:session): session closed for user root
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.391 terminate() called, printing stack (if implemented for platform):
Feb 17 08:53:59 raspberrypi mongod[11608]: 0x664160 0x16d954 0x768649a0
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo11myterminateEv+0x54) [0x16d954]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6(+0x4a9a0) [0x768649a0]
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.393 Got signal: 6 (Aborted).
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.394 Backtrace:
Feb 17 08:53:59 raspberrypi mongod[11608]: 0x664160 0x16e370 0x76638180 0x76636f70
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x2a0) [0x16e370]
Feb 17 08:53:59 raspberrypi mongod[11608]: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76638180]
Feb 17 08:53:59 raspberrypi mongod[11608]: /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x76636f70]
Feb 17 08:53:59 raspberrypi systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
Feb 17 08:53:59 raspberrypi systemd[1]: Unit mongodb.service entered failed state.
I don't really understand these errors. Does anybody else know what's going on?

Deploy kubernetes cluster on Azure

I tried to create kubernetes cluster(v1.2.3) on azure with coreos cluster. I followed the documentation (http://kubernetes.io/docs/getting-started-guides/coreos/azure/)
Then I cloned the repo( git clone https://github.com/kubernetes/kubernetes). And I did a minor change in file( docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml) changed the kube version from v1.1.2 to v1.2.3.
And then I created the cluster by running the file(./create-kubernetes-cluster.js), cluster is successfully created for me. But in master node API server didn't get started..
I checked the log it was showing - Cloud provider could not be initialized: unknown cloud provider "vagrant".. I could not catch why this issue was coming..
This is my Log of -> kube-apiserver.service
-- Logs begin at Sat 2016-07-23 12:41:36 UTC, end at Sat 2016-07-23 12:44:19 UTC. --
Jul 23 12:43:06 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:06 anudemon-master-00 kube-apiserver[1964]: I0723 12:43:06.299966 1964 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:06 anudemon-master-00 kube-apiserver[1964]: F0723 12:43:06.300057 1964 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:16 anudemon-master-00 kube-apiserver[2015]: I0723 12:43:16.428476 2015 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:16 anudemon-master-00 kube-apiserver[2015]: F0723 12:43:16.428534 2015 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:16 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:26 anudemon-master-00 kube-apiserver[2024]: I0723 12:43:26.756551 2024 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:26 anudemon-master-00 kube-apiserver[2024]: F0723 12:43:26.756654 2024 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:36 anudemon-master-00 kube-apiserver[2039]: I0723 12:43:36.872849 2039 server.go:188] Will report 172.16.0.4 as public IP address.
Have you had a look at kuberenetes-anywhere (https://github.com/kubernetes/kubernetes-anywhere)? Much work has been done there and now probably has all the right bits to deploy out your cluster with Azure specific cloud provider integrations.

Resources