hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Question] When hitting the import API on localhost:1157/api/monitors/import , it is giving ERROR.

Open kim2yung opened this issue 10 months ago • 5 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

When hitting the import API on localhost:1157/api/monitors/import , it is giving ERROR. Also localhost:4200/api/monitors/import gives ERROR.

But when I use to hit "192.163.15.20:4200/api/monitors/import", where 192.163.15.20 is any VM where I am running separate (other) Hertzbeat.

WHY I cant able to hit my localhost API?

Expected Behavior

When I give localhost in api it should get import. (import of JSON file I am doing)

Steps To Reproduce

No response

Environment

HertzBeat version(s):1.6.1

Debug logs

I have used 1157/api/xxx also but the error I am getting is- I/O error on POST request for "http://localhost:1157/api/monitors/import": Failed to connect to localhost/[0:0:0:0:0:0:0:1]:1157

when I use 4200/api/xxx- 504 Gateway Timeout: "Error occurred while trying to proxy: localhost:4200/api/monitors/import"

Anything else?

No response

kim2yung avatar Feb 25 '25 07:02 kim2yung

@kim2yung Have you checked whether the local backendServer (hertzbeat-manager package) is running correctly on your local machine at port 1157?

JuJinPark avatar Feb 26 '25 01:02 JuJinPark

@kim2yung Have you checked whether the local backendServer (hertzbeat-manager package) is running correctly on your local machine at port 1157?

When I give the api url as localhost it throws exception NOT Found, but backend server keeps running.

kim2yung avatar Feb 26 '25 08:02 kim2yung

Actually I want to hit my local API, where I am running the backend locally in the same local hertzbeat I want to hi the API. How to do that.

kim2yung avatar Feb 26 '25 09:02 kim2yung

@kim2yung It looks like you’re discussing the same issue in the thread below: https://github.com/apache/hertzbeat/discussions/3092

From now on, I’ll try to respond in the discussion channel. Is that okay with you?

By the way, I still don’t fully understand your issue. It would be much easier for people to follow if you included a diagram or some visual explanation.

JuJinPark avatar Feb 27 '25 05:02 JuJinPark

Hey @kim2yung I might have seen this issue, can you show the screenshot of your active tcp ports from your terminal

sarthakeash avatar Mar 14 '25 13:03 sarthakeash