Comments (12)
Done
from pochta.
- The script should create a PID file when starting in order to finish pochta correctly during
stop
. - Also, CentOS uses
chkconfig
utility for services, current file cannot be understood by this utility
Could you please also add a restart
command that runs stop
&& start
afterwards?
from pochta.
Currently it can perform stop without any pid-files. Why do we need to create one?
from pochta.
Because it's fragile (won't work if there are several PIDs with 'pochta' in its name, this includes su pochta
) & risky (can potentially kill wrong pids).
from pochta.
This makes sense. Script has been updated to user pid. I'm not quite sure that ~/.pochta/pid is the best place for pid-file, but at least we have no permission problems there. Suggestions are most welcomed, as usual.
from pochta.
/var/run/pochta to PID file, and set permissions to dir (/var/run/pochta)
from pochta.
changed pid location to /var/run/pochta
from pochta.
There is still no chkconfig
support. It requires a line like chkconfig: - 85 15
. Also, in a guide there are no installation instructions for chkconfig
.
from pochta.
Several notes:
- PID is created even if service failed to start
- After start, the script should finish (right now it waits for
ctrl+c
which doesn't allow running it from CI) - If we don't have permissions to write into
/var/run
, a respective error should be shown and we should terminate the startup. - Would be useful to log into
.jtalks
or into/var/logs/pochta
folders
from pochta.
PID is created even if service failed to start
After start, the script should finish (right now it waits for ctrl+c which doesn't allow running it from CI)
If we don't have permissions to write into /var/run, a respective error should be shown and we should terminate the startup.
fixed
Would be useful to log into .jtalks or into /var/logs/pochta folders
Application level logging will be implemented soon, so I see no reason to address logging issues in scope of the service script
from pochta.
I tried the latest version of script, there appears to be an issue with restarting. Server doesn't catch up with the script, so when new instance of Pochta starts, the previous instance is still listening on the port:
[pochta@dev ~]$ service pochta restart
Stopping Pochta service...
Service stopped
Starting Pochta service...
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jtalks.pochta.PochtaPackage-main-cba84353.main(main.kt:15)
at org.jtalks.pochta.PochtaPackage.main(main.kt:1)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.net.httpserver.ServerImpl.bind(ServerImpl.java:133)
at sun.net.httpserver.HttpServerImpl.bind(HttpServerImpl.java:54)
at org.jtalks.pochta.http.HttpServer.<init>(HttpServer.kt:25)
at org.jtalks.pochta.http.HttpServer.<clinit>(HttpServer.kt)
... 2 more
Also, note that this doesn't return error code:
[pochta@dev ~]$ echo $?
0
from pochta.
It seems to be an application issue with TCP ports not being released properly. Please recheck it, now it should be fine.
from pochta.
Related Issues (13)
- Create CI jobs for Building & Releasing artifacts HOT 3
- Add max size for the Inbox HOT 3
- Nice looking 403 Page HOT 1
- Adding new inboxes HOT 7
- Create gradlew wrapper HOT 1
- Create a job for automatic deployment of Pochta to one of JTalks servers HOT 1
- Main page with links to actual inboxes HOT 5
- Proper caching for static http resources HOT 1
- FS mail storage backend
- Implement basic testing with Spek
- Implement email content transformation according Content-Transfer-Encoding header HOT 3
- Latest version link is broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pochta.