Erpnext nginx config issue

In a production environment - on the erpnext host only -

this works

http://localhost

but this don’t

http://erp.dom.local

And before you say DNS then

user@erp:~$ dig erp.dom.local
;; ANSWER SECTION:
erp.dom.local. 604800 IN A 192.168.x.y
;; AUTHORITY SECTION:
dom.local. 604800 IN NS ns2.dom.local.
dom.local. 604800 IN NS ns1.dom.local.
;; ADDITIONAL SECTION:
ns1.dom.local. 604800 IN A 192.168.x.y1
ns2.dom.local. 604800 IN A 192.168.x.y2

System hosts

127.0.0.1 localhost
127.0.1.1 erp
192.168.x.y erp.dom.local erp

IPv6 did cause some internal problems in mixed nix/win/mac enviroment and not in use - kernel disabled in grub commandline (ipv6.disable=1)

The nginx.conf is default generated by frappe

bench setup nginx

How do I get erpnext-nginx-config to recognize the internal erp.dom.local? and remember it!

b.rgds

FH

Does it not respond or does it give 404?

@pdvyas
The http://erp.dom.local request is timing out - there is no response at all.

can you try following and post the output

curl -vvv http://erp.dom.local/
1 Like

@BhupeshGupta

I have replaced curls localized error-message with the equivalent chromium-message

user@erp:~$ curl -vvv http://erp.dom.local
* Rebuil URL to: http://erp.dom.local/
* Hostname was NOT found in DNS cache
*   Trying 192.168.x.y...
* connect to 192.168.x.y port 80 failed: ERR_CONNECTION_TIMED_OUT
* Failed to connect to erp.dom.local port 80: ERR_CONNECTION_TIMED_OUT
* Closing connection 0
curl: (7) Failed to cennect to erp.dom.local port 80: ERROR_CONNECTION_TIMED_OUT

DNS verification

user@erp:~$ nslookup erp.dom.local
Server: 127.0.1.1
Address: 127.0.1.1#53

Name: erp.dom.local
Address: 192.168.x.y

@BhupeshGupta
@pdvyas
When troubleshooting this I was revisiting my hosts file.

I was wondering why the localhost.localdomain entry was missing.

I started with changing

127.0.0.1 localhost

to

127.0.0.1 localhost.localdomain localhost

restart network

$ sudo service networking restart

no change

Then I realized that Ubuntu NetworkManager adds 127.0.1.1 as resolver hence the 127.0.1.1 entry.

so

127.0.1.1 erp

change to

127.0.1.1 erp.dom.local erp

restart network

$ sudo service networking restart

and now http://erp.dom.local is responding as expected

b.regds

FH

1 Like