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

problem with Remote Node on v1.15.0 #736

Closed
kamandir opened this issue Dec 9, 2024 · 10 comments
Closed

problem with Remote Node on v1.15.0 #736

kamandir opened this issue Dec 9, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@kamandir
Copy link

kamandir commented Dec 9, 2024

hey there!

Thanks for the new nice stuff released! I started some testing and found challenges...
maybe it's me doing something wrong, but i will still report it to find out why it fails... ;)

whatever i do, all the time i hit this error (code 500) when try to change from local node to a remote.
Config:

# Remote DAGU Nodes
remoteNodes:
 - name: "DEV" # Name of the remote node
   apiBaseUrl: "https://_my_dev_node_.com:8443/api/v1"
   isAuthToken: true
   authToken: "bla-bla...."

Error:

GET https://_my_dev_node_.com:8443/api/v1/dags?page=1&limit=50&searchName=&searchTag=&remoteNode=DEV 500 (Internal Server Error)

bundle.js?v=1.15.0:102 SyntaxError: Failed to execute 'json' on 'Response': Unexpected end of JSON input
    at bundle.js?v=1.15.0:102:167937
    at bundle.js?v=1.15.0:102:167601
    at Object.next (bundle.js?v=1.15.0:102:167706)
    at s (bundle.js?v=1.15.0:102:168109)
onError @ bundle.js?v=1.15.0:102
(anonymous) @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
a @ bundle.js?v=1.15.0:75
Promise.then
l @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
iX @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
setTimeout
onErrorRetry @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
a @ bundle.js?v=1.15.0:75
Promise.then
l @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
iX @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
(anonymous) @ bundle.js?v=1.15.0:75
il @ bundle.js?v=1.15.0:2
_l @ bundle.js?v=1.15.0:2
vl @ bundle.js?v=1.15.0:2
Ml @ bundle.js?v=1.15.0:2
(anonymous) @ bundle.js?v=1.15.0:2
yc @ bundle.js?v=1.15.0:2
lc @ bundle.js?v=1.15.0:2
jo @ bundle.js?v=1.15.0:2
(anonymous) @ bundle.js?v=1.15.0:2
bundle.js?v=1.15.0:102 
@yohamta yohamta self-assigned this Dec 10, 2024
@yohamta yohamta added the bug Something isn't working label Dec 10, 2024
@yohamta
Copy link
Collaborator

yohamta commented Dec 10, 2024

@kamandir Thanks for reporting the issue! I’ve been trying to reproduce it, but everything seems to work fine in my environment. Here’s my setup:

  1. Running server 1 on port 8080 and server 2 on port 8081.
  2. Server 2 is configured with IS_AUTHTOKEN=true AUTHTOKEN=123456
  3. The admin.yaml configuration is as follows:
# admin.yaml
port: 8080
remoteNodes:
  - name: "dev"
    apiBaseUrl: "http://localhost:8081/api/v1"
    isAuthToken: true
    authToken: 123456
  1. API requests with cURL
curl --location 'http://localhost:8080/api/v1/dags?remoteNode=dev'

With this setup, both the API and WebUI on localhost:8080 are working as expected for me.

Could you share a bit more about your setup so I can dig into this further and try to replicate the issue? Thanks! :)

@kamandir
Copy link
Author

kamandir commented Dec 10, 2024

i'm running it on a secure port with a certificate installed. Does this make difference?..

PS: I have a side process that utilizes the API and all is fine there, API calls work with no issues.

@yohamta
Copy link
Collaborator

yohamta commented Dec 10, 2024

Thanks for the information! I'll try to fix.

@yohamta
Copy link
Collaborator

yohamta commented Dec 10, 2024

@kamandir Thanks for reporting the issue! I've released v1.15.1 that should fix the HTTPS connection problems.

You can now configure TLS verification skipping per remote node like this:

remoteNodes:
 - name: "DEV"
   apiBaseUrl: "https://_my_dev_node_.com:8443/api/v1"
   isAuthToken: true
   authToken: "bla-bla...."
   skipTLSVerify: true  # Add this line if you need to skip TLS verification

Please try it out and let me know if you're still experiencing any issues. Thanks for helping improve Dagu! 🙂

@yohamta yohamta closed this as completed Dec 10, 2024
@kamandir
Copy link
Author

tested on v15.1
now I see another error:

GET https://_my_app.com:8443/api/v1/dags?limit=100&remoteNode=DEV 502 (Bad Gateway)
(anonymous) @ bundle.js?v=1.15.1:102
(anonymous) @ bundle.js?v=1.15.1:102
(anonymous) @ bundle.js?v=1.15.1:102
(anonymous) @ bundle.js?v=1.15.1:102
O2 @ bundle.js?v=1.15.1:102
(anonymous) @ bundle.js?v=1.15.1:75
(anonymous) @ bundle.js?v=1.15.1:75
(anonymous) @ bundle.js?v=1.15.1:75
(anonymous) @ bundle.js?v=1.15.1:75
iX @ bundle.js?v=1.15.1:75
(anonymous) @ bundle.js?v=1.15.1:75
(anonymous) @ bundle.js?v=1.15.1:75
il @ bundle.js?v=1.15.1:2
_l @ bundle.js?v=1.15.1:2
vl @ bundle.js?v=1.15.1:2
Ml @ bundle.js?v=1.15.1:2
(anonymous) @ bundle.js?v=1.15.1:2
yc @ bundle.js?v=1.15.1:2
lc @ bundle.js?v=1.15.1:2
jo @ bundle.js?v=1.15.1:2
(anonymous) @ bundle.js?v=1.15.1:2

bundle.js?v=1.15.1:102 FetchError
    at bundle.js?v=1.15.1:102:167989
    at bundle.js?v=1.15.1:102:167601
    at Object.next (bundle.js?v=1.15.1:102:167706)
    at s (bundle.js?v=1.15.1:102:168109)

@yohamta yohamta reopened this Dec 10, 2024
@yohamta
Copy link
Collaborator

yohamta commented Dec 11, 2024

@kamandir, thank you for testing! Could you please share the server's response body from the network tab in your browser? It should include an error message.

@kamandir
Copy link
Author

sure:

{
    "detailedMessage": null,
    "message": "failed to send request to remote node: Get \"https://_my_addr_.com:8443/api/v1/dags?limit=100\": tls: failed to verify certificate: x509: certificate signed by unknown authority"
}

some snippets from my browser to ensure the cert is fine:
image
image

@yohamta
Copy link
Collaborator

yohamta commented Dec 11, 2024

@kamandir Thanks! It looks like a certification issue. Have you tried with skipTLSVerify: true in the remoteNodes setting?

@kamandir
Copy link
Author

cool it helped. with the "skipTLSVerify: true" I see no error anymore. Thanks!
But I'm sure my cert is OK ;)

@yohamta
Copy link
Collaborator

yohamta commented Dec 11, 2024

I'm glad to hear the workaround worked! I'll look into why the certificate didn't function properly later.

@yohamta yohamta closed this as completed Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants