Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Setup ipfs and substrate node with subsocial-starter, getting Error: socket hang up #467

Open
tiago-gif opened this issue Dec 17, 2021 · 0 comments

Comments

@tiago-gif
Copy link

I setup the IPFS node and substrate node using the subsocial-starter repo (I ran different configuration of --only-substrate, etc. and currently I have ran just ./start.sh to run everything) and all the docker containers ran fine, when I run ./run-dev.sh the application runs fine but I get this error and the app locally says "Connecting to the network..." in the bottom left. I am using the localhost.env variables for my environment. The log is pasted below, how would I fix this issue?

ERROR SubsocialIpfsApi: Failed to get content to IPFS from client side via offchain: Error: socket hang up
at connResetException (node:internal/errors:683:14)
at Socket.socketOnEnd (node:_http_client:471:23)
at Socket.emit (node:events:406:35)
at endReadableNT (node:internal/streams/readable:1329:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ECONNRESET',
config: {
url: 'http://127.0.0.1:3001/v1/ipfs/get?cids=',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.19.2'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
data: undefined
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
protocol: 'http:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/v1/ipfs/get?cids=',
method: 'GET',
headers: [Object],
agent: undefined,
agents: [Object],
auth: undefined,
hostname: '127.0.0.1',
port: '3001',
nativeProtocols: [Object],
pathname: '/v1/ipfs/get',
search: '?cids='
},
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'GET /v1/ipfs/get?cids= HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'User-Agent: axios/0.19.2\r\n' +
'Host: 127.0.0.1:3001\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/v1/ipfs/get?cids=',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '127.0.0.1',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
_currentUrl: 'http://127.0.0.1:3001/v1/ipfs/get?cids=',
[Symbol(kCapture)]: false
},
response: undefined,
isAxiosError: true,
toJSON: [Function (anonymous)]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant