DoliCloud/SellYourSaas

http code 562

erwinpalma opened this issue · 5 comments

Describe the bug

I have followed the steps, verified the connection between the admin and deploy server.

I get the following error:

action_deploy_undeploy.sh for action undeployall on jorge a1.MYSITE.com.mx return 12, so remote agent returns http code 562

To Reproduce

Difficult to reproduce step by step

Screenshots
image

Additional context

There is a wy to see the logs of depoy_undeploy.sh?

After to take a look into the logs into the deploy server I saw the following error Failed to find archive directory - and I notice that the variabe targetdir = - is empty,

I read the documentation again and I did not found where set up this variable, could you help me?

Click to expand the logs
2023-08-29 06:55:50 >>>>>>>>>>>>>>>>>>>> Call for action deployall by 192.168.1.2 URI=/deployall?osuutwacaot          3%26YVj2WQdn3k%26jorge2%26a1.demo.com.mx%26dbnMmw34i4E%263306%26dbuU6r74DNP5%269Uo6O5PbY3%26%2Fhome%2Fadmi          n%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas%2Ftemp%2Fconf.php.jorge2.a1.demo.com.mx.tmp%26%2Fosuutwaca          ot3%2FdbnMmw34i4E%2Fhtdocs%2Fconf%2Fconf.php%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas          %2Fpackages%2Fdolibarr-17.0.1-NOCFDI%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas%2Fgit%2          Fdolibarr.17.0.1%2Fhtdocs%26%2Fosuutwacaot3%2FdbnMmw34i4E%2Fhtdocs%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_do          cuments%2Fsellyoursaas%2Fgit%2Fdolibarr.17.0.1%2Fhtdocs%2Finstall%2Fdoctemplates%26%2Fosuutwacaot3%2FdbnMmw3          4i4E%2Fdocuments%2Fdoctemplates%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas%2Fgit%2Fdoli          barr.17.0.1%2Fscripts%26%2Fosuutwacaot3%2FdbnMmw34i4E%2Fscripts%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_docum          ents%2Fsellyoursaas%2Ftemp%2Fcron.jorge2.a1.demo.com.mx.tmp%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documen          ts%2Fsellyoursaas%2Ftemp%2Fcliafter.jorge2.a1.demo.com.mx.tmp%26%26supervision%40demo.lat%26192.168.1.3%          26https%3A%2F%2Fmyaccount.com.mx%26%26%26%262%26noreply%40demo.lat%26%26%26On%26apachereload%26%26%260%26%          261%260%26%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas%2Ftemp%2Fautomigration_2.tmp%26%2          6%26%26%26%26%26%2Fhome%2Fadmin%2Fwwwroot%2Fdolibarr_documents%2Fsellyoursaas%2Ftemp%2Fcliafterpaid.jorge2.a          1.demo.com.mx.tmp%26ef8673891ade07ae400a3490b8fe5ebc
2023-08-29 06:55:50 dnsserver=1, instanceserver=1, allowed_hosts=192.168.1.2
2023-08-29 06:55:50 signature=ef8673891ade07ae400a3490b8fe5ebc, recalculatedsignature=ef8673891ade07ae400a34          90b8fe5ebc
2023-08-29 06:55:50 ./action_deploy_undeploy.sh deployall osuutwacaot3 YVj2WQdn3k jorge2 a1.demo.com.mx db          nMmw34i4E 3306 dbuU6r74DNP5 9Uo6O5PbY3 /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/conf.php.jor          ge2.a1.demo.com.mx.tmp /osuutwacaot3/dbnMmw34i4E/htdocs/conf/conf.php /home/admin/wwwroot/dolibarr_documen          ts/sellyoursaas/packages/dolibarr-17.0.1-NOCFDI /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/doli          barr.17.0.1/htdocs /osuutwacaot3/dbnMmw34i4E/htdocs /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/          dolibarr.17.0.1/htdocs/install/doctemplates /osuutwacaot3/dbnMmw34i4E/documents/doctemplates /home/admin/www          root/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/scripts /osuutwacaot3/dbnMmw34i4E/scripts /home/adm          in/wwwroot/dolibarr_documents/sellyoursaas/temp/cron.jorge2.a1.demo.com.mx.tmp /home/admin/wwwroot/dolibar          r_documents/sellyoursaas/temp/cliafter.jorge2.a1.demo.com.mx.tmp - supervision@demo.lat 192.168.1.3 http          s://myaccount.com.mx - - - 2 noreply@demo.lat - - On apachereload - - 0 - 1 0 - /home/admin/wwwroot/doliba          rr_documents/sellyoursaas/temp/automigration_2.tmp - - - - - - /home/admin/wwwroot/dolibarr_documents/sellyo          ursaas/temp/cliafterpaid.jorge2.a1.demo.com.mx.tmp ef8673891ade07ae400a3490b8fe5ebc
2023-08-29 06:55:50 getcwd() = /home/admin/wwwroot/dolibarr_sellyoursaas/scripts
2023-08-29 06:55:50 script file to scan is /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cliafter          .jorge2.a1.demo.com.mx.tmp
2023-08-29 06:55:50 file is not found, we ignore it.
2023-08-29 06:55:50 script file to scan is /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cliafter          paid.jorge2.a1.demo.com.mx.tmp
2023-08-29 06:55:50 file is not found, we ignore it.
2023-08-29 06:55:50 return = 12
2023-08-29 06:55:50

####################################### ./action_deploy_undeploy.sh deployall
./action_deploy_undeploy.sh deployall osuutwacaot3 YVj2WQdn3k jorge2 a1.demo.com.mx dbnMmw34i4E 3306 dbuU6          r74DNP5 9Uo6O5PbY3 /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/conf.php.jorge2.a1.demo.com.mx          .tmp /osuutwacaot3/dbnMmw34i4E/htdocs/conf/conf.php /home/admin/wwwroot/dolibarr_documents/sellyoursaas/pack          ages/dolibarr-17.0.1-NOCFDI /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdocs /          osuutwacaot3/dbnMmw34i4E/htdocs /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdo          cs/install/doctemplates /osuutwacaot3/dbnMmw34i4E/documents/doctemplates /home/admin/wwwroot/dolibarr_docume          nts/sellyoursaas/git/dolibarr.17.0.1/scripts /osuutwacaot3/dbnMmw34i4E/scripts /home/admin/wwwroot/dolibarr_          documents/sellyoursaas/temp/cron.jorge2.a1.demo.com.mx.tmp /home/admin/wwwroot/dolibarr_documents/sellyour          saas/temp/cliafter.jorge2.a1.demo.com.mx.tmp - supervision@demo.lat 192.168.1.3 https://myaccount.com.mx           - - - 2 noreply@demo.lat - - On apachereload - - 0 - 1 0 - /home/admin/wwwroot/dolibarr_documents/sellyou          rsaas/temp/automigration_2.tmp - - - - - - /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cliafter          paid.jorge2.a1.demo.com.mx.tmp ef8673891ade07ae400a3490b8fe5ebc
# user id --------> 0
# now ------------> 2023-08-29 06:55:50
# PID ------------> 110459
# PWD ------------> /home/admin/wwwroot/dolibarr_sellyoursaas/scripts
# arguments ------> deployall osuutwacaot3 YVj2WQdn3k jorge2 a1.demo.com.mx dbnMmw34i4E 3306 dbuU6r74DNP5           9Uo6O5PbY3 /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/conf.php.jorge2.a1.demo.com.mx.tmp /os          uutwacaot3/dbnMmw34i4E/htdocs/conf/conf.php /home/admin/wwwroot/dolibarr_documents/sellyoursaas/packages/dol          ibarr-17.0.1-NOCFDI /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdocs /osuutwac          aot3/dbnMmw34i4E/htdocs /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdocs/insta          ll/doctemplates /osuutwacaot3/dbnMmw34i4E/documents/doctemplates /home/admin/wwwroot/dolibarr_documents/sell          yoursaas/git/dolibarr.17.0.1/scripts /osuutwacaot3/dbnMmw34i4E/scripts /home/admin/wwwroot/dolibarr_document          s/sellyoursaas/temp/cron.jorge2.a1.demo.com.mx.tmp /home/admin/wwwroot/dolibarr_documents/sellyoursaas/tem          p/cliafter.jorge2.a1.demo.com.mx.tmp - supervision@demo.lat 192.168.1.3 https://myaccount.com.mx - - - 2           noreply@demo.lat - - On apachereload - - 0 - 1 0 - /home/admin/wwwroot/dolibarr_documents/sellyoursaas/te          mp/automigration_2.tmp - - - - - - /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cliafterpaid.jor          ge2.a1.demo.com.mx.tmp ef8673891ade07ae400a3490b8fe5ebc
# parent path ----> .
# realname name --> action_deploy_undeploy.sh
# realname dir ---> /home/admin/wwwroot/dolibarr_sellyoursaas/scripts
2023-08-29 06:55:50 input params for ./action_deploy_undeploy.sh:
mode = deployall
osusername = osuutwacaot3
ospassword = XXXXXX
instancename = jorge2
domainname = a1.demo.com.mx
dbname = dbnMmw34i4E
dbport = 3306
dbusername = dbuU6r74DNP5
dbpassword = XXXXXX
fileforconfig1 = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/conf.php.jorge2.a1.demo.com.mx.t          mp
targetfileforconfig1 = /osuutwacaot3/dbnMmw34i4E/htdocs/conf/conf.php
dirwithdumpfile = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/packages/dolibarr-17.0.1-NOCFDI
dirwithsources1 = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdocs
targetdirwithsources1 = /osuutwacaot3/dbnMmw34i4E/htdocs
dirwithsources2 = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/htdocs/install/doc          templates
targetdirwithsources2 = /osuutwacaot3/dbnMmw34i4E/documents/doctemplates
dirwithsources3 = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/git/dolibarr.17.0.1/scripts
targetdirwithsources3 = /osuutwacaot3/dbnMmw34i4E/scripts
cronfile = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cron.jorge2.a1.demo.com.mx.tmp
cliafter = /home/admin/wwwroot/dolibarr_documents/sellyoursaas/temp/cliafter.jorge2.a1.demo.com.mx.tmp
targetdir = -
EMAILTO = supervision@demo.lat
REMOTEIP = 192.168.1.3
SELLYOURSAAS_ACCOUNT_URL = https://myaccount.com.mx
instancenameold = -
domainnameold = -
customurl =
contractlineid = 2
EMAILFROM = noreply@demo.lat
CERTIFFORCUSTOMDOMAIN =
archivedir = -
SSLON = On
apachereload = apachereload
ALLOWOVERRIDE =
VIRTUALHOSTHEAD =
ispaidinstance = 0
SELLYOURSAAS_LOGIN_FOR_SUPPORT = -
directaccess = 1
sshaccesstype = 0
ErrorLog = #ErrorLog
2023-08-29 06:55:50 calculated params:
templatesdir (from /etc/sellyoursaas.conf) =
instancedir (from /etc/sellyoursaas.conf) = -/osuutwacaot3/dbnMmw34i4E
webSSLCertificateCRT = with.sellyoursaas.com.crt
webSSLCertificateKEY = with.sellyoursaas.com.key
webSSLCertificateIntermediate = with.sellyoursaas.com-intermediate.crt
vhostfile = /home/admin/wwwroot/dolibarr_sellyoursaas/scripts/templates/vhostHttps-sellyoursaas.template
fqn = jorge2.a1.demo.com.mx
fqnold = -.-
CRONHEAD =
Search database server name and port for deployment server in /etc/sellyoursaas.conf
Search admin database credential for deployement server in /etc/sellyoursaas.conf
Failed to find archive directory -

Update,

Into the Deploy Server ->/etc/sellyoursaas.conf, I have configured the variable targetdir=/home/jail/home and I get the same error... targetdir = -

Afther some testings I figured out that into the module SELLYOURSAAS->Parameters for development Servers, the configurations must be writen.

This information is not present into the documentation.
@eldy , how can I help to contribuite with the documentation?

eldy commented

Yes log of the deployement server are visible into /var/log/remote_server.log
On the deploylent server.

To contribute, make a PR on file doc/...asciidoc.

Also can you tell which parameter was missing on setup. So i will update backoffice to make field mandatory and send a better warning at first deployement if not set.

Finally my SellYourSaas is working,

I have documented my findndings.

As soon as my Saal works 100%, i will contribuite with the documentation.