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

Cronicle Single Node tries to connect itself using Public IP rather than Private (and fails to run jobs) #128

Open
datawithdev opened this issue Oct 20, 2018 · 2 comments

Comments

@datawithdev
Copy link

Summary

Cronicle single node was installed on a server with private and public IP. When I tried to run the job, it tried to connect to host (itself) using the public IP address.
Is there any config to specify/change an IP address associated with the host in a config file.
Most public interface ports are blocked in my environment but private IP ports are available.

Steps to reproduce the problem

Install cronicle where two IP addresses are available; public and private.

Your Setup

Operating system and version?

18.04 Ubuntu

Node.js version?

8.10.0

Cronicle software version?

0.8.28

Are you using a multi-server setup, or just a single server?

Single server master

Are you using the filesystem as back-end storage, or S3/Couchbase?

S3

Can you reproduce the crash consistently?

Log Excerpts

@datawithdev
Copy link
Author

datawithdev commented Oct 20, 2018

@jhuckaby I followed instruction in editing server in storage using
https://github.com/jhuckaby/Cronicle/wiki/Troubleshooting

Even after I modify server IP in
/opt/cronicle/bin/storage-cli.js get global/servers/0

Cronicle still picks up the public IP address as displayed in admin UI.

This will force people to run a private DNS if one wishes to use two hostname configs. (not something I wish to right away)
web_socket_use_hostnames
server_comm_use_hostnames

Is there any way chronicle could use private IP address it its internal mappings?

@jhuckaby
Copy link
Owner

Thank you for the issue report. I am sorry this is happening to you. Cronicle tries to "guess" the server's internal LAN IP by scanning all the interfaces returned by the os.networkInterfaces() call on startup, and picking the first one that is marked as non-internal (i.e. non-localhost). I suspect what is happening in your case is you have the public IP listed as a network interface, and it happens to come up first in the list, before any others.

I don't know how to fix this with the current version. If you can wait for the next major Cronicle release, it will simply connect to whatever hostname is in the browser URL. It will no longer attempt a direct server connection by default. Unfortunately, I have no timeline for the next major release, as I just work on Cronicle in my spare time, but that definitely will be a feature of it.

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

No branches or pull requests

2 participants