threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

can not start a website using threebot packages by using git_url #243

Closed Pishoy closed 4 years ago

Pishoy commented 4 years ago
JSX> cl = j.servers.threebot.local_start_default(web=True)                                                                                                                                                  
JSX> cl.actors.package_manager.package_add(git_url="https://github.com/Pishoy/www_goldflow_io'")                                                                                                            
Thu 14 13:44:17 t_package_manager.py - 274 - handle_error                       : EXCEPTION: 
    GEDIS SERVER 127.0.0.1:8901 SOURCE METHOD: default.package_manager.package_add
 - original Exception:       {"traceback": [["/sandbox/lib/jumpscale/Jumpscale/servers/gedis/handlers.py", "_handle_request", 407, "result =
          cmd.method(*params_list, user_session=user_session, **params_dict)", null],
          ["/sandbox/lib/jumpscale/Jumpscale/servers/threebot/base_actors/package_manager.py", "package_add", 50, "name =
          getname(p)", null], ["/sandbox/lib/jumpscale/Jumpscale/servers/threebot/base_actors/package_manager.py", "getname",
          39, "path = j.clients.git.getContentPathFromURLorPath(p)", null],
          ["/sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py", "getContentPathFromURLorPath", 439, "repository_url,
          gitpath, relativepath = self.getContentInfoFromURL(urlOrPath, pull=pull, branch=branch)", null],
          ["/sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py", "getContentInfoFromURL", 385,
          "j.clients.git.pullGitRepo(repository_url, branch=branch)", null],
          ["/sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py", "pullGitRepo", 158, "interactive=interactive,",
          null], ["/sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py", "pullGitRepo", 298, "raise
          j.exceptions.Operations(\"retried git pull too many times, failed\", data=cmd)", null]], "message":
          "\u001b[1;31mEXCEPTION: \n    retried git pull too many times, failed\u001b[0;0m", "linenr": 298, "filepath":
          "/sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py", "processid": "unknown", "level": 50, "context":
          "pullGitRepo", "cat": null, "data": "mkdir -p /sandbox/code/github/pishoy;cd /sandbox/code/github/pishoy;git -c
          http.sslVerify=false clone   https://github.com/Pishoy/www_goldflow_io'.git
          /sandbox/code/github/pishoy/www_goldflow_io'"}
--TRACEBACK------------------
<stdin> in <module>
    1    
/sandbox/var/codegen/gedis/threebot/client/default_package_manager.py in package_add
    44    self.handle_error(e,1,cmd_name=cmd_name)
/sandbox/var/codegen/gedis/threebot/client/default_package_manager.py in handle_error
    274    raise j.exceptions.RemoteException(message=msg, data=logdict, exception=e)
-----------------------------

--DATA-----------------------
  cat: null
  context: pullGitRepo
  data: mkdir -p /sandbox/code/github/pishoy;cd /sandbox/code/github/pishoy;git -c http.sslVerify=false
      clone   https://github.com/Pishoy/www_goldflow_io'.git /sandbox/code/github/pishoy/www_goldflow_io'
  filepath: /sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py
  level: 50
  linenr: 298
  message: "\e[1;31mEXCEPTION: \n    retried git pull too many times, failed\e[0;0m"
  processid: unknown
  source: 'GEDIS SERVER 127.0.0.1:8901 SOURCE METHOD: default.package_manager.package_add'
  traceback:
  -   - /sandbox/lib/jumpscale/Jumpscale/servers/gedis/handlers.py
      - _handle_request
      - 407
      - result = cmd.method(*params_list, user_session=user_session, **params_dict)
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/servers/threebot/base_actors/package_manager.py
      - package_add
      - 50
      - name = getname(p)
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/servers/threebot/base_actors/package_manager.py
      - getname
      - 39
      - path = j.clients.git.getContentPathFromURLorPath(p)
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py
      - getContentPathFromURLorPath
      - 439
      - repository_url, gitpath, relativepath = self.getContentInfoFromURL(urlOrPath,
          pull=pull, branch=branch)
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py
      - getContentInfoFromURL
      - 385
      - j.clients.git.pullGitRepo(repository_url, branch=branch)
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py
      - pullGitRepo
      - 158
      - interactive=interactive,
      - null
  -   - /sandbox/lib/jumpscale/Jumpscale/clients/git/GitFactory.py
      - pullGitRepo
      - 298
      - raise j.exceptions.Operations("retried git pull too many times, failed", data=cmd)
      - null
-----------------------------

None
JSX>  
Pishoy commented 4 years ago

i tested again with threebot.local_start_zerobot_default , is started but can not access website, got 404

JSX> cl = j.servers.threebot.local_start_zerobot_default()                                           
JSX> cl.actors.package_manager.package_add(git_url="https://github.com/enertia-io/www_enertia_io")                                                                                                          
b'OK'

image

Pishoy commented 4 years ago

did same above steps and website loading is working but i have to restart lapis tmux process, can you fix that in code or any advice ?

also i have a question, how can i start two different websites on same threebot server ? i have use different static_location.path_url but not work

ranatrk commented 4 years ago
Dina-Abd-Elrahman commented 4 years ago
j.servers.threebot.local_start_default()
j.threebot.packages.zerobot.packagemanager.actors.package_manager.package_add(git_url="https://github.com/threefoldtech/jumpscaleX_threebot/tree/development/ThreeBotPackages/zerobot/alerta_ui")