@MMRIZE , found the issue, you last sentence solved it, i was indeed running the server on port 9090 but I set the url of the calendar to 8080.
After changing the port of the calendar url to 9090, all is fine.
Thanks for your support!
@MMRIZE , found the issue, you last sentence solved it, i was indeed running the server on port 9090 but I set the url of the calendar to 8080.
After changing the port of the calendar url to 9090, all is fine.
Thanks for your support!
Can you check the output of ?
sudo lsof -i -P -n | grep 8080
while running npm run server
I checked with using the -u option on curl but that does not help. The “connection refused” is also a symptom if the port is closed which seems to be the case on my end.
I tried 127.0.0.1, 192.168.x.x, same result. The curl was excecuted on the same machine the MM server was running
the https was a typo. The ipWhitelist looks like
ipWhitelist: []
that should be fine. I do not have a desktop on the rpi so checking on the same client is not possible.
Must there not be a listener on port 8080? In my case there is none. I have also no idea how to debug, even with all logs on, there is no aditional information except for:
[13.11.2023 22:19.31.680] [ERROR] Calendar Error. Could not fetch calendar: http://localhost:8080/CALDAV/wielens.ics TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: connect ECONNREFUSED 127.0.0.1:8080
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8080
}
}
I tried with Curl:
curl -v http://localhost:8080/CALDAV/calname.ics
Trying 127.0.0.1:8080...
connect to 127.0.0.1 port 8080 failed: Connection refused
Failed to connect to localhost port 8080: Connection refused
Closing connection 0
curl: (7) Failed to connect to localhost port 8080: Connection refused
The only thing which can be the cause is that i run
npm run server
can someone check on a working system if there is a listener on port 8080? I can only excecute the server as i have a headless system
Thanks
Hi,
I have a problem with MMM-CalDAV that it seems it is not listening on port 8080:
sudo lsof -i -P -n | grep 8080
does not return anything, however the calender seems to be fetched from my owncloud server:
[13.11.2023 09:39.26.779] [LOG] [CALDAV] calname(calname.ics) has 13 events
[13.11.2023 09:39.26.786] [LOG] [CALDAV] calname.ics is refreshed.
The log output shows:
[13.11.2023 09:17.13.712] [ERROR] Calendar Error. Could not fetch calendar: https://localhost:8080/CALDAV/calname.ics TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: connect ECONNREFUSED 127.0.0.1:8080
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8080
}
}
the ics file is physically present:
ls -al modules/MMM-CalDAV/service/
total 36
drwxr-xr-x 2 peter peter 4096 Nov 13 08:51 .
drwxr-xr-x 6 peter peter 4096 Nov 13 09:11 ..
-rw-r--r-- 1 peter peter 2570 Nov 13 09:39 .calname.ics
The configuration from the MMM-DavCal is
{
module: "MMM-CalDAV",
config: {
timeRangeStart: -30, // Get events from 30 days before
servers: [
{
name: "calname",
envPrefix: "OCLOUD_",
serverUrl: "https://myserverurl/remote.php/dav/",
calendars: ["calname"],
}
],
}
},
The configuration of the calendar module:
{
module: "calendar",
header: "My Calendar",
position: "top_left",
config: {
calendars: [
{
fetchInterval: 7 * 24 * 60 * 60 * 1000,
symbol: "calendar-check",
url: "http://localhost:8080/DAVCAL/calname.ics",
auth: {
user: 'user1',
pass: 'password1',
method: 'basic'
}
}
]
}
},
The content of .env:
CALDAV_SERVICE_USERNAME=user1
CALDAV_SERVICE_PASSWORD=password1
### For Owncloud
OCLOUD_username=oc_user
OCLOUD_password=oc_password
I have tried a lot of things but i guess the main problem is that MMM-CalDav is not listening on port 8080? Running magic mirror as root does not help. MagicMorror runs on a raspberry pi 4 but only the server part
npm run server
If i use another calendar it works:
https://ics.calendarlabs.com/46/d26011d3/Germany_Holidays.ics
Can anyone support here?
Thanks,
Peter