Remote go-agent doesn't connect to go-server - go-cd

Go-agent and go-server same version - v18.8.0. Server and agent are installed in different machines. In go-server/agents , the agent is not listed. The agent configuration file in /etc/default/go-agent is updated with hostname of go server.
Please help.

As mentioned in my question - the /etc/default/go-agent file is updated with the remote go-server url. After making this change, restarting the agent did not solve the problem. So, I went to restart the entire machine and now the remote go-agent gets listed in the go-server/agents.
Anytime the server (go-server) goes down, it should be ensured that every machine/runtime running go-agent is restarted.
FYI - This is with go-version#18.8.0 and go-agent#18.8.0

Related

Run "git pull" for a Django project running on Windows Server 2016 IIS

My current set up has a Django project running on Windows 2016 IIS.
The project is hosted on GitHub for collaboration and I would like to set up a GitHub webhook so whenever there's a push to master branch from any of the collaborators, the IIS Server will run a "git pull" to update the project on the server.
What is normally the setup for this?
What I have tried so far is to create an endpoint in the Django project, this endpoint whenever called will run Python subprocess to run "git pull" command in the project itself. However, whenever I run it, it get a 500 response from IIS.
Thanks #VonC for helping.
I have looked to the log (which was the one in XML) but it wasn't much help.
What I'm posting here was my workaround, not exactly to the answer for the question above.
I used django-background-tasks to add the command subprocess.run(['git', 'pull']) as a task to run later (after a few seconds after that by the #background decorator).
Error 500 means the IIS server throws an error.
You need to check said IIS server logs in order to check at what point in the execution of the webhook endpoint script the error occurs.

Google Cloud virtual instance: Chrome remote desktop indicates remote computer is offline, however Google Cloud Platform shows instance is running

I am running a virtual machine in Google Cloud. I have installed the default Debian OS, and configured the desktop environment for remote connection, as explained here: https://cloud.google.com/solutions/chrome-desktop-remote-on-compute-engine
I have been able to connect to the instance via Chrome Remote Desktop, however periodically I have the problem that the Remote Desktop says the vm instance is online, however if I try to connect to it I get:
Looking at the Google Cloud console, the instance is clearly running. Normally if I restart the instance the problem is solved, however I have processes running on the instance that I do not want to stop.
UPDATE:
Following the advice from Serhii Rohoza I ran
sudo systemctl status chrome-remote-desktop
The status looked normal, listing:
Active: active (exited) since...
I then ran
sudo systemctl restart chrome-remote-desktop
and this solved the problem, I could log into remote desktop again, but it seemed the VM instance had restarted, which is a big problem since I am running processes on it that should not shut down. I guess this is a problem to send to Google Cloud Services support.
UPDATE 2:
I'm still running into this problem. I normally have a Jupyter Notebook running on the VM - this Notebook must keep running. When I saw the message saying that the remote computer is offline, I logged in via ssh and checked if the Jupyter Notebook is running:
jupyter notebook list
This returned:
http://localhost:8888/?token=9110bf40789971b5e252a272e9497039b4f3b45e506348df :: /home/qgenixtech
So the Notebook was running. I then ran:
sudo systemctl restart chrome-remote-desktop
and after that again:
jupyter notebook list
and then it shows no Notebooks running. So the restart command closed down the Notebook (and also all other open windows on the desktop).
UPDATE 3:
I spoke to a support technician at Google. The problem is on the Remote Desktop side, not the virtual machine. According to the technician this is a known problem, by he didn't have a solution for it. He referred me to these two links from Google Support:
https://support.google.com/chrome/thread/10213547?hl=en
https://support.google.com/chrome/thread/3333421?hl=en
The next option for me is to look at something like X2go
To solve your issue you should follow documentation Troubleshooting and check status of the Chrome Remote Desktop service with command:
sudo systemctl status chrome-remote-desktop
and check log messages at /tmp/chrome_remote_desktop_DATE_TIME_*.
To investigate why your VM instance was restarted you should look for some clues at the logs:
Go to Compute Engine -> VM instances -> click on NAME_OF_YOUR_VM -> find section Logs -> click on Stackdriver Logging. More information you can find in the documentation Viewing logs (Classic)
Go to Compute Engine -> VM instances -> click on NAME_OF_YOUR_VM -> find section Logs -> click on Serial port 1 (console). More information in the documentation Viewing Serial Port Output
You can contact with Google Cloud Support as well.
In addition, have a look at the documentation Setting instance availability policies.
same issue. when checking logs i see:
2021-01-05 14:29:38,319:INFO:Starting Xvfb on display :20
xdpyinfo: unable to open display ":20".
2021-01-05 14:29:40,837:INFO:X server is active.
restarting service or even VM doesn't work.
i need to delete connection on "client" and re-auth with /headless link

PostgreSQL psql: could not connect to server: Connection refused

I am making my first Django app and am trying to deploy to Heroku. I am using a postgres database. My app works fine when I run it on localhost. I pushed my project to Heroku and when I attempt to go to the site I get the following error:
"psql: could not connect to server: Connection refused Is the server running on host
host.domain.com and accepting TCP/IP connections on port 5432?"
So I have been searching endlessly to the solution for this problem, and of the few I have found, NONE can explain clearly the steps involved in changing the postgres settings from localhost. Apparently I am supposed to change a setting in a postgres config file that I cannot find any trace of on my computer, and I can't find command line instructions either. Even the postgres docs don't help.
Can anyone help me to solve this?
Since you pushed your project to Heroku, changing files for your local Postgres installation is irrelevant to the problem.
The question is: Does the remote Postgres installation on Heroku allow remote access? And if yes, what are the exact credentials? For starters, I doubt you can use the standard port 5432. And you may need sslmode=require.
Consult Heroku for the actual credentials. This site may help:
https://devcenter.heroku.com/articles/heroku-postgresql#external-connections-ingress

deploy bitnami django

I am quite computer-illiterate, but I have managed to utilize the Django framework on my own machine. I have had an account on Amazon Web Service (AWS) for some time, but it appeared rather complex to set-up and to make use of, so I put it of for a while. Then I decided to give it a try, and it was not so hard as I first thought to load a AMI and connect to the server with PuTTY. But since I were already using BitNami's Django-Stack, I decided to take a look at their hosting offer (which builds on AWS). Since they appeared to offer "one-click deployment", I set up a new server through their interface. But then, it seems like the "one-click deployment"-promise is with regard to the server itself. There does not seem to be any interface for deploying Django projects through their site. Having used PuTTY already, and adding WinSCP to my machine, I can acceess the server and load my Django-code unto the server. But then I am lost. The documentation seems a bit thin (look here).
The crux of this is the following: Can anyone make this part of the process more understandable. I.e., how to deploy a Django project on a Linux server with Apache/mod_WSGI?
The other question is: I want to use Postgres. Am I free to install this on the server. Should I opt for EBM (EMB?) for this, or what is the downside of not having EBM?
I hope I am not too unworthy of your attention, thanks!
how to deploy a Django project on a Linux server with Apache/mod_WSGI The Bitnami AMI already comes with all this configured. Once installed try going to the EC2 public url on the default 8000 port and you will see the demo django project setup there. You can add your own project once you have logged into the machine via putty check the /home/bitnami/ directory for the demo project. Copy your project, configure your database The other question is: I want to use Postgres. Am I free to install this on the server Postgres and Mysql are already installed the same way you would do on your local machine. The in your project do ./manage.py runserver 0.0.0.0:9000 since the 8000 port is already running another application.

Coldfusion JRUN 4 Server - how to stop it

I got halfway through installing a security patch for CF801 ent (http://kb2.adobe.com/cps/890/cpsid_89094.html) on a windows 2k8 server + iis.
I made a backup copy of the WEB-INF directory as instructed. Then I tried to merge the new WEB-INF provided by Adobe. It hung up on one particular file (C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\lib\cfmx_bootstrap.jar), with the error:
Cannot delete output file (above file).
So, I tried renaming the file and got the error:
The action can't be completed because the file is open in jrun.exe.
I have stopped the server via JRUN launcher, so where could the file still be open. I tried rebooting the server in case there was something still running in the background. Error persists.
I'm new to enterprise multiserver installs, so I may be missing something basic.
Resolved: Stopping the server instance via JRUN Launcher doesn't shut the coldfusion server. I needed to stop it in services, which I tried originally, but I wasn't used to the way CF with JRUN was appearing in the services (It appears as "Macromedia JRUN CFusion Server", whereas I had been looking for services beginning with "ColdFusion" or "Adobe"). Once I found the service and stopped it, I was able to overwrite the file.
Offhand, I would try setting all the ColdFusion services to start manually instead of automatically, and reboot. Install the security pack, set the services back to start automatically, and reboot again.
HTH.