I’ve done various database imports through the import tool. However, this does not work only for the Doctype “Item Group”.
Our team assumes this might be because the SocketIO port could be closed/not forwarded.
What do you guys think about this? SocketIO runs by default on port 9000 and has not been changed since we installed ERPNext. If this is a problem, how do we open/forward the port?
supervisor is active and running. A restart doesn’t help, unfortunatly. Also I’d like to mention again that other file imports do work (such as customer or item) but this specific one refuses.
They weren’t loaded because I wasn’t running the bench while executing netstat and grep.
Having started the bench, I opened a second terminal and the output is as following:
However, those seem outdated now that I’m seeing the numbers. Actually, I’m surprised we are using npm, since I was under the assumption that Yarn is the packet manager for erpnext.
Also about this:
This is the result:
==> logs/redis-socketio.error.log <==
==> logs/redis-socketio.log <==
_.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 12000
| `-._ `._ / _.-' | PID: 2018
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
2018:M 23 Apr 09:27:11.852 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
2018:M 23 Apr 09:27:11.852 # Server started, Redis version 3.0.6
2018:M 23 Apr 09:27:11.852 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2018:M 23 Apr 09:27:11.852 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
2018:M 23 Apr 09:27:11.864 * The server is now ready to accept connections on port 12000
2018:signal-handler (1556004498) Received SIGTERM scheduling shutdown...
2018:M 23 Apr 09:28:18.987 # User requested shutdown...
2018:M 23 Apr 09:28:18.987 # Redis is now ready to exit, bye bye...
5042:M 23 Apr 11:10:28.900 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
5042:M 23 Apr 11:10:28.914 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
5042:M 23 Apr 11:10:28.914 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
5042:M 23 Apr 11:10:28.914 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
5082:M 23 Apr 11:10:30.496 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
5082:M 23 Apr 11:10:30.498 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
5082:M 23 Apr 11:10:30.499 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
5082:M 23 Apr 11:10:30.499 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
5129:M 23 Apr 11:10:32.523 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
5129:M 23 Apr 11:10:32.523 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
5129:M 23 Apr 11:10:32.523 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
5129:M 23 Apr 11:10:32.523 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
5150:M 23 Apr 11:10:35.547 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
5150:M 23 Apr 11:10:35.554 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
5150:M 23 Apr 11:10:35.555 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
5150:M 23 Apr 11:10:35.555 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
Holy cow! How did I not see this? Yeah, apparently redis said bye at one point. Too much stuff going on.
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:11000 0.0.0.0:* LISTEN 14842/redis-server
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 14840/python
tcp 0 0 127.0.0.1:12000 0.0.0.0:* LISTEN 14825/redis-server
tcp 0 0 127.0.0.1:13000 0.0.0.0:* LISTEN 14845/redis-server
tcp6 0 0 :::3306 :::* LISTEN -
tcp6 0 0 :::53 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::25 :::* LISTEN -
tcp6 0 0 :::6787 :::* LISTEN 14945/node
tcp6 0 0 :::9000 :::* LISTEN 14833/node
then tail --lines=40 logs/redis-socketio*.log
output:
[Only showing the latest error output]
15452:M 23 Apr 15:27:30.324 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
15452:M 23 Apr 15:27:30.324 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
15452:M 23 Apr 15:27:30.324 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
15452:M 23 Apr 15:27:30.324 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
15492:M 23 Apr 15:27:32.052 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
15492:M 23 Apr 15:27:32.056 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
15492:M 23 Apr 15:27:32.056 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
15492:M 23 Apr 15:27:32.057 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
15535:M 23 Apr 15:27:34.083 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
15535:M 23 Apr 15:27:34.105 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
15535:M 23 Apr 15:27:34.108 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
15535:M 23 Apr 15:27:34.108 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
15554:M 23 Apr 15:27:37.144 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
15554:M 23 Apr 15:27:37.145 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
15554:M 23 Apr 15:27:37.145 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
15554:M 23 Apr 15:27:37.145 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
Even though your solution, and lots of others would’ve made sense, it did not work.
I’m sorry, but I think I’m mixing the order of commands. When the bench is currently turned off, this works.
However, after that, I can’t use bench start anymore.
When starting the bench, he tells me that the ports are already in use and shuts down.
So usually I would just sudo supervisorcts stop all and bench start after this.
Once the bench is running, I open another tab. Then I can sudo supervisorctl restart all
but that throws errors, just as bench restart.
Anyway, going forward, I decided to try the import again and although I got the error again, the file was actually saved this time. So I guess my problem is kind of solved…?
In any case, thank you for your time
Regards,
Val
EDIT: Visual Bug! The file is not actually uploaded, so the same error persists…
Please close this thread.
Apparently my whole installation is a mess. It seems like a mix of Developer and Production bench and I will do a complete reinstallation.
I once again thank Trentmu for his time for a problem which was clearly on my end.
FYI both environments (production and development) can run from the same directory for eg /home/frappe/frappe-bench
But of course one must be shut down before the other can be started.
So if the ‘bench start’ process dies with ‘bind: Address already in use’, that typically means a process from the production remains running and must be shutdown with say ‘sudo supervisorctl stop all’