grimsi / accservermanager

A Docker, Spring Boot 2 and Angular 7 based AC Competizione Server Manager
Other
26 stars 8 forks source link

Creating a Server Error #4

Closed surtic86 closed 5 years ago

surtic86 commented 5 years ago

Hi there,

I have installed your ACC ServerManager with your Docker Image and placed the 0.7.2 Server Exe in the right Folder (gets Recognized from your Tool). I can Access the Manager can create Events but i can't create e Server.

Now i get an Error when i click on Create. Cant delete container 'null': path is 'null'.

Screenshot: https://monosnap.com/image/NcgCIM6Hl2pbOeg8DrS343Xk3Mq2tX.png

Docke Command sudo docker run -d --name accservermanager --restart=unless-stopped \ -e accservermanager.folder-path=/data/acc/accservermanager \ -e accservermanager.username=TEST \ -e accservermanager.password=TEST \ -v /data/acc/db:/data/db \ -v /data/acc/accservermanager:/opt/server \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 8000:8000 \ -p 9554:9554 \ grimsi/accservermanager:latest

Thanks for your Help

grimsi commented 5 years ago

Thanks for your report :)

I also had this issue, but only when running docker on a Windows host (thats why Windows is currently not supported). What system are you running on?

surtic86 commented 5 years ago

Im on a Ubuntu 16.04.6 LTS

Docker Client: Version: 17.05.0-ce API version: 1.29 Go version: go1.7.5 Git commit: 89658be Built: Thu May 4 22:10:54 2017 OS/Arch: linux/amd64

Server: Version: 17.05.0-ce API version: 1.29 (minimum version 1.12) Go version: go1.7.5 Git commit: 89658be Built: Thu May 4 22:10:54 2017 OS/Arch: linux/amd64 Experimental: false

grimsi commented 5 years ago

Okay, could you give me the logs of the container (with docker logs accservermanager)?

If you have the time it would be really great if you could delete the accservermanager container and all linked docker volumes and create the container again, but add -e logging.level.root=debug to the docker run command this time and then upload the logfile here (see this for a explanation on how to get the logfile)? Thanks :)

surtic86 commented 5 years ago

Sure :) the Log is Quite big.... 8MB.

Removed the old Container and created a new Fresh Instance, then created a Event and tried it again with creating a Server.

You can download / view the Log from Plain: https://www.nonameweb.ch/stuff/acc/accservermanager.log Zip: https://www.nonameweb.ch/stuff/acc/accservermanager.log.zip

8749220 Apr 11 14:12 accservermanager.log 387195 Apr 11 14:12 accservermanager.log.zip

grimsi commented 5 years ago

Located the error: javax.ws.rs.ProcessingException: Error closing message content input stream. at org.glassfish.jersey.message.internal.EntityInputStream.close(EntityInputStream.java:162) ~[jersey-common-2.27.jar!/:na] [...] Caused by: java.io.IOException: Bad file descriptor at jnr.enxio.channels.Common.read(Common.java:67) ~[jnr-unixsocket-0.18.jar!/:na] [...]

Looks like my software has problems connecting to the docker deamon on your host. Could you try to install the newest docker version (18.09.4)?

Thanks a lot for your great cooperation! As soon as I get home I will try to reproduce your issue but I suspect that either your Ubuntu or your Docker is too old (I only tested Ubuntu 18.04 and Docker 18.09.X)

surtic86 commented 5 years ago

Yes looks like your Libry? just Supports Docker 18? On Ubuntu 16.04 is Docker 17 the newest Version form the Offical Docker Repo (https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/binary-amd64/Packages)

When you can't "fix" it we know now that Minimum Docker Version would be 18 :)

grimsi commented 5 years ago

I use the spotify-docker-client to let my Java application communicate with Docker. Theoretically this library supports docker 17.03.1-ce and newer, but the README is a bit outdated. I will try to test Ubuntu 16.04 with Docker 17 on a fresh installation so we can be sure that thats the issue. I really hope that the fault is in my application, because that would be possible to fix for me. Otherwise I would have to set the supported Docker version to 18, which would affect many potential users :(

grimsi commented 5 years ago

Okay, so I tested a fresh Ubuntu 16.04 installation and installed docker using this method:

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

The docker script automatically installed Docker version 18.09.5, build e8ff056 on my system. With that docker version everything runs fine (as expected).

It looks like docker changed their official repo with the release of 17.06 (according to this article), so youre using an old repository and should be able to install docker 18 by using the current one.

But I also tested it with the old repository and installed Docker version 17.05.0-ce, build 89658be which also works just fine. Do you have any other software installed or did you configure anything that could possibly interfere with my application?

surtic86 commented 5 years ago

Oh interesting.... thanks i will look into that how i can now update daht save without any trouble.

grimsi commented 5 years ago

Since I could not reproduce your error I think that the bug is related to something specific to your machine. Therefore I will close this issue for now. If you have anything to add or questions related to this problem just reply here and I will reopen it again

HendrikRoth commented 5 years ago

Same issue here,

Hostsystem: Ubuntu 18.04.2 LTS Docker version: 18.09.2

grimsi commented 5 years ago

Is it possible for you to provide log files? That would be really great :)

Okay, could you give me the logs of the container (with docker logs accservermanager)?

If you have the time it would be really great if you could delete the accservermanager container and all linked docker volumes and create the container again, but add -e logging.level.root=debug to the docker run command this time and then upload the logfile here (see this for a explanation on how to get the logfile)? Thanks :)

HendrikRoth commented 5 years ago

I would, but it worked now and i have no idea why (i only added the environment variable for debugging, but i can't believe that this changed anything this related).

But i have a new issue with the newly created container: wine: cannot find L"C:\\windows\\system32\\accServer.exe"

grimsi commented 5 years ago

Glad that it works now. Could you please open a new issue for the wine bug and attach the log files?

surtic86 commented 5 years ago

Since I could not reproduce your error I think that the bug is related to something specific to your machine. Therefore I will close this issue for now. If you have anything to add or questions related to this problem just reply here and I will reopen it again

Just to Update: Yes its really strange. I updated my Server from 16.04 to 18.04 and also reinstalled Docker fresh with purged all Container, Images, Configs but i still havn't got it to run. So its quite Strange. On the other Side i made a fresh Install Ubuntu 18.04 and Docker and it worked Perfect!

Thanks for your Work. Eventually i will find some time to give a helping Hand with a Pull Request or so.

grimsi commented 5 years ago

Thanks for the update and im glad that you could get it to work on a fresh installation :)

HendrikRoth commented 5 years ago

Tried today to install accservermanager again and had the same issue.

here the error log:


2019-06-03 17:31:35,070 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.070 DEBUG 152 --- [           main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@45905bff, started on Mon Jun 03 17:31:28 GMT 2019, parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1c2c22f3

2019-06-03 17:31:35,089 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.089 ERROR 152 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: Failed to execute CommandLineRunner

    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:816) ~[spring-boot-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]

    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:797) ~[spring-boot-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]

    at org.springframework.boot.SpringApplication.run(SpringApplication.java:324) ~[spring-boot-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]

    at grimsi.accservermanager.backend.ACCServerManager.main(ACCServerManager.java:26) [classes!/:1.0.0]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]

    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [accservermanager.jar:1.0.0]

    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [accservermanager.jar:1.0.0]

    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [accservermanager.jar:1.0.0]

    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [accservermanager.jar:1.0.0]

Caused by: java.lang.NullPointerException: null

    at grimsi.accservermanager.backend.service.ContainerService.lambda$deployInstance$1(ContainerService.java:74) ~[classes!/:1.0.0]

    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[na:1.8.0_201]

    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_201]

    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_201]

    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_201]

    at grimsi.accservermanager.backend.service.ContainerService.deployInstance(ContainerService.java:77) ~[classes!/:1.0.0]

    at grimsi.accservermanager.backend.service.StartupService.lambda$initInstances$3(StartupService.java:97) ~[classes!/:1.0.0]

    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_201]

    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_201]

    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_201]

    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_201]

    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_201]

    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_201]

    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_201]

    at grimsi.accservermanager.backend.service.StartupService.initInstances(StartupService.java:95) ~[classes!/:1.0.0]

    at grimsi.accservermanager.backend.service.StartupService.initialize(StartupService.java:44) ~[classes!/:1.0.0]

    at grimsi.accservermanager.backend.ACCServerManager.run(ACCServerManager.java:37) [classes!/:1.0.0]

    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:813) ~[spring-boot-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]

    ... 11 common frames omitted

2019-06-03 17:31:35,091 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.091 DEBUG 152 --- [           main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1c2c22f3, started on Mon Jun 03 17:30:59 GMT 2019

2019-06-03 17:31:35,113 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Auditevents' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Beans' from the JMX domain

2019-06-03 17:31:35,113 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Caches' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Health' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Conditions' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Configprops' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Env' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Info' from the JMX domain

2019-06-03 17:31:35.112 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Loggers' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Threaddump' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Metrics' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Scheduledtasks' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Httptrace' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.b.a.e.jmx.JmxEndpointExporter        : Unregister endpoint with ObjectName 'org.springframework.boot:type=Endpoint,name=Mappings' from the JMX domain

2019-06-03 17:31:35.113 DEBUG 152 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

2019-06-03 17:31:35,114 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.113  INFO 152 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

2019-06-03 17:31:35,116 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.116  INFO 152 --- [           main] org.mongodb.driver.connection            : Closed connection [connectionId{localValue:2, serverValue:6}] to localhost:27017 because the pool has been closed.

2019-06-03 17:31:35.116 DEBUG 152 --- [           main] org.mongodb.driver.connection            : Closing connection connectionId{localValue:2, serverValue:6}

2019-06-03 17:31:35,116 DEBG 'mongodb' stdout output:

2019-06-03T17:31:35.116+0000 I NETWORK  [conn6] end connection 127.0.0.1:50318 (1 connection now open)

2019-06-03 17:31:35,117 DEBG 'accservermanager' stdout output:

2019-06-03 17:31:35.117 DEBUG 152 --- [localhost:27017] org.mongodb.driver.connection            : Closing connection connectionId{localValue:1, serverValue:5}

2019-06-03 17:31:35,118 DEBG 'mongodb' stdout output:

2019-06-03T17:31:35.117+0000 I NETWORK  [conn5] end connection 127.0.0.1:50312 (0 connections now open)
grimsi commented 5 years ago

The software is failing to deploy a container (NULL pointer exception). Currently I'm on a business trip until friday but I will try to take a look at it. My current guess is that my application has problems connecting to your docker deamon, unfortunately I cant spot a docker error message in the logs. Do you have any software installed that could possibly interfere with docker or sockets?

HendrikRoth commented 5 years ago

i manage the server via portainer (portainer.io) - but should not be a problem.

grimsi commented 5 years ago

Nice find didn't know how I couldn't see it.Looks like your firewall blocks docker from accessing docker hub and pulling the image. I will include a check in my software so I doesn't just crash when this happens

HendrikRoth commented 5 years ago

removed my message because the problem occured because of missing linking docker.socket (creating server error still exists)

HendrikRoth commented 5 years ago

starting your grimsi/accserver package manually works fine. seams really to be a problem with the manager starting/accessing docker maybe.

grimsi commented 5 years ago

Okay I will close this issue again since you opened a dedicated issue for your problem. Lets use this new issue and try to sort it out