Closed codeswithroh closed 3 years ago
Hello @codeswithroh ,
I have not been able to reproduce the issue, could u give more details about the Jina version and the system u are running in?
Also some more details in the errors seen would be very helpful.
Also, it is very helpful if u can activate DEBUG logging level by setting the environment variable export JINA_LOG_LEVEL=DEBUG
I am using
2.1.7
Ubuntu 20.4
Jupyter Notebook
In the pic below you can see that the code has run over 30 minutes but
0/3
progress is made
That is the reason why the client code shows pending and is not being executed
And after setting the logging_level to DEBUG
, this is the error that go printed in my console
Hey @codeswithroh ,
Can u check the value of this environment
variable?
JINA_LOG_CONFIG
?
Also can u check the content of the file
(logging.default.yml) under jina resources?
Also u can try to run the example by installing Jina from the version on this PR #3670 . It should get more info on the observed error
This is the content given in logging.default.yml
handlers: # enabled handlers, order does not matter
- StreamHandler
- FluentHandler
level: INFO # set verbose level
configs:
FileHandler:
format: '%(asctime)s:{name:>15}@%(process)2d[%(levelname).1s]:%(message)s'
output: 'jina-{uptime}.log'
formatter: JsonFormatter
StreamHandler:
format: '{name:>15}@%(process)2d[%(levelname).1s]:%(message)s'
formatter: ColorFormatter
SysLogHandler:
ident: # this will be prepend to all messages
format: '{name:>15}@%(process)2d[%(levelname).1s]:%(message)s'
host: # when not given then record it locally, /dev/log on linux /var/run/syslog on mac
port: # when not given then record it locally, /dev/log on linux /var/run/syslog on mac
formatter: PlainFormatter
FluentHandler:
# this configuration describes where is the fluentD daemon running and waiting for logs to be emitted.
# FluentD then will have its own configuration to forward the messages according to its own syntax
# prefix will help fluentD filter data. This will be prepended for FluentD to easily filter incoming messages
tag: jina
host: 0.0.0.0
port: 24224
format:
host: '%(hostname)s'
process: '%(process)s'
type: '%(levelname)s'
But for setting the logging_level to DEBUG
I created another file named loggin_cfg.yml
and the content is as follows
handlers:
- StreamHandler
- SysLogHandler
- FluentHandler
level: DEBUG
Also I can't find the version of Jina mentioned in #3670. Can you mention it here?
This is the content given in
logging.default.yml
handlers: # enabled handlers, order does not matter - StreamHandler - FluentHandler level: INFO # set verbose level configs: FileHandler: format: '%(asctime)s:{name:>15}@%(process)2d[%(levelname).1s]:%(message)s' output: 'jina-{uptime}.log' formatter: JsonFormatter StreamHandler: format: '{name:>15}@%(process)2d[%(levelname).1s]:%(message)s' formatter: ColorFormatter SysLogHandler: ident: # this will be prepend to all messages format: '{name:>15}@%(process)2d[%(levelname).1s]:%(message)s' host: # when not given then record it locally, /dev/log on linux /var/run/syslog on mac port: # when not given then record it locally, /dev/log on linux /var/run/syslog on mac formatter: PlainFormatter FluentHandler: # this configuration describes where is the fluentD daemon running and waiting for logs to be emitted. # FluentD then will have its own configuration to forward the messages according to its own syntax # prefix will help fluentD filter data. This will be prepended for FluentD to easily filter incoming messages tag: jina host: 0.0.0.0 port: 24224 format: host: '%(hostname)s' process: '%(process)s' type: '%(levelname)s'
But for setting the logging_level to
DEBUG
I created another file namedloggin_cfg.yml
and the content is as followshandlers: - StreamHandler - SysLogHandler - FluentHandler level: DEBUG
Ok, to set the DEBUG log level u just need to run a cell in ur notebook setting os.environ["JINA_LOG_LEVEL"]=True
and that should be enough, no need to create any extra file.
The error u show is related to the file u created, so I cannot get better information from the DEBUGlevel.
Alternatively u can change the DEBUG LEVEL directly in the logging.default.yml file
i managed to use the same code as your's running on notebook, can not reproduce the above error.
note: since __file__
is missing in jupyter, i changed it to the current file
While following this from the docs, I noticed that the server is not getting started.
After running this piece of code
The output is stuck at this for over
30 mins
The basic
searching
method is working from theSwagger UI
that opens atlocalhost:12345
but since, the server is not completing, I am not able tocreate any client
with thisAfter running the above code, it shows pending since, the server is not being completed.