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

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

Open
1 task done
kim2yung opened this issue Feb 25, 2025 · 4 comments
Labels
question Further information is requested

Comments

@kim2yung
Copy link

kim2yung commented Feb 25, 2025

Is there an existing issue for this?

  • 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

@JuJinPark
Copy link
Contributor

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

@kim2yung
Copy link
Author

@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
Copy link
Author

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.

@JuJinPark
Copy link
Contributor

@kim2yung
It looks like you’re discussing the same issue in the thread below:
#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.

@tomsun28 tomsun28 added discussion and removed bug Something isn't working labels Feb 28, 2025
@tomsun28 tomsun28 changed the title [BUG] When hitting the import API on localhost:1157/api/monitors/import , it is giving ERROR. [Question] When hitting the import API on localhost:1157/api/monitors/import , it is giving ERROR. Feb 28, 2025
@tomsun28 tomsun28 added question Further information is requested and removed discussion labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

3 participants