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

Fail to build application by using docker-compose . #1605

Closed
Joy-Zhang-0303 opened this issue Apr 23, 2020 · 5 comments
Closed

Fail to build application by using docker-compose . #1605

Joy-Zhang-0303 opened this issue Apr 23, 2020 · 5 comments

Comments

@Joy-Zhang-0303
Copy link

Hello, openboxes team,

when I build the application by using docker-compose, I meet the belowing error.
you can also confirm the situtation by the attached picture.
I need your help to solve this issue. I need to use Openboxes as soon as possiable.

Thanks.

Unable to load specified config location classpath:openboxes-config.properties : class path resource [openboxes-config.properties] cannot be opened because it does not exist
tomcat_1 | Unable to load specified config location classpath:openboxes-config.groovy : class path resource [openboxes-config.groovy] cannot be opened because it does not exist
tomcat_1 | Unable to load specified config location file:/root/.grails/openboxes-config.groovy : /root/.grails/openboxes-config.groovy (No such file or directory)
Screenshot from 2020-04-23 20-23-20

@jmiranda
Copy link
Member

jmiranda commented Apr 23, 2020

Thanks @Joy-Zhang-0303. Don't worry about the "Unable to load specified config location" errors. As you can see there are 4 config locations and only 3 "Unable to load" errors, which implies that it found one of the property files. The real issue is with the "Cannot invoke method getAt() on null object" error. This usually indicates that Java 8 is involved (Grails 1.3.9 requires Java 7). I think it might be that the Tomcat 7 docker image was compiled with Java 8. I'll see if there's an image compiled with Java 7.

@Joy-Zhang-0303
Copy link
Author

@jmiranda

OK, Thanks for your information and quick reply .
Looking forward to good news.

H.Z

@jmiranda
Copy link
Member

@Joy-Zhang-0303 So I was able to reproduce the issue and find a quick fix. The long term solution will be for us to upgrade to Grails 3 (which we are in the process of doing) so that Java 8 is no longer a problem.

In the short term, you can downgrade your Tomcat version to something like 7.0.90.

  tomcat:
    image: tomcat:7.0.90
    ports:
      - "8072:8080"
    volumes:
      - ./openboxes.war:/usr/local/tomcat/webapps/openboxes.war
      - ./openboxes-config.properties:/root/.grails/openboxes-config.properties
    environment:
      CATALINA_OPTS: "$CATALINA_OPTS -server -Xms1024m -Xmx2024m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom"

NOTE: Please do not run this in production (or even as a public-facing test server) without addressing all security vulnerabilities identified between Tomcat 7.0.90-7.0.99 (especially CVE-2020-1938). I don't think we use AJP here, but the port might be open by default on older versions of Tomcat.
Here's a list of vulnerabilities that you should consider patching before making this publicly available.
https://tomcat.apache.org/security-7.html#Apache_Tomcat_7.x_vulnerabilities

@Joy-Zhang-0303
Copy link
Author

@jmiranda
Hello, Justin-san,
I succefully build this project by chaning the above docker-compose file you gave, and be able to open the comcat succefully. Thanks so much.
Now, I have one new issue about accessing tomcat app manager.
I have revised the tomcat-user.xml by adding the rolename "manager-gui" and "manager-script", also setting the password for them. See the attached picture.
Screenshot from 2020-04-24 00-46-25

But I still can not access the app manager. Can you share some ideas?

@Joy-Zhang-0303
Copy link
Author

@jmiranda
Hello, Justin-san,
I forgot the un-commentout. Sorry for my missing.
Now I can access app manager succefully.

H.Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants