script-server icon indicating copy to clipboard operation
script-server copied to clipboard

Script don't start before long delay when a DNS server is in line but don't send responses

Open father-mande opened this issue 5 years ago • 9 comments

Hi, During some test ... suddenly when I select a script ... I have to wait for a long long time with some messages in the top of the left screen ... I don't remember all of them (except some humorous (I presume) like ... 42 ... and after some time and multiples messages the script start but all seems long. I am on a local LAN with fixed I.P. ... no proxy ... but at the same time I have problem with the DNS of my Internet provider (present but not responding) and when I read the server.log at the time of the problem ... it seems that the delay is linked to a line : [script_server.audit_utils.WARNING] Could not get hostname for 192.168.10.101 ... my box don't have a local DNS and DHCP propose only the Provider DNS servers. when DNS works again ... (so with immediate response (unknown) on hostname request) ALL go back normal.

So clearly it's a VERY RARE case but is it possible (when we use script-server only in a local LAN) to prevent audit (or others) to request hostname to the DNS and keep only the I.P. ?

Or do you think it's another problem ? because script-server require Internet or others services to run as well ?

As I said first, it's not a common situation, so I can understand that it's absolutely not a priority .... And for now, I don't have any idea on how reproduce this problem ...

Philippe. N.B. to introduce me, I am a NAS package integrator (open source) and use script bash to configure applications, I have start to write a webui but it's a lot of works and so specific to each package and your tool (script-server) seem to be a very good and very easy solution (after my first try).

father-mande avatar Sep 02 '20 14:09 father-mande

Hi @father-mande, do you have timestamps in the server.log? May be you can check which operation took the most time there?

bugy avatar Sep 02 '20 14:09 bugy

Hi bugy,

Unfortunately not ... because the problem will appear during the night ... and not only on the server and PC used for test ... I have try a lot of thing (so restarting script-server) ... because I think first : it's my fault I don't realize immediately that I have a provider problem ... considering that script-server is on LAN so without the need to access Internet or external server . This morning the DNS problem has been resolved ... So I restart with a clean situation (so cleaning all logs to get a better trace in a small file) and forgot to keep the old .log (I have also added in the Linux server my I.P. and PC Name in hosts file to prevent DNS access)

I will try to reproduce the problem ... so if (I suppose) you don't have enough information ... just wait or closed this issue ... I will reopen it if I can get more details and logs.

Philippe.

father-mande avatar Sep 02 '20 15:09 father-mande

Hi Philippe, why do you delete logs on restart? Or you use docker containers without volumes?

I meant the file, logs/server.log. It should be kept between restarts

bugy avatar Sep 02 '20 15:09 bugy

Hi, Because I am stupid ... In fact I will start to generate a NAS package (on multiple architecture x86, x86_64, Armhf Arm64) for script-server and tests multiples options ... selecting script based on user_name ... creating multiple instance with separate logs (by changing logging.json and separate port etc. ... generating rotate server.log (on NAS App. run 7/7 24/24) ... etc. etc. ... and at this time I restart with a clean situation for each test ... I have created a series of script to test the usage ... but I am not really in "production" mode

I have hesitate to write the post (due to lack of logs and information) ... but I do it ... in case you know or already have similar problem ... and that you know when an why script-server send waiting message when we call a script ...

Philippe.

father-mande avatar Sep 02 '20 15:09 father-mande

Unfortunately I cannot say why it happened, without logs. DNS resolving might be a problem, but there can be different reasons

bugy avatar Sep 02 '20 15:09 bugy

Hi,

Yes, I understand, I will try to create a DNS server and redo some tests ...

Thanks. Philippe.

father-mande avatar Sep 02 '20 16:09 father-mande

Thanks!

Father_mande [email protected] schrieb am Mi., 2. Sept. 2020, 18:12:

Hi,

Yes, I understand, I will try to create a DNS server and redo some tests ...

Thanks. Philippe.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/332#issuecomment-685840248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJLADMSLKWKDMN73ODTSDZVHRANCNFSM4QTDAXAQ .

bugy avatar Sep 02 '20 16:09 bugy

Hi, I also faced with this problem:

Jul 13 17:11:36 admin python3[24222]: 2021-07-13 17:11:36,108 [script_server.audit_utils.WARNING] Could not get hostname for 10.31.1.160

If I update my /etc/hosts to add 10.31.1.160 ob, everything starting working very quickly

kvaps avatar Jul 13 '21 15:07 kvaps

I just added 512 of our IPs into hosts as workaround, hehe

kvaps avatar Jul 13 '21 15:07 kvaps