Accessing ERPNext from web browser from a client pc

Hi I am very new to ERPNext and Linux. I have managed to installed ERPNext on my centos server VM.

how do it access it from a client? I tried connecting to the server ip (192.168.0.250) from an Internet explorer, but it shows nginx page instead

sudo bench setup production

i have completeted

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --setup-production

so how do I access ERPNext? when I key in 192.168.0.250, I get ngnix testing page still

when I type

[root@localhost home]# bench start
01:34:37 system | workerbeat.1 started (pid=14578)
01:34:37 system | worker.1 started (pid=14579)
01:34:37 system | web.1 started (pid=14580)
01:34:38 workerbeat.1 | ERROR: Pidfile (celerybeat.pid) already exists.
01:34:38 workerbeat.1 | Seems we’re already running? (pid: 14253)
01:34:38 workerbeat.1 | celery beat v3.1.17 (Cipater) is starting.
01:34:38 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit )
01:34:38 web.1 | Traceback (most recent call last):
01:34:38 web.1 | File “./env/bin/frappe”, line 9, in
01:34:38 web.1 | load_entry_point(‘frappe==4.11.4’, ‘console_scripts’ , ‘frappe’)()
01:34:38 web.1 | File “/home/frappe/frappe-bench/apps/frappe/frappe/cli .py”, line 53, in main
01:34:38 web.1 | return run(fn, parsed_args)
01:34:38 web.1 | File “/home/frappe/frappe-bench/apps/frappe/frappe/cli .py”, line 83, in run
01:34:38 web.1 | out = globals().get(fn)(**args)
01:34:38 web.1 | File “/home/frappe/frappe-bench/apps/frappe/frappe/cli .py”, line 67, in new_fn
01:34:38 web.1 | return fn(*args, **new_kwargs)
01:34:38 web.1 | File “/home/frappe/frappe-bench/apps/frappe/frappe/cli .py”, line 822, in serve
01:34:38 web.1 | frappe.app.serve(port=port, profile=profile, site=fr appe.local.site, sites_path=sites_path)
01:34:38 web.1 | File “/home/frappe/frappe-bench/apps/frappe/frappe/app .py”, line 144, in serve
01:34:38 web.1 | use_debugger=True, use_evalex=True, threaded=True)
01:34:38 web.1 | File “/home/frappe/frappe-bench/env/lib/python2.7/site -packages/werkzeug/serving.py”, line 617, in run_simple
01:34:38 web.1 | test_socket.bind((hostname, port))
01:34:38 web.1 | File “/usr/lib64/python2.7/socket.py”, line 224, in me th
01:34:38 web.1 | return getattr(self._sock,name)(*args)
01:34:38 web.1 | socket.error: [Errno 98] Address already in use
01:34:38 system | workerbeat.1 stopped (rc=73)
01:34:38 system | sending SIGTERM to worker.1 (pid 14579)
01:34:38 system | sending SIGTERM to web.1 (pid 14580)
01:34:38 system | worker.1 stopped (rc=-15)
01:34:38 system | web.1 stopped (rc=-15)

By default, ERPNext gets setup on port 8000. As you have set it up for
Production, you will not need to run bench start (which is for Development).

Just try the address with the port: http://192.168.0.250:8000

1 Like

hey guys, I tried that, and it shows this page can’t be displayed. I also open the port on the firewall and reload it, it returns the same thing

I login to my server, http://localhost:8000/ same problem/

Hi, I tried logging in from 192.168.0.250:8000 , same issue. I have disabled SELINIUX =disable, same problem

I did the following

[root@localhost ~]# tail /var/log/nginx/error.log
2015/02/14 14:42:29 [emerg] 13327#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:42:29 [emerg] 13327#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:42:29 [emerg] 13327#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:42:29 [emerg] 13327#0: still could not bind()
2015/02/14 14:43:48 [emerg] 13480#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:43:48 [emerg] 13480#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:43:48 [emerg] 13480#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:43:48 [emerg] 13480#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:43:48 [emerg] 13480#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/02/14 14:43:48 [emerg] 13480#0: still could not bind()

how do I correct this?

[root@localhost ~]# firewall-cmd --list-all
public (default, active)
interfaces: ens32
sources:
services: dhcpv6-client http https ssh
ports: 8000/tcp 81/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:

run this as root

fuser -k 80/tcp
pkill -9 python

then

service nginx start

Post output of

supervisorctl status

-bash: fuser: command not found
it return this

I just did the following

[root@localhost ~]# sudo lsof -t -i:80
11104
11105
[root@localhost ~]# pkill -9 python
[root@localhost ~]# service nginx start
Redirecting to /bin/systemctl start nginx.service
[root@localhost ~]# supervisorctl status
frappe:frappe-web RUNNING pid 812, uptime 0:39:19
frappe:frappe-worker RUNNING pid 11172, uptime 0:00:11
frappe:frappe-workerbeat RUNNING pid 11173, uptime 0:00:11
[root@localhost ~]#

it still loads the nginx test page on 192.168.0.250:80

can you past output of the following.

cat /etc/nginx/conf.d/frappe.conf

and

cat /etc/nginx/sites-enabled/default

[root@localhost ~]# cat /etc/nginx/conf.d/frappe.conf

server_names_hash_bucket_size 64;

upstream frappe {
server 127.0.0.1:8000 fail_timeout=0;
}

server {
listen 80 default ;
client_max_body_size 4G;
server_name frappe_default_site;

            keepalive_timeout 5;
            sendfile on;
            root /home/frappe/frappe-bench/sites;

            location /private/ {
                    internal;
                    try_files /$uri =424;
            }

            location /assets {
                    try_files $uri =404;
            }

            location / {
                    try_files /site1.local/public/$uri @magic;
            }

            location @magic {
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                                            proxy_set_header X-Frappe-Site-Name site1.local;
                                            proxy_set_header Host $host;
                    proxy_set_header X-Use-X-Accel-Redirect True;
                    proxy_read_timeout 120;
                    proxy_redirect off;
                    proxy_pass  http://frappe;
            }
    }

cat: /etc/nginx/sites-enabled/default: No such file or directory

Redirecting to /bin/systemctl restart nginx.service
[root@localhost ~]# curl -I http://localhost:80
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Sat, 14 Feb 2015 15:29:15 GMT
Content-Type: text/html; charset: utf-8
Content-Length: 12526
Connection: keep-alive
X-Page-Name: login
X-From-Cache: False
Set-Cookie: sid=Guest; Expires=Tue, 17-Feb-2015 23:29:15 GMT; Path=/

Can you try changing this to server_name localhost; and run nginx -s reload.

[root@localhost ~]# nginx -s reload
nginx: [warn] conflicting server name “localhost” on 0.0.0.0:80, ignored

post output of

grep -r  "localhost" /etc/nginx/

Hi Bhupesh

its working after I open the port on the firewall port. I think it worked after changing server_name localhost