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

Migration to go modules #111

Closed
wants to merge 1 commit into from
Closed

Conversation

Darkclainer
Copy link

No description provided.

@Darkclainer
Copy link
Author

see #112

@wallyqs
Copy link
Member

wallyqs commented Jan 23, 2020

Thanks, I gave it a shot a few months back and failed to make the tests pass somehow. I will try again based on your branch

@Darkclainer
Copy link
Author

Actually it does fail test. But also original master does too.
Log from gomod branch:

[4792] 2020/01/25 01:31:00.546056 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:00.585907 [INF] Prometheus exporter listening at https://localhost:0/metrics
2020/01/25 01:31:00 http: TLS handshake error from 127.0.0.1:57522: remote error: tls: bad certificate
--- FAIL: TestExporterHTTPS (0.08s)
    exporter_test.go:177: Received TLS error:  error from get: Get https://127.0.0.1:44523/metrics: x509: certificate has expired or is not yet valid
[4792] 2020/01/25 01:31:00.688884 [INF] Prometheus exporter listening at http://localhost:7777/metrics
[4792] 2020/01/25 01:31:00.731558 [INF] Prometheus exporter listening at http://localhost:0/some/other/path/to/metrics
[4792] 2020/01/25 01:31:00.771299 [INF] Prometheus exporter listening at http://localhost:0/elsewhere
[4792] 2020/01/25 01:31:00.811019 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:01.823401 [INF] Prometheus exporter listening at http://localhost:0/metrics
--- FAIL: TestExporterNoNATSServer (3.54s)
    exporter_test.go:354: response did not have NATS data
[4792] 2020/01/25 01:31:05.392094 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[4792] 2020/01/25 01:31:05.421769 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[4792] 2020/01/25 01:31:05.451763 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[4792] 2020/01/25 01:31:05.454471 [ERR] A collector for this server's metrics has already been registered.
[4792] 2020/01/25 01:31:05.455012 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[4792] 2020/01/25 01:31:05.455049 [ERR] can't start HTTP listener: listen tcp 127.0.0.1:8888: bind: address already in use
[4792] 2020/01/25 01:31:05.485684 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:05.999525 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.070321 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.139873 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.153027 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.166499 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.178627 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.186728 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.196179 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.204272 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.374372 [INF] Prometheus exporter listening at http://localhost:0/metrics
[4792] 2020/01/25 01:31:06.504583 [INF] Prometheus exporter listening at http://localhost:0/metrics
2020/01/25 01:31:06.558594 [INF] starting NATS-Replicator, version 0.1.0
2020/01/25 01:31:06.558647 [INF] server time is Sat Jan 25 01:31:06 MSK 2020
2020/01/25 01:31:06.558662 [INF] connecting to NATS with configuration nats
2020/01/25 01:31:06.562291 [INF] connecting to NATS with configuration nats2
2020/01/25 01:31:06.563714 [INF] started connection NATS:bar to NATS:bar.out
2020/01/25 01:31:06.563944 [INF] starting http monitor on :9999
[4792] 2020/01/25 01:31:08.565127 [INF] Prometheus exporter listening at http://localhost:0/metrics
2020/01/25 01:31:08.617135 [INF] stopping replicator
2020/01/25 01:31:08.617163 [INF] cancelling reconnect timer
2020/01/25 01:31:08.617188 [INF] closing connectors
2020/01/25 01:31:08.617203 [INF] shutting down connection NATS:bar to NATS:bar.out
2020/01/25 01:31:08.617224 [INF] closing stan connections
2020/01/25 01:31:08.617234 [INF] closing nats connections
2020/01/25 01:31:08.617298 [INF] reconnect ticker cancelled
2020/01/25 01:31:08.617348 [INF] disconnected from NATS connection named nats
2020/01/25 01:31:08.617492 [INF] disconnected from NATS connection named nats2
2020/01/25 01:31:08.617513 [INF] closing http server used for monitoring
2020/01/25 01:31:08.617694 [INF] http monitoring stopped
FAIL
exit status 1
FAIL	github.com/nats-io/prometheus-nats-exporter/exporter	8.120s

Log from original branch:

[8140] 2020/01/25 01:33:30.313156 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:30.345071 [INF] Prometheus exporter listening at https://localhost:0/metrics
2020/01/25 01:33:30 http: TLS handshake error from 127.0.0.1:47956: remote error: tls: bad certificate
--- FAIL: TestExporterHTTPS (0.04s)
    exporter_test.go:177: Received TLS error:  error from get: Get https://127.0.0.1:40117/metrics: x509: certificate has expired or is not yet valid
[8140] 2020/01/25 01:33:30.414613 [INF] Prometheus exporter listening at http://localhost:7777/metrics
[8140] 2020/01/25 01:33:30.445507 [INF] Prometheus exporter listening at http://localhost:0/some/other/path/to/metrics
[8140] 2020/01/25 01:33:30.477213 [INF] Prometheus exporter listening at http://localhost:0/elsewhere
[8140] 2020/01/25 01:33:30.507009 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:31.510004 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.066922 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[8140] 2020/01/25 01:33:35.094928 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[8140] 2020/01/25 01:33:35.122662 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[8140] 2020/01/25 01:33:35.124087 [ERR] A collector for this server's metrics has already been registered.
[8140] 2020/01/25 01:33:35.124345 [INF] Prometheus exporter listening at http://localhost:8888/metrics
[8140] 2020/01/25 01:33:35.124363 [ERR] can't start HTTP listener: listen tcp 127.0.0.1:8888: bind: address already in use
[8140] 2020/01/25 01:33:35.153113 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.661146 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.704093 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.760655 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.766123 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.771228 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.773516 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.776608 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.778901 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.780933 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:35.879722 [INF] Prometheus exporter listening at http://localhost:0/metrics
[8140] 2020/01/25 01:33:36.003953 [INF] Prometheus exporter listening at http://localhost:0/metrics
2020/01/25 01:33:36.057800 [INF] starting NATS-Replicator, version 0.1.0
2020/01/25 01:33:36.057827 [INF] server time is Sat Jan 25 01:33:36 MSK 2020
2020/01/25 01:33:36.057831 [INF] connecting to NATS with configuration nats
2020/01/25 01:33:36.059597 [INF] connecting to NATS with configuration nats2
2020/01/25 01:33:36.060229 [INF] started connection NATS:bar to NATS:bar.out
2020/01/25 01:33:36.060411 [INF] starting http monitor on :9999
[8140] 2020/01/25 01:33:38.060899 [INF] Prometheus exporter listening at http://localhost:0/metrics
2020/01/25 01:33:38.107333 [INF] stopping replicator
2020/01/25 01:33:38.107347 [INF] cancelling reconnect timer
2020/01/25 01:33:38.107356 [INF] closing connectors
2020/01/25 01:33:38.107362 [INF] shutting down connection NATS:bar to NATS:bar.out
2020/01/25 01:33:38.107372 [INF] closing stan connections
2020/01/25 01:33:38.107376 [INF] closing nats connections
2020/01/25 01:33:38.107425 [INF] disconnected from NATS connection named nats
2020/01/25 01:33:38.107439 [INF] reconnect ticker cancelled
2020/01/25 01:33:38.107462 [INF] disconnected from NATS connection named nats2
2020/01/25 01:33:38.107476 [INF] closing http server used for monitoring
2020/01/25 01:33:38.107545 [INF] http monitoring stopped
FAIL
exit status 1
FAIL	github.com/nats-io/prometheus-nats-exporter/exporter	7.834s

Sorry, I'm not using this package myself, so I can't dive much into the problem

@wallyqs wallyqs requested review from wallyqs and variadico and removed request for wallyqs September 8, 2020 16:19
@variadico
Copy link
Contributor

Sorry this turned out to be a little more involved than it seemed. We've finally moved to modules with #124 !

@variadico variadico closed this Oct 15, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants