I’m trying to connect to an SMB server via Agent Proxy with a generic source and my idea is to utilize the underlying socket, but it seems nothing is received by the server. I know there shouldn’t be any traffic controls, is there anything I’m missing, given that the same server_name+port+agent work with the out-of-the-box SMB Foundry connector.
Here’s my simple test that’s returning an empty bytes:
@lightweight
@external_systems(
source=Source("ri.magritte..source.<REDACTED UUID>")
)
@transform(files=Output(...))
def compute(source, files):
server_name = '<REDACTED DOMAIN>'
port = 445
with contextlib.closing(source.create_socket(server_name, port)) as test_sock:
test_sock.settimeout(15)
try:
# Send a simple SMB header to test connectivity
test_sock.send(b'\xfeSMB')
response = test_sock.recv(1024)
print(f"Got response: {response}")
except Exception as e:
print(f"Socket test failed: {e}"
It doesn’t fail, but response is just empty. Sending a “proper” SMB header also returns an empty response, as well as not explicitly setting the timeout.