New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server does not create zip file from config server correctly #157

Closed
auahmed opened this Issue Feb 2, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@auahmed

auahmed commented Feb 2, 2018

In com.networknt.server.Server.java under loadConfig() method, when a config server is provided, the config files are provided by the config server.
Currently when we get the response back from the config server we are not getting all the data to place into the zip file creating a fault zip file.

The config server passes all the bytes successfully and this is determined by looking at the response in postman. but when running in the server.java we only get back a very small amount and can be verified by outputting the bytes to the system:
System.out.println("FileData:" + Arrays.toString(reference.get().getAttachment(Http2Client.RESPONSE_BODY).getBytes()));
The zip file is not created correctly and then the future task to unzip the file will fail.

@stevehu

This comment has been minimized.

Contributor

stevehu commented Feb 2, 2018

@auahmed Thanks for raising this. I will take a look at it this weekend.

@stevehu stevehu self-assigned this Feb 2, 2018

@stevehu

This comment has been minimized.

Contributor

stevehu commented Feb 8, 2018

@auahmed I have tested it with your test server and found that the config.zip in /tmp is not the right size. It looks like the stream was cut in short somehow when reading from the response body. I need to do more investigation to come up with a solution. Stay tuned. Thanks for raising this issue.

@stevehu

This comment has been minimized.

Contributor

stevehu commented Feb 8, 2018

This is a related update to switch from HTTP 1.1 to HTTP 2.0 when connecting to light-config-server. This is not the root cause though. Just a separate enhancement.

#159

@NicholasAzar

This comment has been minimized.

Member

NicholasAzar commented Apr 17, 2018

@stevehu is this still an issue?

@stevehu

This comment has been minimized.

Contributor

stevehu commented Apr 17, 2018

@NicholasAzar We basically delayed light-config-server due to lack of resources. Currently, we are using light-config-test for all the configuration files in the final snapshot. It works very well at the moment, but once we have time, the light-config-server will be picked up again.

@stevehu

This comment has been minimized.

Contributor

stevehu commented Apr 20, 2018

@auahmed When you are working with the light-codegen web, are you downloading the zip file directory or put a link somewhere for users to click/download? Thanks.

@auahmed

This comment has been minimized.

auahmed commented May 25, 2018

@stevehu sorry for the late response.
we are downloading the zip file directly and currently we are not facing any issues and the scaffold is generated correctly.

@stevehu stevehu closed this Sep 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment