microsoft / oxa-tools

Open edX on Azure Tools
MIT License
36 stars 103 forks source link

On 23-05-2019, Deployment was failed with "Execution of edX MySQL migrations failed" message #456

Open egonid opened 5 years ago

egonid commented 5 years ago

Hello

Until a few days ago (15-05-2019) , we successfully deployed some sites. On today, we failed to deploy a site with oxa-template. Are there any updates and changes on oxa-tools or edx module?

"OXA Bootstrap - ajou - EdX Database (Mysql) Setup Failed"

We attach the bootstrap.log file. Can anyone help us?

bootstrap.log

Thanks in advance.

dwisulfahnur commented 5 years ago

Hello @egonid ,

have you solved this issue? I also found this problem.

Thanks,

egonid commented 5 years ago

Hello @dwisulfahnur

No, I didn't solve this issue yet. I doubt that there wre some changes in edx related module or somthing eles module. So, I think that oxa-tools must be update for that.

Thanks.

wladinho31 commented 5 years ago

Hello @egonid,

I assume that your failed step is after installing OXA module, because I have issue with 'installoxa', and didn't see this issue until now. If I'm in right, how to manage to solve 'installoxa' step?

Regards,

prabhanshu commented 5 years ago

Hello @egonid, May I know which branch of oxa-tools you were using?

Thanks Prabhanshu

egonid commented 5 years ago

Hello Prabhanshu

We were using the oxa/master.fic version..

Thank you.

egonid commented 5 years ago

Hello @Wladinho

Did you solve your problem which related “installoxa” steps?

In my experiences, that issue maybe comes from Azure CLI or AzureRM Version. If Azure CLI version is over 2.0.55 (Current version on 2.0.64), it may occurs some problems.

So, I was resolved it below steps.

First, reference below links http://techgenix.com/powershell-errors-term-not-recognized/ https://www.powershellgallery.com/packages/AzureRM/5.0.1 Steps.

  1. Remove all AzureRm module in your pc 1-1.Check current module (I had run in Windows PowerShell ISE) get-module azurerm -listavailable | select-object -property name,version,path

1-2. If your get some result like below. AzureRM 5.0.1 C:\Program Files\WindowsPowerShell\Modules\AzureRM\5.0.1\AzureRM.psd1 AzureRM 6.0.0 C:\Program Files\WindowsPowerShell\Modules\AzureRM\6.0.0\AzureRM.psd1 ….

1-3. remove those versions this cmdlet like below Uninstall-Module -name AzureRM -RequiredVersion 5.0.1 Uninstall-Module -name AzureRM -RequiredVersion 6.0.0 1-4. Check that there is no installed Azure PowerShell (After above jobs) get-module azurerm -listavailable | select-object -property name,version,path -> no result 1-5. close Windows powershell ISE

  1. Cleaning the previous version of AzurRM install. 2-1.In file explorer, navigate to the below path. C:\Program Files\WindowsPowerShell\Modules 2-2. if existed, delete all related AzureRM folders. ex) AzureRM, AzureRM.Storage, AzureRM.Backup etc.
  2. Reinstall AzureRM Module 3-1. Reopen Window Powersell ISE. 3-2. Run below cmdlet. (reference https://www.powershellgallery.com/packages/AzureRM/5.0.1) Save-Module -Name AzureRM -Path "C:\Program Files\WindowsPowerShell\Modules" -RequiredVersion 5.0.1 3-3. After 3-2 , you can see some folder are created in that path.
  3. Check the Azure Powershell. 4-1. Reopen Windows Powershell ISE. 4-2. run get-module azurerm -listavailable | select-object -property name,version,path -> It must show 1 result. run Get-Module -> In my case, the result like below.

image

  1. Run oxa-deploy script via powershell ISE I hope this may help you. Thank you.
wladinho31 commented 5 years ago

Hi @egonid,

Unfortunately, I getting same error constantly. Deploy fails at installing OXA, but there no any useful logs.

I have followed your steps, without degrading Azure CLI version, because couldn't find older installation then latest.

I'm running out of ideas.

Thanks,

wladinho31 commented 5 years ago

Hi @egonid,

I have tried with Azure CLI 2.0.31, but again same error on same step. 1 minute after configuring jumpbox machine is started. I have check all logs, but without success.

Thank you for your support and ideas, but I'm stuck with this totally.

Regards,

wladinho31 commented 5 years ago

Hello

Until a few days ago (15-05-2019) , we successfully deployed some sites. On today, we failed to deploy a site with oxa-template. Are there any updates and changes on oxa-tools or edx module?

"OXA Bootstrap - ajou - EdX Database (Mysql) Setup Failed"

We attach the bootstrap.log file. Can anyone help us?

bootstrap.log

Thanks in advance.

Hi @egonid,

I had same issue today, because I finally managed to install edX yesterday. I have tried to change JumpBox instance size to B1ms and I got same issue. I have re-deploy with instance site B2s for JumpBox VM and everything was fine.

Regards,

RepoCloudSwyft commented 5 years ago

Hi

We are trying to deploy oxa/master.fic same error as you get "OXA Bootstrap - mytsting - EdX Database (Mysql) Setup Failed"

PS C:\Windows\system32> get-module

ModuleType Version Name ExportedCommands


Script 5.8.2 AzureRM.profile {Add-AzureRmEnvironment, Clear-AzureRmContext, Clear-AzureRmDefault, Connect-AzureRmAccount...} Script 6.7.3 AzureRM.Resources {Add-AzureRmADGroupMember, Export-AzureRmResourceGroup, Get-AzureRmADAppCredential, Get-AzureRmADApplication...} Script 0.0 Common Script 0.0 Common Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...} Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...} Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PSReadlineKeyHandler, Set-PSReadlineKeyHandler...}

Error said failed sync from Git Repo cd /oxa/oxa-tools/scripts/..

Is there new oxa folder added on microsoft?

Hope you can help us. Really need to deploy this. thanks

microdevil commented 5 years ago

Hi @RepoCloudSwyft

Can you use my repository :

  1. https://github.com/ontoio/edx-configuration/tree/oxa/master.fic
  2. https://github.com/ontoio/edx-platform/tree/oxa/master.fic

I have deployed successfully by using powershell in my mac book. There is 3 main issue should be solved

  1. Because I am using PowerShell in my mac, I have to change PowerShell script to support new azure module
  2. If there is a problem in MySQL, the problem comes from pymongo. Mongo server that has been used for the stamp is mongo version 3+, so you have to update pymongo to version 3+
  3. There is a problem in incommon, to fix this issue, we have to remove it from configuration. You can see here (https://github.com/edx/configuration/pull/5203/commits/cf991cb046532ab1ec7f96b4a9577d8ac0938130)

You can contact me to solve your problem. I have tested it more than three times in Azure.

Thanks.

prabhanshu commented 5 years ago

Currently oxa-tools support only ficus version, so unless the version you are installing is newer than ficus you don't need to update python libraries such as pymongo version.

microdevil commented 5 years ago

Hi @prabhanshu

Yes, oxa-tools support only ficus version. If you check ficus version from microsoft, pymongo version is 2.9 that not support for existing mongo server. You can check this code in oxa-tools

`install_mongodb() { log "Downloading MongoDB package $PACKAGE_NAME from $PACKAGE_URL"

# Configure mongodb.list file with the correct location
if (( $(echo "$OS_VER > 16" | bc -l) ))
then
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
    echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
else
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
fi

# Install updates
apt-get -y -qq update

# Remove any previously created configuration file to avoid a prompt
if [ -f /etc/mongod.conf ]; then
    rm /etc/mongod.conf
fi

#Install Mongo DB
log "Installing MongoDB package $PACKAGE_NAME"
apt-get -y -qq install $PACKAGE_NAME

# Stop Mongod as it may be auto-started during the above step (which is not desirable)
stop_mongodb

}`

Thanks

prabhanshu commented 5 years ago

@egonid The setup failed while trying to install python requirements. Regarding the "MySQL migration" message you got is because of the way bootstrap.sh is written. If any step which failed during ansible you will receive this error.

Reference https://github.com/Microsoft/oxa-tools/blob/afce9503906daf704a162acbc452027d31fa3a2c/scripts/bootstrap.sh#L407

Coming to your python requirement issues: Did you make any changes to requirements.txt files i.e. adding new packages or making changes to the versions?

RepoCloudSwyft commented 4 years ago

Hi @microdevil, Thank you for the repo.

However, upon checking on our deployment they didn't create a oxa and edx folder, Can anyone know how to fix it? May be that's why we can't get email notif. Thanks

microdevil commented 4 years ago

Hi @RepoCloudSwyft

Have you install open edx using oxa stamp ?

RepoCloudSwyft commented 4 years ago

hi @microdevil

Yes, we still using the oxa stamp, until now same issue all resources successfully deployed,however upon checking the jump box there is no edx and oxa folder. Please help how to fix it.

Thank you.

microdevil commented 4 years ago

Hi @RepoCloudSwyft

In oxa, you will have 3 server. First, server called jumbox. Second, server for CMS. Third, server for LMS. If you need to check the existence of edx platform, you have to ssh to cms server using jumbox).

RepoCloudSwyft commented 4 years ago

Hi @microdevil,

Yes we understand that the OXA will create 3 server. We successfully created the jumpbox,lms and cms.

We are able to login on the ssh thru vmss, upon checking there are missing folder which is oxa and edx. Please see screen shot.

missing folder

Can you help on fixing it?

microdevil commented 4 years ago

Hi @RepoCloudSwyft

Sorry, i could not fix your issue. I suggest to reinstall your platform and ensure that you get 5 email from oxa while process installation.

Thanks