Skip to content
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

'standalone_webservice' shuts down after a minute in Docker on Windows #446

Closed
swythan opened this issue Nov 29, 2019 · 5 comments
Closed
Labels

Comments

@swythan
Copy link

swythan commented Nov 29, 2019

Hi.

Crux looks really interesting/useful. I'm trying to have a bit of a poke around to see how it might fit our needs.

I tried to run your standalone_webservice example on docker, but it's failing on me. I tried both locally on a Windows host, and also on a Linux VM running on Azure (Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-1063-azure x86_64)).

In both setups I got the same error (which I guess is a good thing!).

swythan@MyDockerVM:~$ mkdir -p my-crux-data && docker run -p 8090:8080 -p 8091:8081 -v $(pwd)/my-crux-data:/usr/src/app/data -i -t juxt/crux-standalone-webservice:latest
Reflection warning, /tmp/form-init7231358797265879569.clj:1:945 - call to static method invokeStaticMethod on clojure.lang.Reflector can't be resolved (argument types: unknown, java.lang.String, unknown).
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Reflection warning, ring/adapter/jetty.clj:45:3 - call to org.eclipse.jetty.server.ServerConnector ctor can't be resolved.
Reflection warning, bidi/bidi.cljc:20:31 - call to static method decode on java.net.URLDecoder can't be resolved (argument types: java.lang.String, unknown).
Reflection warning, byte_streams.clj:437:12 - call to method position on java.nio.ByteBuffer can't be resolved (argument types: unknown).
Reflection warning, byte_streams.clj:438:12 - call to method limit can't be resolved (target class is unknown).
Reflection warning, byte_streams.clj:715:19 - call to method limit on java.nio.ByteBuffer can't be resolved (argument types: java.lang.Number).
Reflection warning, byte_streams.clj:718:9 - call to method position on java.nio.ByteBuffer can't be resolved (argument types: java.lang.Number).
Reflection warning, aleph/http/client_middleware.clj:126:5 - call to static method encode on java.net.URLEncoder can't be resolved (argument types: unknown, unknown).
Reflection warning, hiccup/util.clj:101:19 - call to static method encode on java.net.URLEncoder can't be resolved (argument types: java.lang.String, unknown).
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.lang.InjectedInvoker/0x0000000840062040 (file:/root/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar) to method com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(org.xml.sax.InputSource,org.xml.sax.HandlerBase)
WARNING: Please consider reporting this to the maintainers of clojure.lang.InjectedInvoker/0x0000000840062040
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Reflection warning, bidi/vhosts.clj:23:11 - reference to field getHost can't be resolved.
Reflection warning, bidi/vhosts.clj:24:11 - reference to field getPort can't be resolved.
Reflection warning, bidi/vhosts.clj:25:14 - reference to field getPort can't be resolved.
Reflection warning, bidi/vhosts.clj:32:37 - reference to field getScheme can't be resolved.
Reflection warning, bidi/vhosts.clj:34:44 - reference to field toURI can't be resolved.
Reflection warning, bidi/vhosts.clj:73:9 - call to method endsWith can't be resolved (target class is unknown).
Reflection warning, yada/cookies.clj:54:134 - call to method plus on java.time.Instant can't be resolved (argument types: java.lang.Object).
Reflection warning, yada/cookies.clj:54:134 - call to method plus on java.time.Instant can't be resolved (argument types: java.lang.Object).
Reflection warning, yada/auth_schemes/basic.clj:26:37 - reference to field getBytes can't be resolved.

Thanks.

@jarohen jarohen added this to Selected in XTDB Development via automation Nov 29, 2019
@refset
Copy link
Contributor

refset commented Nov 29, 2019

Hi @swythan ! Thanks for your interest and for raising the issue. These errors/warnings are actually an unfortunate artefact of how the non-Crux parts inside this Docker image run a web server that is underpinned by Jetty...so I think all of these messages actually are only advisory (in my experience anyway) and none of this should affect the running of the image or the Crux node itself.

Is no other log output produced even if you leave it running (or starting up) for another 5m or so?

We will endeavour to create a more minimal and updated image for you next week.

@swythan
Copy link
Author

swythan commented Nov 30, 2019

Ah, OK. Thanks. I assumed it was broken and didn't try to actually use it!

When I'm back at work on Monday I'll try it again and let you know. Assuming it does work, it would be good if the instructions mentioned that these errors are expected.

I'm a .Net developer, so all the Clojure stuff is completely new to me.

@swythan
Copy link
Author

swythan commented Dec 2, 2019

I just tried this again, and the results are slightly surprising.

If I use a linux host (on Azure) then I get the same console output as before (still no messages about the server running), but the server is actually responding on 8080 & 8081 correctly (I had to remap them to 80 & 8080 to deal with my company proxy).

If I use a Windows (Win10 1809) host, the docker container just shuts itself down after about a minute. In that minute I still can't connect on either 8090 or 8091.

@jarohen jarohen changed the title Errors trying 'standalone_webservice' example in docker 'standalone_webservice' shuts down after a minute in Docker on Windows Dec 5, 2019
@jarohen
Copy link
Member

jarohen commented Dec 18, 2019

for Linux folks debugging this one, can get free Windows VMs from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

@jarohen jarohen moved this from Selected to Backlog in XTDB Development Jan 8, 2020
@jarohen jarohen removed this from Backlog in XTDB Development Jan 8, 2020
@jarohen
Copy link
Member

jarohen commented Apr 7, 2020

we've removed this from the repo as a maintained example - further docs incoming for the newer docker images as part of #386. see also #385

@jarohen jarohen closed this as completed Apr 7, 2020
@jarohen jarohen added the 1.x label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants