server: add missing concurrentFileUploadLimit flags for server command
The server command was missing the initialization of concurrentFileUploadLimit
flags for both filer and S3, causing a nil pointer dereference when starting
the server in combined mode.
This adds:
- filer.concurrentFileUploadLimit flag to server command
- s3.concurrentUploadLimitMB flag to server command
- s3.concurrentFileUploadLimit flag to server command
Fixes the panic: runtime error: invalid memory address or nil pointer dereference
at filer.go:332
filerOptions.cipher=cmdServer.Flag.Bool("filer.encryptVolumeData",false,"encrypt data on volume servers")
filerOptions.cipher=cmdServer.Flag.Bool("filer.encryptVolumeData",false,"encrypt data on volume servers")
filerOptions.saveToFilerLimit=cmdServer.Flag.Int("filer.saveToFilerLimit",0,"Small files smaller than this limit can be cached in filer store.")
filerOptions.saveToFilerLimit=cmdServer.Flag.Int("filer.saveToFilerLimit",0,"Small files smaller than this limit can be cached in filer store.")
filerOptions.concurrentUploadLimitMB=cmdServer.Flag.Int("filer.concurrentUploadLimitMB",64,"limit total concurrent upload size")
filerOptions.concurrentUploadLimitMB=cmdServer.Flag.Int("filer.concurrentUploadLimitMB",64,"limit total concurrent upload size")
filerOptions.concurrentFileUploadLimit=cmdServer.Flag.Int("filer.concurrentFileUploadLimit",0,"limit number of concurrent file uploads, 0 means unlimited")
filerOptions.localSocket=cmdServer.Flag.String("filer.localSocket","","default to /tmp/seaweedfs-filer-<port>.sock")
filerOptions.localSocket=cmdServer.Flag.String("filer.localSocket","","default to /tmp/seaweedfs-filer-<port>.sock")
filerOptions.showUIDirectoryDelete=cmdServer.Flag.Bool("filer.ui.deleteDir",true,"enable filer UI show delete directory button")
filerOptions.showUIDirectoryDelete=cmdServer.Flag.Bool("filer.ui.deleteDir",true,"enable filer UI show delete directory button")
filerOptions.downloadMaxMBps=cmdServer.Flag.Int("filer.downloadMaxMBps",0,"download max speed for each download request, in MB per second")
filerOptions.downloadMaxMBps=cmdServer.Flag.Int("filer.downloadMaxMBps",0,"download max speed for each download request, in MB per second")
@ -168,6 +169,8 @@ func init() {
s3Options.localSocket=cmdServer.Flag.String("s3.localSocket","","default to /tmp/seaweedfs-s3-<port>.sock")
s3Options.localSocket=cmdServer.Flag.String("s3.localSocket","","default to /tmp/seaweedfs-s3-<port>.sock")
s3Options.bindIp=cmdServer.Flag.String("s3.ip.bind","","ip address to bind to. If empty, default to same as -ip.bind option.")
s3Options.bindIp=cmdServer.Flag.String("s3.ip.bind","","ip address to bind to. If empty, default to same as -ip.bind option.")
s3Options.concurrentUploadLimitMB=cmdServer.Flag.Int("s3.concurrentUploadLimitMB",128,"limit total concurrent upload size for S3")
s3Options.concurrentFileUploadLimit=cmdServer.Flag.Int("s3.concurrentFileUploadLimit",0,"limit number of concurrent file uploads for S3, 0 means unlimited")
sftpOptions.port=cmdServer.Flag.Int("sftp.port",2022,"SFTP server listen port")
sftpOptions.port=cmdServer.Flag.Int("sftp.port",2022,"SFTP server listen port")
sftpOptions.sshPrivateKey=cmdServer.Flag.String("sftp.sshPrivateKey","","path to the SSH private key file for host authentication")
sftpOptions.sshPrivateKey=cmdServer.Flag.String("sftp.sshPrivateKey","","path to the SSH private key file for host authentication")