Closed endrehegyi closed 3 years ago
That message occurs while Cofoundry is trying run the auto-updater, it locks out the application while it is doing this and if an exception occurs it will wait for a moment and re-try, hoping that the error has been resolved (e.g. intermittent db failure).
I would suspect that if you have just set this up that there is an issue connecting to the database e.g. connection string or firewall/permissions.
If you need to see the error and the site isn't yet public you can enable the developer exception page by setting the Cofoundry:Debug:DeveloperExceptionPageMode
setting to On
, see Debug Setting. Or if you enable .NET logging to the filesystem you can inspect the error there.
It's really weird because im running an identical copy of the application with the same db config string etc, nothing changed. The only thing changed is where the client application is ran from.
I'm guessing it must be a digital ocean droplet (their VPS) firewall blocking something. I'll have a look later on. Any idea which port it may be blocking?
The default port for SQLServer is 1433, but it can be changed.
Do you mean that you have your db on one host and your app server on another?
Yes I have my db on the old original host (I haven't moved it) and then my app server on Digital Ocean.
If you use the same "old" connection string on the new website then it is very likely that either 1) the database host name is unknown on the Internet and thus unreachable from the new webserver, or 2) the database is blocked by a firewall to protect it from outside access.
Have you tried to connect to the database from your own development machine? Does that work? If so, then maybe there is an outgoing firewall rule on the new webserver (which would be a bit odd)?
It connects and works with well if ran from a dev machine. So the host should be accessible, I can also connect to just the db from my local dev machine np. On the app server I have 'Ngnx Full' on my firewall which allows HTTP and HTTPS only (:80,:443) ports.
EDIT: I have added port 1433 to the firewall on the server but same issue, - stuck on message.
Have you checked the error yet to verify that the issue is with the database connection?
Yes checked it with the added Cofoundry DeveloperExceptionPage setting On but still it's the same, no extra information.
There's a few things you can try.
Cofoundry:AutoUpdate:Disabled
, set it to true
.select * from Cofoundry.DistributedLock where DistributedLockId = 'COFUPD'
- if the date is recent it means the application is connecting to the database and is able to create a lock. If this is the case then something else is the problem. You can check the ModuleUpdateError table to see if there is an error running the installation for a particular module: select * from Cofoundry.ModuleUpdateError
- I doubt this is the case though, because you say that nothing has changed in the installation.I've tried all and this is what I got:
I think the request to the db from the server is blocked somehow on DigitalOcean, or MSSQL connections don't work on Ubuntu 20.04 on DigitalOcean,
It's been a while since Cofoundry ran on .NET Core 2.1, which version of Cofoundry are you running?
Closing - inactive.
Hi,
I have been successfully running a .net core 2.1 app on a shared hosting platform (smarterasp), with a db on that same platform.
I've now tried to migrate to DigitalOcean VPS where I have other sites running well (no cofoundry).
After setting up routing etc.. I run the application and it just stays on "the application is being updated. please try again shortly"
I'm really stuck as to why this is happening?
It's connected to the same database. It works fine if I run it locally.