Disable admin #208
Disable admin #208
Comments
@narcisobenigno can you explain a bit more what you mean when you say you can't use the admin? Can you also include any errors you're getting? Thanks. |
Hi, I would like to disable the admin, too in some situations. However I don't have any problems with it yet, it's just dump when you need to configure multiple instances of finatra on a single server, ports clashing everywhere, so the less ports you need to configure, the better. However I think it would still be great to have an admin module as a Guice Module, so we could just plug it in or plug it off easily. Also it seems that
I mean i could just overwrite defaultHttpPort, but still awefull. Looks like the whole trait has no effect.. EDIT:
Really strange code. the port comes from the httpPortFlag, which has a default of :8888 and then there is httpExternalPort inside the Ports trait which also defaults to :8888, but is only used for the info?! wouldn't it be better to have something like if flag is not empty override httpExternalPort, so we could either overwrite httpExternalPort OR use the httpPortFlag? |
The Ports trait is not meant for configuration. Its purpose is to expose the ports during integration tests so that HTTP clients can point at the correct destination. |
Oh however httpExternalPort is still used for the http server info message which is wrong. OT: The next thing is there a way to set a flag inside the code? |
Sorry by delay, and thanks by the feedback! I don't know if is possible to configure in heroku to see de finatra admin dashboard. Then I wish to disable the dashboard (not startup it), just the server http port. |
@narcisobenigno it should be possible to just set the admin port twitter-server flag to 0, e.g.,
I've tested this with a sample finatra application running on Heroku. Please let me know if that works for you. Thanks! |
Okay, I will try. Thanks On Thu, May 28, 2015, 14:15 Christopher Coco notifications@github.com
|
@cacoco @narcisobenigno Setting the port to 0, assigns a random port bound to all interfaces. You can check with |
@sergio91pt yep -- unfortunately there's no way to get two assigned ports with Heroku currently so this is the workaround. You won't be able to access the admin as like you said it will be on some random port. Thanks! |
It's hacky but this works on Heroku. Procfile Server/Module
Controller
|
Bump - is there no way to disable the admin server? |
@cacoco I did this but I still see the routes for admin server being created in the output when I start up the server:
I'm guessing this is because I'm not setting the value of
but I can't find which field to override for |
@aliakhtar as mentioned in the documentation, the admin is started and then shut down in the process of bringing up the server. You will see routes created but the listening server which accepts requests will not be started. Also as linked to from the documentation the TwitterServer AdminHttpServer is what defines the Thus you would do:
Thanks! |
Looks like I can not use admin on heroku... How can I disable it?
The text was updated successfully, but these errors were encountered: