threefoldtecharchive / jumpscaleX_archived

Apache License 2.0
1 stars 6 forks source link

can't get gevent server to work with SSL [development_bcdb] #645

Closed despiegk closed 5 years ago

despiegk commented 5 years ago

image

can't get gevent server to work with SSL

test with

kosmos 'j.servers.rack.test()'
waleedhammam commented 5 years ago

works on development_jumpscale in both jumplscaleX and digitalmeX

hossnys commented 5 years ago

verified on development_jumpscale

JSX> j.servers.rack.test()                                                                                                                                                           
Thu 11 12:02:12 JSBase.py        -  97 - serverrackfactory                  : ***CLASS INIT 1: serverrackfactory
Thu 11 12:02:12 JSBase.py        -  97 - startupcmdfactory                  : ***CLASS INIT 1: startupcmdfactory
Thu 11 12:02:12 BCDBMeta.py      - 161 - bcdbmeta                           : schema set in BCDB:system meta:jumpscale.startupcmd.1 (md5:'f33922bd68677cb8e67f1cd69e80d93a')
Thu 11 12:02:12 b_meta_schema_2.py -  63 - jumpscale.bcdb.meta.schema.2       : change:urljumpscale.startupcmd.1
Thu 11 12:02:12 b_meta_schema_2.py - 104 - jumpscale.bcdb.meta.schema.2       : change:sid7
Thu 11 12:02:12 b_meta_schema_2.py - 141 - jumpscale.bcdb.meta.schema.2       : change:text@url = jumpscale.startupcmd.1
name* = ""
cmd_start = ""
interpreter = "bash,jumpscale,direct,python" (E)  #direct means we will not put in bash script
cmd_stop = ""
debug = False (b)
path = ""
env = (dict)
ports = (LI)
timeout = 10
process_strings = (ls)
process_strings_regex = (ls)
pid = 0
executor = "tmux,corex,foreground,background" (E)
daemon = true (b)
hardkill = false (b)

state = "init,running,error,stopped,stopping,down,notfound" (E)
corex_client_name = "default" (S)
corex_id = (S)

error = "" (S)

time_start = (T)
time_refresh = (T)
time_stop = (T)
Thu 11 12:02:12 b_meta_schema_2.py - 178 - jumpscale.bcdb.meta.schema.2       : change:md5f33922bd68677cb8e67f1cd69e80d93a
Thu 11 12:02:12 b_meta_schema_2.py - 287 - jumpscale.bcdb.meta.schema.2       : DDICT
Thu 11 12:02:12 BCDBMeta.py      - 170 - bcdbmeta                           : new schema in meta:
system: jumpscale.startupcmd.1:f33922bd68677cb8e67f1cd69e80d93a
Thu 11 12:02:12 BCDBMeta.py      - 106 - bcdbmeta                           : save meta:system
Thu 11 12:02:12 BCDB.py          - 373 - bcdb                               : load model:jumpscale.startupcmd.1
Thu 11 12:02:12 JSBase.py        -  97 -                                    : ***CLASS INIT 1: _d6bb16f67a78f0c8d0c799e76c491bec
Thu 11 12:02:12 BCDBMeta.py      - 158 - bcdbmeta                           : schema set in BCDB:system meta:jumpscale.startupcmd.1 (EXISTING)
Thu 11 12:02:12 le_startupcmd_1.py - 231 - jumpscale.startupcmd.1             : change:interpreterBASH
Thu 11 12:02:12 le_startupcmd_1.py - 453 - jumpscale.startupcmd.1             : change:timeout10
Thu 11 12:02:12 le_startupcmd_1.py - 601 - jumpscale.startupcmd.1             : change:executorTMUX
Thu 11 12:02:12 le_startupcmd_1.py - 638 - jumpscale.startupcmd.1             : change:daemonTrue
Thu 11 12:02:12 le_startupcmd_1.py - 712 - jumpscale.startupcmd.1             : change:stateINIT
Thu 11 12:02:12 le_startupcmd_1.py - 749 - jumpscale.startupcmd.1             : change:corex_client_namedefault
Thu 11 12:02:12 JSBase.py        -  97 - jumpscale.startupcmd.1             : ***CLASS INIT 1: jsxobject2
Thu 11 12:02:12 JSBase.py        -  97 - startupcmd                         : ***CLASS INIT 1: startupcmd
Thu 11 12:02:12 StartupCMD.py    - 208 - startupcmd                         : refresh: gedis_test
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:time_refresh:1562846532
Thu 11 12:02:12 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:new
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:cmd_start:from gevent import monkey
monkey.patch_all(subprocess=False)
from Jumpscale import j
j.servers.rack._server_test_start(gedis=True,gedis_ssl=False,webdav=False, bottle=True, websockets=False)

Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:executor:tmux
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:interpreter:python
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:timeout:10
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:ports:[8900]
Thu 11 12:02:12 JSBase.py        -  97 - nettools                           : ***CLASS INIT 1: nettools
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:time_stop:1562846532
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:state:down
Thu 11 12:02:12 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save
Thu 11 12:02:12 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:12 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:12 StartupCMD.py    - 234 - startupcmd                         : stop: gedis_test
Thu 11 12:02:12 StartupCMD.py    - 404 - startupcmd                         : start:gedis_test
Thu 11 12:02:12 StartupCMD.py    - 456 - startupcmd                         : 
from gevent import monkey
monkey.patch_all(subprocess=False)
from Jumpscale import j
j.servers.rack._server_test_start(gedis=True,gedis_ssl=False,webdav=False, bottle=True, websockets=False)
Thu 11 12:02:12 JSConfig.py      - 167 - startupcmd                         : SET:pid:0
Thu 11 12:02:12 JSBase.py        -  97 - tmux                               : ***CLASS INIT 1: tmux
no server running on /tmp/tmux-0/default
Thu 11 12:02:12 JSBase.py        -  97 - systemprocess                      : ***CLASS INIT 1: systemprocess
no server running need to start
++ '[' start == kill ']'
++ tmux -f /sandbox/cfg/.tmux.conf has-session
no server running on /tmp/tmux-0/default
++ '[' 1 -eq 1 ']'
++ echo 'no server running need to start'
++ tmux -f /sandbox/cfg/.tmux.conf new -s main -d 'bash --rcfile /sandbox/bin/env_tmux_detach.sh'
++ '[' start '!=' start ']'
main: 1 windows (created Thu Jul 11 12:02:12 2019) [80x24]
Thu 11 12:02:13 Tmux.py          -  83 - tmux                               : tmux server is running
Thu 11 12:02:13 JSBase.py        -  97 - session                            : ***CLASS INIT 1: session
Thu 11 12:02:14 JSBase.py        -  97 - window                             : ***CLASS INIT 1: window
Thu 11 12:02:14 JSBase.py        -  97 - pane                               : ***CLASS INIT 1: pane
Thu 11 12:02:14 StartupCMD.py    - 373 - startupcmd                         : wait to run:gedis_test (timeout:10)
Thu 11 12:02:19 JSConfig.py      - 167 - startupcmd                         : SET:time_start:1562846539
Thu 11 12:02:19 JSConfig.py      - 167 - startupcmd                         : SET:state:running
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:19 JSConfig.py      -  72 - startupcmd                         : trigger: gedis_test:save_post
Thu 11 12:02:19 JSBase.py        -  97 - gedisclientfactory                 : ***CLASS INIT 1: gedisclientfactory
Thu 11 12:02:19 BCDBMeta.py      - 161 - bcdbmeta                           : schema set in BCDB:system meta:jumpscale.gedis.client (md5:'4c47b74e2101b80082d468c0ce37b507')
Thu 11 12:02:19 b_meta_schema_2.py -  63 - jumpscale.bcdb.meta.schema.2       : change:urljumpscale.gedis.client
Thu 11 12:02:19 b_meta_schema_2.py - 104 - jumpscale.bcdb.meta.schema.2       : change:sid8
Thu 11 12:02:19 b_meta_schema_2.py - 141 - jumpscale.bcdb.meta.schema.2       : change:text@url = jumpscale.gedis.client
name* = "main"
host = "127.0.0.1" (S)
port = 8888 (ipport)
namespace = "default" (S)
password_ = "" (S)
ssl = False (B)
sslkey = "" (S)
Thu 11 12:02:19 b_meta_schema_2.py - 178 - jumpscale.bcdb.meta.schema.2       : change:md54c47b74e2101b80082d468c0ce37b507
Thu 11 12:02:19 b_meta_schema_2.py - 287 - jumpscale.bcdb.meta.schema.2       : DDICT
Thu 11 12:02:19 BCDBMeta.py      - 170 - bcdbmeta                           : new schema in meta:
system: jumpscale.gedis.client:4c47b74e2101b80082d468c0ce37b507
Thu 11 12:02:19 BCDBMeta.py      - 106 - bcdbmeta                           : save meta:system
Thu 11 12:02:19 BCDB.py          - 373 - bcdb                               : load model:jumpscale.gedis.client
Thu 11 12:02:19 JSBase.py        -  97 -                                    : ***CLASS INIT 1: _b438260fcef7b5e96054b4e7f2cbec84
Thu 11 12:02:19 BCDBMeta.py      - 158 - bcdbmeta                           : schema set in BCDB:system meta:jumpscale.gedis.client (EXISTING)
Thu 11 12:02:19 le_gedis_client.py -  78 - jumpscale.gedis.client             : change:namemain
Thu 11 12:02:19 le_gedis_client.py - 115 - jumpscale.gedis.client             : change:host127.0.0.1
Thu 11 12:02:19 le_gedis_client.py - 152 - jumpscale.gedis.client             : change:port8888
Thu 11 12:02:19 le_gedis_client.py - 189 - jumpscale.gedis.client             : change:namespacedefault
Thu 11 12:02:19 le_gedis_client.py - 189 - jumpscale.gedis.client             : change:namespacesystem
Thu 11 12:02:19 le_gedis_client.py - 152 - jumpscale.gedis.client             : change:port8900
Thu 11 12:02:19 le_gedis_client.py - 115 - jumpscale.gedis.client             : change:hostlocalhost
Thu 11 12:02:19 JSBase.py        -  97 - jumpscale.gedis.client             : ***CLASS INIT 1: jsxobject2
Thu 11 12:02:19 JSBase.py        -  97 - gedisclient                        : ***CLASS INIT 1: gedisclient
Thu 11 12:02:19 GedisClient.py   - 141 - gedisclient                        : redisclient: localhost:8900 
Thu 11 12:02:19 JSBase.py        -  97 - gedisclientactors                  : ***CLASS INIT 1: gedisclientactors
Thu 11 12:02:19 JSBase.py        -  97 - gedisclientschemas                 : ***CLASS INIT 1: gedisclientschemas
Thu 11 12:02:19 JSBase.py        -  97 - gedisfactory                       : ***CLASS INIT 1: gedisfactory
Thu 11 12:02:19 JSBase.py        -  97 - gediscmds                          : ***CLASS INIT 1: gediscmds
Thu 11 12:02:19 JSBase.py        -  97 - jumpscale.gedis.api                : ***CLASS INIT 1: jsxobject2
Thu 11 12:02:19 JSBase.py        -  97 - jumpscale.gedis.schema             : ***CLASS INIT 1: jsxobject2
Thu 11 12:02:19 JSBase.py        -  97 - jumpscale.gedis.cmd                : ***CLASS INIT 1: jsxobject2
Thu 11 12:02:19 JSBase.py        -  97 - gediscmd                           : ***CLASS INIT 1: gediscmd
Thu 11 12:02:19 GedisClient.py   - 105 - gedisclient                        : cmds for actor:system
Thu 11 12:02:19 <stdin>          -   1 - serverrackfactory                  : 200
Thu 11 12:02:19 <stdin>          -   1 - serverrackfactory                  : b'<b>Hello World</b>!'
Thu 11 12:02:19 rverRackFactory.py - 200 - serverrackfactory                  : hello kds
Thu 11 12:02:19 <stdin>          -   1 - serverrackfactory                  : 200
Thu 11 12:02:19 rverRackFactory.py - 204 - serverrackfactory                  : stream
Thu 11 12:02:19 <stdin>          -   1 - serverrackfactory                  : 200
Thu 11 12:02:19 <stdin>          -   1 - serverrackfactory                  : b'STARTMIDDLEEND'
tests are ok