Open hello-lui opened 6 months ago
The demo hasn't configured the port to 80, and I'm uncertain about the source of the error. Could you please check your network or share more details? Thank you.
you're right. I am planning to distribute the repository on the company network. Distribution is normal and the first screen is displayed well, but the error occurred while uploading the file and is having difficulty.
The details of the error are as follows. I would appreciate it if you could provide more specific guidance on what I should check or discuss with the in-house network manager.
Forced re-optimization of dependencies
VITE v4.3.9 ready in 737 ms
➜ Local: https://localhost:5173/ ➜ Network: https://172.23.24.146:5173/ ➜ press h to show help
Shortcuts
press r to restart the server
press u to show server url
press o to open in browser
press c to clear console
press q to quit
[@vue/compiler-sfc] defineEmits
is a compiler macro and no longer needs to be imported.
request error: AxiosError: connect ECONNREFUSED 127.0.0.1:80
at Function.AxiosError.from (file:///Users/1108029/my_githup/RPA_news_bot/chatDOC/ChatDOC-API-Demo/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (file:///Users/1108029/my_githup/RPA_news_bot/chatDOC/ChatDOC-API-Demo/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js:591:25)
at RedirectableRequest.emit (node:events:525:35)
at ClientRequest.eventHandlers.
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError],
socket: [Array]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/undefined/api/v2/documents/upload',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
lookup: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'localhost',
port: '',
agent: undefined,
nativeProtocols: [Object],
pathname: '/undefined/api/v2/documents/upload'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 29628,
_requestBodyBuffers: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '29642',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'POST /undefined/api/v2/documents/upload HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: multipart/form-data; boundary=--------------------------387809854697238603383923\r\n' +
'Authorization: Bearer \r\n' +
'User-Agent: axios/1.4.0\r\n' +
'Content-Length: 29642\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: localhost\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/undefined/api/v2/documents/upload',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'localhost',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: true,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost/undefined/api/v2/documents/upload',
_timeout: null,
[Symbol(kCapture)]: false
}, cause: Error: connect ECONNREFUSED 127.0.0.1:80 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 80 } }
Thank you for your feedback, and I noticed that the API_KEY
isn't set correctly. You can refer to this link for instructions on how to properly set the API_KEY
: https://github.com/chatdoc-com/ChatDOC-API-Demo?tab=readme-ov-file#custom-server-environment.
run cp ./.env.template ./.env
Fill in API_KEY in the .env file.
We are trying to distribute this within the company, but port 80 is blocked due to network policy. We are getting an error during upload. Can we change the port number?