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

Web UI gives blank page after first deploy #820

Closed
apognu opened this issue Dec 27, 2015 · 9 comments
Closed

Web UI gives blank page after first deploy #820

apognu opened this issue Dec 27, 2015 · 9 comments
Milestone

Comments

@apognu
Copy link

@apognu apognu commented Dec 27, 2015

Hi there,

I have been playing around with Singularity for a few days now, and I got something quite weird on latest release 0.4.6 : after my first deploy on a clean cluster (3 nodes), the web UI gives me a blank page because it's not able to find static files (404).

The Web UI worked quite well before I launched my first deploy (through the REST API).

Failed to load resource: the server responded with a status of 404 (Not Found) GET http://192.168.100.13:7099/singularity/static/css/app.css 
Failed to load resource: the server responded with a status of 404 (Not Found) GET http://192.168.100.13:7099/singularity/static/js/app.js 
Uncaught ReferenceError: require is not defined

I don't know if it's relevant, but my logs starts with the following:

Dec 27 13:53:24 mesos-03 java[1906]: INFO  [2015-12-27 12:53:24,018] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: assets for path /static/*
Dec 27 13:53:24 mesos-03 java[1906]: INFO  [2015-12-27 12:53:24,061] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: api-docs for path /api-docs/*

And the only WARNs I get in the logs are:

Dec 27 13:53:30 mesos-03 java[1906]: WARNING: A sub-resource method, public java.util.List com.hubspot.singularity.resources.RackResource.getRacks(com.google.common.base.Optional), with URI template, "/", is treated as a resource method
Dec 27 13:53:30 mesos-03 java[1906]: WARNING: A sub-resource method, public java.util.List com.hubspot.singularity.resources.SlaveResource.getSlaves(com.google.common.base.Optional), with URI template, "/", is treated as a resource method

I get the blank page on all Singularity nodes. Apart from this issue, the scheduler works fine with Docker and the default Mesos executor.

Do you need any more information about my setup or my logs?

I will try and build from master to see if the issue was fixed, but I couldn't find any issue pertaining to this particular bug.

Regards,

@tpetr
Copy link
Member

@tpetr tpetr commented Dec 28, 2015

Hey @apognu, apologies for the headache there -- I haven't seen this issue before, but we'll figure it out. To help diagnose:

  • How are you running Singularity (via docker image, or executing the JAR directly)?
  • Could you post or email me (tpetr@hubspot.com) your Singularity config YAML?

The main thing I want to verify is that there isn't a misconfiguration where the static assets are being served from vs. where the UI thinks they are. There's also a (very unlikely) possibility that something went wrong when the static assets were being bundled into the JAR during the release process -- I'm double checking this now just in case.

Thanks,
Tom

Loading

@apognu
Copy link
Author

@apognu apognu commented Dec 28, 2015

@tpetr, I launch Singularity directly through the jar file with systemd.

You can find the configuration YAML and systemd service here.

Update : I added the HTML output I get to the gist.

And let's keep in mind I did get the Web UI at first before I deployed my first request.

Loading

@tpetr
Copy link
Member

@tpetr tpetr commented Dec 28, 2015

I found the issue: we used a new Docker-based build process for the 0.4.6 release and it encountered an error during the Web UI build (the build process was defaulting to the root user, which npm apparently does not like). Disappointingly, the build process did not catch this error and assumed the Web UI was built successfully. The pages that loaded successfully for you were probably due to the fact that the JS and CSS assets were cached in your browser -- I bet if you do a hard refresh they'll all fail to load in the same way.

I'm in the process right now of fixing the build process and cutting a new release, but until then, using a manually built JAR (mvn clean package on the Singularity-0.4.6 tag) should make things work.

Loading

@apognu
Copy link
Author

@apognu apognu commented Dec 28, 2015

Thanks for your reactivity, and I'm glad it helped you find this issue in the build process.

I will build from source until the release is out and keep you posted.

Loading

@tpetr tpetr added this to the 0.4.7 milestone Dec 28, 2015
@tpetr
Copy link
Member

@tpetr tpetr commented Dec 28, 2015

@apognu 0.4.7 should have the static assets properly bundled -- when you have a moment, can you confirm that this works for you?

Loading

@apognu
Copy link
Author

@apognu apognu commented Dec 28, 2015

Downloading now.

Loading

@apognu
Copy link
Author

@apognu apognu commented Dec 28, 2015

Well, all is working fine on 0.4.6 and 0.4.7 when built from source.

I will definitely try and install the prebuilt version from Maven Central when it's available.

Loading

@tpetr
Copy link
Member

@tpetr tpetr commented Dec 28, 2015

Cool. Maven Central must not be fully synced yet (we publish to sonatype), but you can download the JAR directly here: https://repo1.maven.org/maven2/com/hubspot/SingularityService/0.4.7/

Loading

@apognu
Copy link
Author

@apognu apognu commented Dec 28, 2015

Nice, problem seems to be fixed there.

Cheers.

Loading

@apognu apognu closed this Dec 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants