Closed Romes8 closed 7 months ago
Can someone try to start it and direct Std output to a text file? Ie ./Minitwit > log txt ?
I can't remember what the app is called on the server but something to that effect...
I'm not on my laptop for another few hours, so if someone else is able to try that would be great.
I tested by creating two droplets, and as soon as I close the console they run in, the app can no longer be accessed.
I think if we add "&" after the run command that should start the app as a new process (different from the process running from ssh connection). Will try this
cool, let us know how it goes
Oh Yeah if it is running straight in the ssh that's a problem. Are you sure we want ampersand and not nohup?
cool, let us know how it goes
I am not completely sure how to reproduce this issue as I don't know the steps that you took.
Oh Yeah if it is running straight in the ssh that's a problem. Are you sure we want ampersand and not nohup?
Yeah that is propably better. (reference)
I am working from branch dploy. I set my secrets in GitHub (docker_username, docker_password, do_token, ssh_key_name). Upon push to the branch, the action will create 2 new droplets with terraform. Then you need to manually install go and clone the repo and run the go files. You do this inside the droplet consoles, and they send you a password on email to access the console of each droplet.
Try to reproduce the steps, or I can demonstrate what happens if you got time for a call today. I don't think our server is persistent.... Not from what I have tested. The consoles were running last night, and when I woke up today, the apps are down again. I had to run the go files once again inside of the consoles for the app to be accessible.
In addition, the API failed this morning with the following error : "all authentication methods failed", despite being up and running yesterday. So I have decided to run two new droplets now...
For the API console, after cloning the repo, switch to branch dploy to run the minitwit-api.go. I fixed an error in the format of a go version in a mod file (error currently in main). If you don't switch the branch, it will not run the file.
Thanks for the tips, I tried running these commands on the consoles and it worked:
nohup go run minitwit.go & nohup go run minitwit-api.go &
I expect this to solve the issue with foreground jobs/ non persistent server.
The API always shows 404 page not found, because we have no UI.
When I come back from a meeting, I'll spin up our team droplets and make them a background job. Hopefully will solve the issue
the background jobs are working, and I can now close the console and app are still accessible. Hoever, main app does not load correct - not sure why?
@Hopeberg would it be possible to merge your dploy
branch into CI/CD-Pipeline
so we are know where are the related changes to this issue.
the background jobs are working, and I can now close the console and app are still accessible. Hoever, main app does not load correct - not sure why?
Images are visible for me on the sire. Can somebody check and see how it is for them ? @everyone
Issue is fixed with commands for background jobs making the apps persistent
When we deploy app into droplet after some amount of time if crashes.
I think its because the simulation is making requests. At some point there is an error which I guess makes the app fail.