Problem installing RStudio onto a GCP cluster - google-cloud-platform

I'm trying to follow this tutorial but keep getting an error when I try to install RStudio on the main cluster. (see section Installing RStudio Server..., item 3).
When I run the line
$ sudo gdebi rstudio-server-1.2.1335-amd64.deb
The installation starts but then fails with
Jun 03 03:10:16 cluster-c141-m systemd[1]: Starting RStudio Server...
Jun 03 03:10:16 cluster-c141-m rserver[20313]: /usr/lib/rstudio-server/bin/rserver: error while loading shar…ectory
Jun 03 03:10:16 cluster-c141-m systemd[1]: rstudio-server.service: Control process exited, code=exited status=127
Jun 03 03:10:16 cluster-c141-m systemd[1]: Failed to start RStudio Server.
Jun 03 03:10:16 cluster-c141-m systemd[1]: rstudio-server.service: Unit entered failed state.
Jun 03 03:10:16 cluster-c141-m systemd[1]: rstudio-server.service: Failed with result 'exit-code'.
Thanks for any suggestions.

You are installing the rstudio-server for Debian 8. Install the Debian 9 version.

The tutorial could use an update.
There is an initialization action to take care of installation of rstudio (in case you want to create another cluster later): https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/tree/master/rstudio

Related

Tomcat Server Loaded errir

I tried to install and start the Tomcat on my AWS EC2 instance.
However, I failed to run tomcat server after installed it.
I followed the following article for that
https://blog.devops4me.com/aws-tutorial-how-to-install-tomcat-in-aws-ec2-install/
And after finished step 6, and reloaded tomcat server, I tried to restart tomcat service like step 7. However, my terminal showed as below:
Feb 14 20:17:07 ip-172-31-54-104.ec2.internal systemd[1]: tomcat.service: control process exited, code=exited status=203
Feb 14 20:17:07 ip-172-31-54-104.ec2.internal systemd[1]: Failed to start Tomcat Server.
Feb 14 20:17:07 ip-172-31-54-104.ec2.internal systemd[1]: Unit tomcat.service entered failed state.
Feb 14 20:17:07 ip-172-31-54-104.ec2.internal systemd[1]: tomcat.service failed.
Feb 14 20:17:10 ip-172-31-54-104.ec2.internal systemd[1]: [/etc/systemd/system/tomcat.service:22] Missing '='.
Feb 14 20:17:22 ip-172-31-54-104.ec2.internal systemd[1]: tomcat.service holdoff time over, scheduling restart.
Feb 14 20:17:22 ip-172-31-54-104.ec2.internal systemd[1]: tomcat.service failed to schedule restart job: Unit is not loaded properly: Bad message.
Feb 14 20:17:22 ip-172-31-54-104.ec2.internal systemd[1]: Unit tomcat.service entered failed state.
Feb 14 20:17:22 ip-172-31-54-104.ec2.internal systemd[1]: tomcat.service failed.
I don't really understand how this work, and tried to search error on internet, but still doesn't have any clue of how to solve this problem, if anyone can give me a hint, that would be great, thank you!

how to get Jenkins to be assessable from aws ec2 instance

so this is the problem I have installed open jdk 8 for jenkins. jenkins is insalled and running given
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Thu 2021-10-21 19:22:55 UTC; 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 437 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCCESS)
Oct 21 19:22:52 ip-172-31-30-187 systemd[1]: Starting LSB: Start Jenkins at boot time...
Oct 21 19:22:53 ip-172-31-30-187 jenkins[437]: Correct java version found
Oct 21 19:22:53 ip-172-31-30-187 jenkins[437]: * Starting Jenkins Automation Server jenkins
Oct 21 19:22:54 ip-172-31-30-187 su[619]: (to jenkins) root on none
Oct 21 19:22:54 ip-172-31-30-187 su[619]: pam_unix(su-l:session): session opened for user jenkins by (u>
Oct 21 19:22:54 ip-172-31-30-187 su[619]: pam_unix(su-l:session): session closed for user jenkins
Oct 21 19:22:55 ip-172-31-30-187 jenkins[437]: ...done.
Oct 21 19:22:55 ip-172-31-30-187 systemd[1]: Started LSB: Start Jenkins at boot time.
however, using serverip:8080 brings up nothing
used this tutorial https://www.youtube.com/watch?v=B6K1IF-489M&t=36s
port 8080 is also added to security group
this problem was not solved but making a fresh ec2 instance and installing Jenkins by following that tutorial did the trick

Failed to start Zabbix Agent for every 10 seconds

I am using centos 7.
How did I check the log.
journalctl -xe
What I got from the log.(I saw the same log every 10 seconds.)
Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service holdoff time over, scheduling restart.
Oct 02 10:19:51 lp01.localdomain systemd[1]: Starting Zabbix Agent...
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has begun starting up.
Oct 02 10:19:51 lp01.localdomain zabbix_agentd[8985]: zabbix_agentd [8987]: cannot open "/var/log/zabbix/zabbix_agentd.log": [13] Permission denied
Oct 02 10:19:51 lp01.localdomain systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start.
Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
Oct 02 10:19:51 lp01.localdomain systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has failed.
--
-- The result is failed.
Oct 02 10:19:51 lp01.localdomain systemd[1]: Unit zabbix-agent.service entered failed state.
Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service failed.
So I checked "/var/log/zabbix/zabbix_agentd.log" file first.
ll /var/log/zabbix/zabbix_agentd.log
But it said No such file or directory.
ls: cannot access /var/log/zabbix/zabbix_agentd.log: No such file or directory
and then I checked "/run/zabbix/zabbix_agentd.pid" file.
ll /run/zabbix/zabbix_agentd.pid
It also said No such file or directory.
ls: cannot access /run/zabbix/zabbix_agentd.pid: No such file or directory
You have new mail in /var/spool/mail/root
I checked if Selinux is running.
getenforce
and it said Selinux is Disabled..
My questions are
How can I start zabbix?
If I can't start zabbix, can I stop zabbix from starting-failing every 10 seconds?
Thank you.
add permission to the directory - /var/log/zabbix/ & /var/log/zabbix-agent/
chmod 707 /var/log/zabbix/
chmod 707 /var/log/zabbix-agent/
or
change owner of the directory?
chown zabbix:zabbix /var/log/zabbix/
chown zabbix:zabbix /var/log/zabbix-agent/
And then, would stop service zabbix?
systemctl stop zabbix-agent

docker-machine create with digitalocean driver: ssh command error

I´m using docker tools on windows.
create command was working perfectly last week and I managed to create a number of machines on Digital Ocean. Then I tried today with no success. I repeated the same command with different regions and I always get the same result:
λ docker-machine create -d digitalocean --digitalocean-access-token=MYTOKEN --digitalocean-region=ams2 vmname
Running pre-create checks...
Creating machine...
(fernu) Creating SSH key...
(fernu) Creating Digital Ocean droplet...
(fernu) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: ssh command error:
command : sudo systemctl -f start docker
err : exit status 1
output : Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
If I execute the suggested command:
root#fernu:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─10-machine.conf
Active: inactive (dead) (Result: exit-code) since Fri 2017-06-30 20:56:13 UTC; 8min ago
Docs: https://docs.docker.com
Process: 4943 ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=digitalocean (code=exited, status=1/FAILURE)
Main PID: 4943 (code=exited, status=1/FAILURE)
Jun 30 20:56:13 fernu systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 30 20:56:13 fernu systemd[1]: Failed to start Docker Application Container Engine.
Jun 30 20:56:13 fernu systemd[1]: docker.service: Unit entered failed state.
Jun 30 20:56:13 fernu systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 30 20:56:13 fernu systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jun 30 20:56:13 fernu systemd[1]: Stopped Docker Application Container Engine.
Jun 30 20:56:13 fernu systemd[1]: docker.service: Start request repeated too quickly.
Jun 30 20:56:13 fernu systemd[1]: Failed to start Docker Application Container Engine.
Any help would be appreciated
Update
It´s working with ubuntu 14:
--digitalocean-image=ubuntu-14-04-x64 so it seams like a problem with the default image (ubuntu-16-04-x64)
This seems to be hitting a lot of people. TL;DR: There is a bug in docker-machine v0.12.0 and this issue can be resolved by upgrading.
Logging in to the DigitalOcean instance and running journalctl -xe provides more information:
-- Unit docker.service has begun starting up.
Jul 07 20:03:52 docker-sandbox docker[4930]: `docker daemon` is not supported on Linux. Please run `do
Jul 07 20:03:52 docker-sandbox systemd[1]: docker.service: Main process exited, code=exited, status=1/
Jul 07 20:03:52 docker-sandbox systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
The key here is docker daemon is not supported on Linux. A bug in docker-machine's version comparison code caused an incorrect systemd unit file to be produced (located at /etc/systemd/system/docker.service.d/10-machine.conf) on certain versions of Ubuntu.
A fix has been committed and a new release (v0.12.1) was made.
You can grab the latest release at: https://github.com/docker/machine/releases/tag/v0.12.1

Django / Apache / mod_wsgi - WEB Application Hangs - Fails to Launch

My Django WEB Application fails to launch all of a sudden and out of the blues.
It was working fine until yesterday in production.
I am not able to figure out where the problem is. It could apache or mod_wsgi or windows but at the moment I have no clue.
I have tried to reinstall all the python libraries/prerequisites etc. but the problem persists nevertheless.
I am serving the WEBApp at Apache Port 8999 and When I access the WEB App, the browser fails to show any error. It just keeps trying to open the page and in the status bar I just see the Waiting for message.
If I see the netstat results then I see the following
C:\Documents and Settings\admintemp>netstat -an | find "8999" TCP
0.0.0.0:8999 0.0.0.0:0 LISTENING TCP 172.18.148.156:8999 10.107.226.88:1826 ESTABLISHED
This connection remains established forever and nothing happens. Internet Browser just seems to try to keep opening the Web App and it appears as if it is waiting forever.
The only thing i see in Apache logs is this
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Fri Jun 21 18:34:32 2013] [notice] Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Fri Jun 21 18:34:32 2013] [notice] Server built: Jan 28 2012 11:16:39
[Fri Jun 21 18:34:32 2013] [notice] Parent: Created child process 3876
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Child process is running
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Acquired the start mutex.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Starting 64 worker threads.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Starting thread to listen on port 8999.
[Fri Jun 21 18:34:43 2013] [error] C:/Program Files/App_Logic/logic_apps/logic_apps\\..\\logic_apps
I also noticed in the Windows Event Viewer logs (Application Logs) the following message but I am not sure how (and if) this could be related to my problem at hand. This message seems to shows up once for everytime i access the Web App.
Application popup: Microsoft Visual C++ Runtime Library : Runtime
Error!
Program: C:\Progr...
R6034 An application has made an attempt to load the C runtime library
incorrectly. Please contact the application's support team for more
information.
Exact screenshot of above error message is at http://imgur.com/hijiKv8
Please note that as part of my analysis I have tried
Accesing the apache page at http://127.0.0.1:8999 does show me the It Works ! message
Running the WEB App using the Django Development server and it launches fine.
Changing the wsgi.py file and when I introduce errors in the file deliberately, accessing the web app does complain with the relevant.
The application is installed on Windows Server 2003 SP1 and there are no automatic updates schedules on this machine so I am not suspecting that a update would have caused this problem. I also saw the Windows Update log and there was nothing installed recently.
The application is based on following Python Libraries as prerequisites
httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
python-2.7.3
Django-1.4.3
psycopg2-2.4.6.win32-py2.7-pg9.2.2-release
cx_Oracle-5.1.2-10g.win32-py2.7
PIL-1.1.7.win32-py2.7
python-ldap-2.4.10.win32-py2.7
south-0.7.6
xlrd-0.9.0
xlwt-0.7.5
mod_wsgi.so
I have tried with the WSGIApplicationGroup %{GLOBAL} directive and setting the log level to debug and info but the resulting logs don't give any additional information.
I have posted apache debug level log at http://dpaste.com/1268653/
I have posted apache info level log at http://dpaste.com/1268660/
Both these logs were taken after a fresh restart of apache and then the application hanging and until I stopped apache and copied the logs.
I also tried running the Hello World Application as documented at https://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines and it worked fine.
I still remain clueless. Appreciate if you could guide me what else I could do to get more details of the issue.
Appreciate if someone could guide me with respect to what more I can do to solve this problem or get more information to get to the root of this.
I was able to solve this issue in the end.
The post at Runtime error R6034 in embedded Python application led me to a solution.
Thanks to Graham Dumpleton and others who were helping me offline to get this issue solved.
It was rather cheeky in the end, a conflicting version of msvcr90.dll
I removed the IBM Bit from the path and it works fine now.