"fzstorj could not be started" Error

Moderator: Project members

Post Reply
Message
Author
test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

"fzstorj could not be started" Error

#1 Post by test » 2020-07-03 16:04

Hi!

I am customising storj connection in FileZIlla to Storj-Uplink C latest v1.0.5
For that, I had edited some front-end and backend files.
It compiled successfully.

Hoever, while logging on by Storj credentials, I see the following in my message window:

Code: Select all

Status:      	Connecting to us-central-1.tardigrade.io:7777...
Error:        	fzstorj could not be started
Error:        	Could not connect to server
Status:      	Waiting to retry...
I tried searching for relevant source files whose functions are called while logging on to Storj

I found that the file filezilla/src/engine/storj/storjcontrolsocket.cpp handles some of that functionality.
So, i added

Code: Select all

log(logmsg::error, _("nErrorCode: %d"), nErrorCode);
in CStorjControlSocket::ResetOperation() function as follows:

Code: Select all

int CStorjControlSocket::ResetOperation(int nErrorCode)
{
	if (!operations_.empty() && operations_.back()->opId == Command::connect) {
		auto &data = static_cast<CStorjConnectOpData &>(*operations_.back());
		if (data.opState == connect_init && nErrorCode & FZ_REPLY_ERROR && (nErrorCode & FZ_REPLY_CANCELED) != FZ_REPLY_CANCELED) {
			log(logmsg::error, _("fzstorj could not be started"));
			/////
			log(logmsg::error, _("nErrorCode: %d"), nErrorCode);
			/////
		}
	}
	if (!operations_.empty() && operations_.back()->opId == Command::del && !(nErrorCode & FZ_REPLY_DISCONNECTED)) {
		auto &data = static_cast<CStorjDeleteOpData &>(*operations_.back());
		if (data.needSendListing_) {
			SendDirectoryListingNotification(data.path_, false);
		}
	}

	return CControlSocket::ResetOperation(nErrorCode);
}
Now, the output in message window is:

Code: Select all

Status:      	Connecting to us-central-1.tardigrade.io:7777...
Error:        	fzstorj could not be started
Error:        	nErrorCode: 66
Error:        	Could not connect to server
Status:      	Waiting to retry...
I could not understand what this error code means

Kindly help
Thanks

test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

Re: "fzstorj could not be started" Error

#2 Post by test » 2020-07-04 14:19

UPDATE:

I cross-checked my customised storj-functionality code by extracting some of that code in a C++ file & it compiled and ran successfully in terminal

However, the issue that Filezilla displays "fzstorj could not be started" seems to be probably due to incorrect inclusion of .so file in filezilla/src/storj/Makefile.am as follows:

Code: Select all

bin_PROGRAMS = fzstorj				
				
fzstorj_SOURCES = \
		fzstorj.cpp		
				
fzstorj_LDADD = $(LIBFILEZILLA_LIBS) some_file_name.so				
				
fzstorj_CPPFLAGS = $(LIBFILEZILLA_CFLAGS)				
				
noinst_HEADERS = events.hpp somefilename.h			
				
if MACAPPBUNDLE				
noinst_DATA = $(top_builddir)/FileZilla.app/Contents/MacOS/fzstorj$(EXEEXT)				
endif				
				
$(top_builddir)/FileZilla.app/Contents/MacOS/fzstorj$(EXEEXT): fzstorj				
	mkdir -p $(top_builddir)/FileZilla.app/Contents/MacOS			
	cp -f fzstorj $(top_builddir)/FileZilla.app/Contents/MacOS/fzstorj
The FileZilla runs successfully if I include a .a file in this line instead of .so

Code: Select all

fzstorj_LDADD = $(LIBFILEZILLA_LIBS) some_file_name.so	
So, I would like to know how to include .so file in this Makefile.am

User avatar
botg
Site Admin
Posts: 33119
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: "fzstorj could not be started" Error

#3 Post by botg » 2020-07-05 18:10

You need to link it using the -l flag. Assuming the shared object file is libfoo.so, pass -lfoo. See man 1 ld for details.

For starting the linked program, make sure the library sits in a directory searched by the runtime linker. See man 8 ld.so for details.

test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

Re: "fzstorj could not be started" Error

#4 Post by test » 2020-07-08 15:20

Thanks

Post Reply