Giter Club home page Giter Club logo

Comments (3)

OliverJAsh avatar OliverJAsh commented on August 26, 2024

The SIGTERM handler is also causing me problems, .e.g if I try to run the above script with concurrently, it never exits:

$ concurrently --kill-others-on-fail --success first --kill-others 'sleep 5' 'node main.js'
[1] Skipping {
[1]   "host": "oss.sonatype.org",
[1]   "path": "/content/repositories/releases/org/mock-server/mockserver-netty/5.11.2/mockserver-netty-5.11.2-jar-with-dependencies.jar",
[1]   "port": 443
[1] } as file already downloaded
[1] (node:24554) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/oliverash/Development/mock-server-express-sigint-bug/node_modules/mockserver-node/package.json' of 'launch_and_set_expectations.js'. Please either fix that or report it to the module author
[1] (Use `node --trace-deprecation ...` to show where the warning was created)
[1] Running 'java -Dfile.encoding=UTF-8 -jar node_modules/mockserver-node/mockserver-netty-5.11.2-jar-with-dependencies.jar -serverPort 1080 -logLevel DEBUG'
[1] waiting for MockServer to start retries remaining: 110
[1] waiting for MockServer to start retries remaining: 109
[1] waiting for MockServer to start retries remaining: 108
[1] waiting for MockServer to start retries remaining: 107
[1] 2021-06-23 22:37:12 5.11.2 FINE logger level is DEBUG, change using:
[1]  - 'ConfigurationProperties.logLevel(String level)' in Java code,
[1]  - '-logLevel' command line argument,
[1]  - 'mockserver.logLevel' JVM system property or,
[1]  - 'mockserver.logLevel' property value in 'mockserver.properties'
[1] 2021-06-23 22:37:12 5.11.2 INFO 1080 started on port: 1080
[1] waiting for MockServer to start retries remaining: 106
[1] 2021-06-23 22:37:12 5.11.2 INFO 1080 retrieved active expectations in json that match:
[1]
[1]   { }
[1]
[0] sleep 5 exited with code 0
--> Sending SIGTERM to other processes..
[1] Using port '1080' to stop MockServer and MockServer Proxy

from mockserver-node.

Magellol avatar Magellol commented on August 26, 2024

Also I think there is an issue with the way uncaughtExceptions are handled. I believe we should be exiting the node process here https://github.com/mock-server/mockserver-node/blob/master/index.js#L279

- process.on('uncaughtException', exitHandler.bind(null, {exit: false, options: options}));
+ process.on('uncaughtException', exitHandler.bind(null, {exit: true, options: options}));

We patched it on our end.

from mockserver-node.

OliverJAsh avatar OliverJAsh commented on August 26, 2024

It looks like we fixed SIGINT but not SIGTERM #75

from mockserver-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.