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

Unclear behaviour for conflicting services at startup #3460

Closed
mmattel opened this issue Apr 4, 2022 · 1 comment · Fixed by #4093
Closed

Unclear behaviour for conflicting services at startup #3460

mmattel opened this issue Apr 4, 2022 · 1 comment · Fixed by #4093
Assignees
Labels

Comments

@mmattel
Copy link
Contributor

mmattel commented Apr 4, 2022

Describe the bug

Having one (or two or more) shells open, no configuration given = you will have a configuration conflicts when running the runtime proxy and the standalone proxy:

  1. Shell1:
ocis server & disown -h
ps ax | grep ocis | grep -v grep
221297 pts/1    Sl     0:01 ocis server
  1. Shell2:
ocis proxy & 
{"level":"info","service":"proxy","server":"http","time":"2022-04-04T17:15:03.53059245+02:00","message":"Shutting down server"}
  1. Shell2:
ps ax | grep ocis | grep -v grep
 221297 pts/1    Sl     0:01 ocis server
 221706 pts/0    Sl     0:00 ocis proxy

There are two issues:
a. Shutting down server from the proxy message is unclear. What is being shut down - the runtime, the standalone proxy?
b. Looking at the running PID's shows, that both are running

Note that it makes no difference when closing down shell1 (of course not...)

Steps to reproduce

See above

Expected behavior

Have a clear message WHO gets shut down. The term server is bound to the runtime! AND if it tells it gets shutdown, no process must stay alive.

Actual behavior

Totally unclear what happens.

Setup

See above

OCIS_VERSION=v1.9.0
no config

@butonic @micbar @rhafer (as discussed)
@EParzefall fyi

@wkloucek wkloucek self-assigned this Jul 5, 2022
@wkloucek
Copy link
Contributor

wkloucek commented Jul 5, 2022

I've created a PR that introduces a reason why the command did not start service X.

Example:

You are already running ocis server and then run ocis proxy server on the same machine.

ocis proxy server logs:

{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:47:31.805305157+02:00","message":"Shutting down server"}

It says: "service":"proxy" is "Shutting down server" because listen tcp 127.0.0.1:9205: bind: address already in use"

Example2:

You are already running ocis proxy server and then run ocis server on the same machine.

ocis server logs:

{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:02+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:06+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:10+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:13+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:17+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:17+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:18+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:18+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 0.0.0.0:9200: bind: address already in use","server":"http","time":"2022-07-05T08:52:18+02:00","message":"Shutting down server"}
{"level":"error","service":"proxy","error":"listen tcp 127.0.0.1:9205: bind: address already in use","server":"http","time":"2022-07-05T08:52:18+02:00","message":"Shutting down server"}
{"level":"error","service":"nats","time":"2022-07-05T08:52:18+02:00","message":"Shutting down server"}

It says multiple times: "service":"proxy" is "Shutting down server" because listen tcp 127.0.0.1:9205: bind: address already in use".

It does that multiple times because this time the runtimes tries six times to restart the proxy service. If it still fails, all services will be stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants