We have to get grapqhl working. Graphql cant be used form author instance because it requires authentication, and the method is not documented and there is no way to "unprotect" the graphql endpoint on author to not require authenticaiton.
We understand that the publish instance doesnt have this restriction, i.e. we can call the graphql endpoint without authentication.
However, we cant find how to setup a publish instance which takes its content from the author instance.
This is on an M1 Mac.
We installed author by renaming our aem_cloud_SDK jar to aem-author-p4502.jar, unpacking it, then running crx-quickstart/bin/start. This works, and we have installed the wknd site which has content fragments and setsup the graphql endpoint correctly. We kept the default admin/admin user/pass
We installed publish by copying the aem cloud sdk jar file to aem-publish-p4503.jar in a separate dir and uplacking/running it. The process is running, but when we try to hit any publish url e.g. http://localhost:4503/content/wknd/us/en/magazine/ski-touring we get 404.
With the NON cloud SDK, this works out of the box (i.e. replication happens automatically), but what do we need to do for cloud SDK to get this to work?
We only need the publish instance to try to find a way to access graphql endpoint in our local dev envs without authentication.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @TB3dock
This setup completely works for me for both Author and Publish instance. Please make sure to run the instance by running the below command:
Author: java -jar aem-author-p4502.jar
Publish: java -jar aem-publish-p4503.jar
and for both the instance use the below username and password:
admin/admin
Here all the wknd pages are working fine in both author and publish instance.
In Cloud Service environment content is distributed from the Author Service to the Publish Service using Sling Content Distribution and the Adobe Pipeline whereas during development, to simulate the distribution of content using the local Author and Publish service the legacy Replication agents can be used.
It will allow you to replicate the page.
Please refer the below link:
Hope this helps!
Thanks!
Hi @TB3dock
This setup completely works for me for both Author and Publish instance. Please make sure to run the instance by running the below command:
Author: java -jar aem-author-p4502.jar
Publish: java -jar aem-publish-p4503.jar
and for both the instance use the below username and password:
admin/admin
Here all the wknd pages are working fine in both author and publish instance.
In Cloud Service environment content is distributed from the Author Service to the Publish Service using Sling Content Distribution and the Adobe Pipeline whereas during development, to simulate the distribution of content using the local Author and Publish service the legacy Replication agents can be used.
It will allow you to replicate the page.
Please refer the below link:
Hope this helps!
Thanks!
Views
Replies
Total Likes
@TB3dock Please use this URL to login on publish instance:
http://localhost:4503/libs/granite/core/content/login.html
For me also in local SDK it works and all the pages are rendering perfectly fine.
such as http://localhost:4503/content/wknd/en/restaurants/best-tacos-in-the-city.html
Let me know if this does not work.
Views
Replies
Total Likes
If I go to: http://localhost:4502/etc/replication/agents.author.html I see that default agent (publish) is disabled. If I open it, and do "edit" next to settings, and configure the transport tab as directed, and save, its still disabled with no option to enable. If I hit "test connection" it gives:
Replication test to http://localhost:4503/bin/receive?sling:authRequestLogin=1
2021-03-29 14:34:18 - Create new HttpClient for Default Agent
2021-03-29 14:34:18 - * Auth User: admin
2021-03-29 14:34:18 - * HTTP Version: 1.1
2021-03-29 14:34:18 - * Connect Timeout: 900000
2021-03-29 14:34:18 - * Socket Timeout: 900000
2021-03-29 14:34:18 - adding header: Action:Test
2021-03-29 14:34:18 - adding header: Path:/content
2021-03-29 14:34:18 - adding header: Handle:/content
2021-03-29 14:34:18 - deserialize content for delivery
2021-03-29 14:34:18 - No message body: Content ReplicationContent.VOID is empty
2021-03-29 14:34:18 - Sending POST request to http://localhost:4503/bin/receive?sling:authRequestLogin=1
2021-03-29 14:34:18 - sent. Response: 404 Not Found
2021-03-29 14:34:18 - Replication (TEST) of /content not successful. Conversation follows
2021-03-29 14:34:18 - ------------------------------------------------
2021-03-29 14:34:18 - Sending message to localhost:4503
2021-03-29 14:34:18 - >> POST /bin/receive HTTP/1.0
2021-03-29 14:34:18 - >> Action: Test
2021-03-29 14:34:18 - >> Path: /content
2021-03-29 14:34:18 - >> Handle: /content
2021-03-29 14:34:18 - >> Referer: about:blank
2021-03-29 14:34:18 - >> Content-Length: 0
2021-03-29 14:34:18 - >> Content-Type: application/octet-stream
2021-03-29 14:34:18 - --
2021-03-29 14:34:18 - << HTTP/1.1 404 Not Found
2021-03-29 14:34:18 - << Cache-Control: must-revalidate,no-cache,no-store
2021-03-29 14:34:18 - << Content-Type: text/html;charset=iso-8859-1
2021-03-29 14:34:18 - << Content-Length: 433
2021-03-29 14:34:18 - <<
2021-03-29 14:34:18 - << <html>
2021-03-29 14:34:18 - << <head>
2021-03-29 14:34:18 - << <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
2021-03-29 14:34:18 - << <title>Error 404 Not Found</title>
2021-03-29 14:34:18 - << </head>
2021-03-29 14:34:18 - << <body><h2>HTTP ERROR 404 Not Found</h2>
2021-03-29 14:34:18 - << <table>
2021-03-29 14:34:18 - << <tr><th>URI:</th><td>/bin/receive</td></tr>
2021-03-29 14:34:18 - << <tr><th>STATUS:</th><td>404</td></tr>
2021-03-29 14:34:18 - << <tr><th>MESSAGE:</th><td>Not Found</td></tr>
2021-03-29 14:34:18 - << <tr><th>SERVLET:</th><td>org.apache.felix.http.base.internal.dispatch.DispatcherServlet-7938de07</td></tr>
2021-03-29 14:34:18 - << </table>
2021-03-29 14:34:18 - << </body>
2021-03-29 14:34:18 - << </html>
2021-03-29 14:34:18 - Message sent.
2021-03-29 14:34:18 - ------------------------------------------------
2021-03-29 14:34:18 - Replication (TEST) of /content not successful.
Replication test failed
Not Found
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
@TB3dock Please use the below process to activate all the page:
Views
Replies
Total Likes
Views
Likes
Replies