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

Deploying a Pippo webapp on a Debian server #342

Closed
Avarel opened this issue Jan 13, 2017 · 6 comments
Closed

Deploying a Pippo webapp on a Debian server #342

Avarel opened this issue Jan 13, 2017 · 6 comments

Comments

@Avarel
Copy link

Avarel commented Jan 13, 2017

Hello everyone,
I recently got into learning web frameworks. I'm currently testing out Pippo and developing a web-app using it. However, I seem to not be able to bind the Pippo/Jetty server to listen to port 80, while other port works fine (3000).

Would someone point me in the right direction to deploy this?

@decebals
Copy link
Member

I know that you cannot open a port below 1024 without admin privileges. Please try to run your application with sudo.

@Avarel
Copy link
Author

Avarel commented Jan 13, 2017

[main] INFO ro.pippo.core.Languages - Using 'en' as default language.
[pool-1-thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @241ms
[pool-1-thread-1] INFO ro.pippo.jetty.JettyServer - Starting Jetty Server 9.3.8.v20160314 on port 80
[pool-1-thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.8.v20160314
[pool-1-thread-1] INFO ro.pippo.core.PippoFilter -
 ____  ____  ____  ____  _____
(  _ \(_  _)(  _ \(  _ \(  _  )
 ) __/ _)(_  ) __/ ) __/ )(_)(   http://pippo.ro
(__)  (____)(__)  (__)  (_____)  1.1.0

[pool-1-thread-1] INFO ro.pippo.core.PippoFilter - Pippo started (PROD)
[pool-1-thread-1] INFO org.eclipse.jetty.server.handler.ContextHandler - Started r.p.j.PippoHandler@25133ef8{/,null,AVAILABLE}
^C[Thread-0] WARN ro.pippo.core.Pippo - Server is not started

The response when I ran sudo java -jar PlaygroundSpark-1.0-SNAPSHOT.jar. Still does not seem to work.

@decebals
Copy link
Member

Can you run the application in debug mode (with -Dpippo.mode=dev on command line) to have more info?

@Avarel
Copy link
Author

Avarel commented Jan 13, 2017

 sudo java -jar PlaygroundSpark-1.0-SNAPSHOT.jar -Dpippo.mode=dev
[main] INFO ro.pippo.core.Languages - Using 'en' as default language.
[pool-1-thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @238ms
[pool-1-thread-1] INFO ro.pippo.jetty.JettyServer - Starting Jetty Server 9.3.8.v20160314 on port 80
[pool-1-thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.8.v20160314
[pool-1-thread-1] INFO ro.pippo.core.PippoFilter -
 ____  ____  ____  ____  _____
(  _ \(_  _)(  _ \(  _ \(  _  )
 ) __/ _)(_  ) __/ ) __/ )(_)(   http://pippo.ro
(__)  (____)(__)  (__)  (_____)  1.1.0

[pool-1-thread-1] INFO ro.pippo.core.PippoFilter - Pippo started (PROD)
[pool-1-thread-1] INFO org.eclipse.jetty.server.handler.ContextHandler - Started r.p.j.PippoHandler@25133ef8{/,null,AVAILABLE}

Not sure why it still says PROD.

@decebals
Copy link
Member

decebals commented Jan 13, 2017

You must put -D... after java word.
Nevermind, your issue it's not about Pippo. Mayby, the below link [1] can help you to resolve this problem.
In production you should use a web server like apache or nginx that runs on port 80 in front of your application that runs on 8338, for example.

[1] http://serverfault.com/questions/112795/how-to-run-a-server-on-port-80-as-a-normal-user-on-linux

@Avarel
Copy link
Author

Avarel commented Jan 14, 2017

The Nginx solution seemed to work for me in that link, thanks!.

@Avarel Avarel closed this as completed Jan 14, 2017
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